chore(python): Support TXORIGINPUT and TXORIGOUTPUT in trezorlib.

pull/1331/head
Andrew Kozlik 4 years ago committed by Andrew Kozlik
parent ad6a0bc2a2
commit b636e959f5

@ -265,7 +265,7 @@ def sign_tx(
msg = copy_tx_meta(current_tx)
res = client.call(messages.TxAck(tx=msg))
elif res.request_type == R.TXINPUT:
elif res.request_type in (R.TXINPUT, R.TXORIGINPUT):
msg = messages.TransactionType()
msg.inputs = [current_tx.inputs[res.details.request_index]]
res = client.call(messages.TxAck(tx=msg))
@ -279,6 +279,11 @@ def sign_tx(
res = client.call(messages.TxAck(tx=msg))
elif res.request_type == R.TXORIGOUTPUT:
msg = messages.TransactionType()
msg.outputs = [current_tx.outputs[res.details.request_index]]
res = client.call(messages.TxAck(tx=msg))
elif res.request_type == R.TXEXTRADATA:
o, l = res.details.extra_data_offset, res.details.extra_data_len
msg = messages.TransactionType()

Loading…
Cancel
Save