@@ -19,7 +19,7 @@ def view_account_status(self, args):
1919 except :
2020 color_print ("{red}Bad args. Usage:{endc} vas <account-addr>" )
2121 return
22- addrB64 = self .get_destination_addr (addrB64 )
22+ addrB64 = self .ton . get_destination_addr (addrB64 )
2323 account = self .ton .GetAccount (addrB64 )
2424 version = self .ton .GetVersionFromCodeHash (account .codeHash )
2525 statusTable = list ()
@@ -34,11 +34,10 @@ def view_account_status(self, args):
3434 print_table (codeHashTable )
3535 print ()
3636 print_table (historyTable )
37-
3837 # end define
3938
4039 def get_history_table (self , addr , limit ):
41- addr = self .get_destination_addr (addr )
40+ addr = self .ton . get_destination_addr (addr )
4241 account = self .ton .GetAccount (addr )
4342 history = self .ton .GetAccountHistory (account , limit )
4443 table = list ()
@@ -73,61 +72,6 @@ def view_account_history(self, args):
7372 print_table (table )
7473 # end define
7574
76- def get_destination_addr (self , destination ):
77- if self .ton .IsAddrB64 (destination ):
78- pass
79- elif self .ton .IsAddrFull (destination ):
80- destination = self .ton .AddrFull2AddrB64 (destination )
81- else :
82- wallets_name_list = self .ton .GetWalletsNameList ()
83- if destination in wallets_name_list :
84- wallet = self .ton .GetLocalWallet (destination )
85- destination = wallet .addrB64
86- return destination
87- # end define
88-
89- def move_coins (self , args ):
90- try :
91- wallet_name = args [0 ]
92- destination = args [1 ]
93- amount = args [2 ]
94- flags = args [3 :]
95- except :
96- color_print ("{red}Bad args. Usage:{endc} mg <wallet-name> <account-addr | bookmark-name> <amount>" )
97- return
98- wallet = self .ton .GetLocalWallet (wallet_name )
99- destination = self .get_destination_addr (destination )
100- self .ton .MoveCoins (wallet , destination , amount , flags = flags )
101- color_print ("MoveCoins - {green}OK{endc}" )
102- # end define
103-
104- def do_move_coins_through_proxy (self , wallet , dest , coins ):
105- self .local .add_log ("start MoveCoinsThroughProxy function" , "debug" )
106- wallet1 = self .ton .CreateWallet ("proxy_wallet1" , 0 )
107- wallet2 = self .ton .CreateWallet ("proxy_wallet2" , 0 )
108- self .ton .MoveCoins (wallet , wallet1 .addrB64_init , coins )
109- self .ton .ActivateWallet (wallet1 )
110- self .ton .MoveCoins (wallet1 , wallet2 .addrB64_init , "alld" )
111- self .ton .ActivateWallet (wallet2 )
112- self .ton .MoveCoins (wallet2 , dest , "alld" , flags = ["-n" ])
113- wallet1 .Delete ()
114- wallet2 .Delete ()
115- # end define
116-
117- def move_coins_through_proxy (self , args ):
118- try :
119- wallet_name = args [0 ]
120- destination = args [1 ]
121- amount = args [2 ]
122- except :
123- color_print ("{red}Bad args. Usage:{endc} mgtp <wallet-name> <account-addr | bookmark-name> <amount>" )
124- return
125- wallet = self .ton .GetLocalWallet (wallet_name )
126- destination = self .get_destination_addr (destination )
127- self .do_move_coins_through_proxy (wallet , destination , amount )
128- color_print ("MoveCoinsThroughProxy - {green}OK{endc}" )
129- # end define
130-
13175 def create_new_bookmark (self , args ):
13276 try :
13377 name = args [0 ]
@@ -393,8 +337,6 @@ def print_validator_list(self, args):
393337 def add_console_commands (self , console ):
394338 console .AddItem ("vas" , self .view_account_status , self .local .translate ("vas_cmd" ))
395339 console .AddItem ("vah" , self .view_account_history , self .local .translate ("vah_cmd" ))
396- console .AddItem ("mg" , self .move_coins , self .local .translate ("mg_cmd" ))
397- console .AddItem ("mgtp" , self .move_coins_through_proxy , self .local .translate ("mgtp_cmd" ))
398340
399341 console .AddItem ("nb" , self .create_new_bookmark , self .local .translate ("nb_cmd" ))
400342 console .AddItem ("bl" , self .print_bookmarks_list , self .local .translate ("bl_cmd" ))
0 commit comments