Skip to content

Commit 1985b0f

Browse files
committed
trezor: add support for pre-signed external inputs
1 parent 1f42572 commit 1985b0f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hwilib/devices/trezor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,11 @@ def ignore_input() -> None:
439439
if _use_external_script_type(self.client):
440440
txinputtype.script_type = messages.InputScriptType.EXTERNAL
441441
txinputtype.script_pubkey = utxo.scriptPubKey
442+
if psbt_in.final_script_sig:
443+
txinputtype.script_sig = psbt_in.final_script_sig
444+
witness = psbt_in.final_script_witness.serialize()
445+
if witness:
446+
txinputtype.witness = witness
442447
else:
443448
txinputtype.address_n = [0x80000000 | 84, 0x80000000 | (0 if self.chain == Chain.MAIN else 1), 0x80000000, 0, 0]
444449
txinputtype.script_type = messages.InputScriptType.SPENDWITNESS

0 commit comments

Comments
 (0)