1
0

trezor: raise and catch BaseException in signing

This commit is contained in:
ThomasV
2014-10-24 10:53:09 +02:00
parent 8347ad5449
commit 956f69f3d3
3 changed files with 7 additions and 3 deletions

View File

@@ -322,8 +322,10 @@ class BTChipWallet(NewWallet):
return b64encode(chr(27 + 4 + (signature[0] & 0x01)) + r + s)
def sign_transaction(self, tx, keypairs, password):
if tx.error or tx.is_complete():
if tx.is_complete():
return
if tx.error:
raise BaseException(tx.error)
self.signing = True
inputs = []
inputsPaths = []

View File

@@ -274,8 +274,10 @@ class TrezorWallet(NewWallet):
return str(b64_msg_sig)
def sign_transaction(self, tx, keypairs, password):
if tx.error or tx.is_complete():
if tx.is_complete():
return
if tx.error:
raise BaseException(tx.error)
if not self.check_proper_device():
give_error('Wrong device or password')