trezor: don't call sign_transaction twice
This commit is contained in:
parent
956f69f3d3
commit
babead68b6
|
@ -121,7 +121,7 @@ class Plugin(BasePlugin):
|
|||
def send_tx(self, tx):
|
||||
tx.error = None
|
||||
try:
|
||||
self.wallet.sign_transaction(tx, None, None)
|
||||
self.wallet.trezor_sign(tx)
|
||||
except Exception as e:
|
||||
tx.error = str(e)
|
||||
|
||||
|
@ -274,11 +274,13 @@ class TrezorWallet(NewWallet):
|
|||
return str(b64_msg_sig)
|
||||
|
||||
def sign_transaction(self, tx, keypairs, password):
|
||||
if tx.is_complete():
|
||||
return
|
||||
# the tx is signed by trezor_sign, in the GUI thread
|
||||
if tx.error:
|
||||
raise BaseException(tx.error)
|
||||
|
||||
def trezor_sign(self, tx):
|
||||
if tx.is_complete():
|
||||
return
|
||||
if not self.check_proper_device():
|
||||
give_error('Wrong device or password')
|
||||
|
||||
|
|
Loading…
Reference in New Issue