detect when trying to sign with a hw wallet offline in a not supported config
closes #4229
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user