1
0

trezor: add_slip_19_ownership_proofs_to_tx to not skip complete inputs

closes https://github.com/spesmilo/electrum/issues/8910
This commit is contained in:
SomberNight
2024-02-23 12:50:25 +00:00
parent d0c37c6e33
commit 85ea2dfc48

View File

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