1
0

detect when trying to sign with a hw wallet offline in a not supported config

closes #4229
This commit is contained in:
SomberNight
2018-04-06 18:29:41 +02:00
parent 4ff3791cb9
commit 3b8c1c6c04
3 changed files with 9 additions and 2 deletions

View File

@@ -350,6 +350,9 @@ class Ledger_KeyStore(Hardware_KeyStore):
self.give_error("No matching x_key for sign_transaction") # should never happen
redeemScript = Transaction.get_preimage_script(txin)
if txin.get('prev_tx') is None: # and not Transaction.is_segwit_input(txin):
# note: offline signing does not work atm even with segwit inputs for ledger
raise Exception(_('Offline signing with {} is not supported.').format(self.device))
inputs.append([txin['prev_tx'].raw, txin['prevout_n'], redeemScript, txin['prevout_hash'], signingPos, txin.get('sequence', 0xffffffff - 1) ])
inputsPaths.append(hwAddress)
pubKeys.append(pubkeys)