mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
tests/device: allow multiple output changes (treat second as a normal output)
based upon e716f7e84e
This commit is contained in:
parent
0e2d5c8155
commit
cbd3751bdb
@ -777,12 +777,20 @@ class TestMsgSigntx(TrezorTest):
|
|||||||
proto.ButtonRequest(code=proto.ButtonRequestType.ConfirmOutput),
|
proto.ButtonRequest(code=proto.ButtonRequestType.ConfirmOutput),
|
||||||
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=1)),
|
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=1)),
|
||||||
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=2)),
|
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=2)),
|
||||||
|
proto.ButtonRequest(code=proto.ButtonRequestType.ConfirmOutput),
|
||||||
|
|
||||||
# error should occur
|
proto.ButtonRequest(code=proto.ButtonRequestType.SignTx),
|
||||||
proto.Failure(code=proto.FailureType.ProcessError, message='Only one change output is valid'),
|
proto.TxRequest(request_type=proto.RequestType.TXINPUT, details=proto.TxRequestDetailsType(request_index=0)),
|
||||||
|
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=0)),
|
||||||
|
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=1)),
|
||||||
|
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=2)),
|
||||||
|
|
||||||
|
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=0)),
|
||||||
|
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=1)),
|
||||||
|
proto.TxRequest(request_type=proto.RequestType.TXOUTPUT, details=proto.TxRequestDetailsType(request_index=2)),
|
||||||
|
proto.TxRequest(request_type=proto.RequestType.TXFINISHED),
|
||||||
])
|
])
|
||||||
|
|
||||||
with pytest.raises(CallException):
|
|
||||||
self.client.sign_tx('Testnet', [inp1, ], [out1, out_change1, out_change2])
|
self.client.sign_tx('Testnet', [inp1, ], [out1, out_change1, out_change2])
|
||||||
|
|
||||||
def test_change_on_main_chain_allowed(self):
|
def test_change_on_main_chain_allowed(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user