mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 22:18:13 +00:00
fix(tests): fix extra ETH unknown token dialog for T1
This commit is contained in:
parent
fe55f0c1f0
commit
bd0b91a229
@ -117,15 +117,19 @@ class TestMsgEthereumSigntx:
|
||||
@pytest.mark.setup_client(mnemonic=MNEMONIC12)
|
||||
def test_ethereum_signtx_unknown_erc20_token(self, client):
|
||||
with client:
|
||||
client.set_expected_responses(
|
||||
[
|
||||
expected_responses = [
|
||||
messages.ButtonRequest(code=messages.ButtonRequestType.SignTx),
|
||||
messages.ButtonRequest(code=messages.ButtonRequestType.SignTx),
|
||||
messages.ButtonRequest(code=messages.ButtonRequestType.SignTx),
|
||||
messages.EthereumTxRequest(data_length=None),
|
||||
]
|
||||
# TT asks for contract address confirmation
|
||||
if client.features.model == "T":
|
||||
expected_responses.append(
|
||||
messages.ButtonRequest(code=messages.ButtonRequestType.SignTx)
|
||||
)
|
||||
|
||||
expected_responses.append(messages.EthereumTxRequest(data_length=None))
|
||||
client.set_expected_responses(expected_responses)
|
||||
|
||||
data = bytearray()
|
||||
# method id signalizing `transfer(address _to, uint256 _value)` function
|
||||
data.extend(bytes.fromhex("a9059cbb"))
|
||||
|
Loading…
Reference in New Issue
Block a user