Browse Source

trezor: add_slip_19_ownership_proofs_to_tx to not skip complete inputs

closes https://github.com/spesmilo/electrum/issues/8910
master
SomberNight 2 years ago
parent
commit
85ea2dfc48
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 5
      electrum/plugins/trezor/trezor.py

5
electrum/plugins/trezor/trezor.py

@ -107,7 +107,8 @@ class TrezorKeyStore(Hardware_KeyStore):
for txin in tx.inputs():
if txin.is_coinbase_input():
continue
if txin.is_complete() or not txin.is_mine:
# note: we add proofs even for txin.is_complete() inputs.
if not txin.is_mine:
continue
assert txin.scriptpubkey
desc = txin.script_descriptor
@ -391,6 +392,8 @@ class TrezorPlugin(HW_PluginBase):
txinputtype.script_type = InputScriptType.EXTERNAL
assert txin.scriptpubkey
txinputtype.script_pubkey = txin.scriptpubkey
# note: we add the ownership proof, if present, regardless of txin.is_complete().
# The "Trezor One" model always requires it for external inputs. (see #8910)
if not txin.is_mine and txin.slip_19_ownership_proof:
txinputtype.ownership_proof = txin.slip_19_ownership_proof
else: # we sign

Loading…
Cancel
Save