ttrezor: don't call sign_transaction twice - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit babead68b6e301ffbe56ca2707370b3895e174fa
DIR parent 956f69f3d38f54f689f1909367ca6b89da0e5440
HTML Author: ThomasV <thomasv@gitorious>
Date: Fri, 24 Oct 2014 12:43:10 +0200
ttrezor: don't call sign_transaction twice
Diffstat:
M plugins/trezor.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
DIR diff --git a/plugins/trezor.py b/plugins/trezor.py
t@@ -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)
t@@ -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')