Browse Source

hardware wallets: fix sign_transaction in resstored wallets

283
ThomasV 10 years ago
parent
commit
c86ef5e8b0
  1. 4
      plugins/btchipwallet.py
  2. 4
      plugins/keepkey.py
  3. 4
      plugins/trezor.py

4
plugins/btchipwallet.py

@ -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
@ -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:

4
plugins/keepkey.py

@ -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:
@ -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():

4
plugins/trezor.py

@ -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:
@ -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():

Loading…
Cancel
Save