thardware wallets: fix sign_transaction in resstored wallets - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit c86ef5e8b0dcebf1940a68e8857165e6e4768920 DIR parent 55494e42241a92828050d770fcf3b6377d246060 HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 4 Nov 2015 19:13:24 +0100 hardware wallets: fix sign_transaction in resstored wallets Diffstat: M plugins/btchipwallet.py | 4 ++++ M plugins/keepkey.py | 4 ++++ M plugins/trezor.py | 4 ++++ 3 files changed, 12 insertions(+), 0 deletions(-) --- DIR diff --git a/plugins/btchipwallet.py b/plugins/btchipwallet.py t@@ -302,6 +302,8 @@ class BTChipWallet(BIP32_HD_Wallet): self.give_error("Not supported") def sign_message(self, address, message, password): + if self.has_seed(): + return BIP32_HD_Wallet.sign_message(self, address, message, password) use2FA = False self.signing = True self.get_client() # prompt for the PIN before displaying the dialog if necessary t@@ -352,6 +354,8 @@ class BTChipWallet(BIP32_HD_Wallet): return chr(27 + 4 + (signature[0] & 0x01)) + r + s def sign_transaction(self, tx, password): + if self.has_seed(): + return BIP32_HD_Wallet.sign_transaction(self, tx, password) if tx.is_complete(): return #if tx.error: DIR diff --git a/plugins/keepkey.py b/plugins/keepkey.py t@@ -445,6 +445,8 @@ class KeepKeyWallet(BIP32_HD_Wallet): #return str(decrypted_msg) def sign_message(self, address, message, password): + if self.has_seed(): + return BIP32_HD_Wallet.sign_message(self, address, message, password) if not self.check_proper_device(): give_error('Wrong device or password') try: t@@ -461,6 +463,8 @@ class KeepKeyWallet(BIP32_HD_Wallet): return msg_sig.signature def sign_transaction(self, tx, password): + if self.has_seed(): + return BIP32_HD_Wallet.sign_transaction(self, tx, password) if tx.is_complete(): return if not self.check_proper_device(): DIR diff --git a/plugins/trezor.py b/plugins/trezor.py t@@ -444,6 +444,8 @@ class TrezorWallet(BIP32_HD_Wallet): #return str(decrypted_msg) def sign_message(self, address, message, password): + if self.has_seed(): + return BIP32_HD_Wallet.sign_message(self, address, message, password) if not self.check_proper_device(): give_error('Wrong device or password') try: t@@ -460,6 +462,8 @@ class TrezorWallet(BIP32_HD_Wallet): return msg_sig.signature def sign_transaction(self, tx, password): + if self.has_seed(): + return BIP32_HD_Wallet.sign_transaction(self, tx, password) if tx.is_complete(): return if not self.check_proper_device():