commit babead68b6e301ffbe56ca2707370b3895e174fa
parent 956f69f3d38f54f689f1909367ca6b89da0e5440
Author: ThomasV <thomasv@gitorious>
Date: Fri, 24 Oct 2014 12:43:10 +0200
trezor: don't call sign_transaction twice
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/plugins/trezor.py b/plugins/trezor.py
@@ -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')