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):
|
def send_tx(self, tx):
|
||||||
tx.error = None
|
tx.error = None
|
||||||
try:
|
try:
|
||||||
self.wallet.sign_transaction(tx, None, None)
|
self.wallet.trezor_sign(tx)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
tx.error = str(e)
|
tx.error = str(e)
|
||||||
|
|
||||||
|
@ -274,11 +274,13 @@ class TrezorWallet(NewWallet):
|
||||||
return str(b64_msg_sig)
|
return str(b64_msg_sig)
|
||||||
|
|
||||||
def sign_transaction(self, tx, keypairs, password):
|
def sign_transaction(self, tx, keypairs, password):
|
||||||
if tx.is_complete():
|
# the tx is signed by trezor_sign, in the GUI thread
|
||||||
return
|
|
||||||
if tx.error:
|
if tx.error:
|
||||||
raise BaseException(tx.error)
|
raise BaseException(tx.error)
|
||||||
|
|
||||||
|
def trezor_sign(self, tx):
|
||||||
|
if tx.is_complete():
|
||||||
|
return
|
||||||
if not self.check_proper_device():
|
if not self.check_proper_device():
|
||||||
give_error('Wrong device or password')
|
give_error('Wrong device or password')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue