@@ -1190,7 +1190,9 @@ def do_update_fee(self):
11901190 _type , addr = self .get_payto_or_dummy ()
11911191 outputs = [(_type , addr , amount )]
11921192 try :
1193- tx = self .wallet .make_unsigned_transaction (self .get_coins (), outputs , self .config , fee )
1193+ is_sweep = bool (self .tx_external_keypairs )
1194+ tx = self .wallet .make_unsigned_transaction (
1195+ self .get_coins (), outputs , self .config , fee , is_sweep = is_sweep )
11941196 self .not_enough_funds = False
11951197 except NotEnoughFunds :
11961198 self .not_enough_funds = True
@@ -1339,7 +1341,9 @@ def do_send(self, preview = False):
13391341 return
13401342 outputs , fee , tx_desc , coins = r
13411343 try :
1342- tx = self .wallet .make_unsigned_transaction (coins , outputs , self .config , fee )
1344+ is_sweep = bool (self .tx_external_keypairs )
1345+ tx = self .wallet .make_unsigned_transaction (
1346+ coins , outputs , self .config , fee , is_sweep = is_sweep )
13431347 except NotEnoughFunds :
13441348 self .show_message (_ ("Insufficient funds" ))
13451349 return
@@ -1407,8 +1411,6 @@ def sign_tx_with_password(self, tx, callback, password):
14071411 '''Sign the transaction in a separate thread. When done, calls
14081412 the callback with a success code of True or False.
14091413 '''
1410- # call hook to see if plugin needs gui interaction
1411- run_hook ('sign_tx' , self , tx )
14121414
14131415 def on_signed (result ):
14141416 callback (True )
@@ -1417,8 +1419,11 @@ def on_failed(exc_info):
14171419 callback (False )
14181420
14191421 if self .tx_external_keypairs :
1422+ # can sign directly
14201423 task = partial (Transaction .sign , tx , self .tx_external_keypairs )
14211424 else :
1425+ # call hook to see if plugin needs gui interaction
1426+ run_hook ('sign_tx' , self , tx )
14221427 task = partial (self .wallet .sign_transaction , tx , password )
14231428 WaitingDialog (self , _ ('Signing transaction...' ), task ,
14241429 on_signed , on_failed )
0 commit comments