Port 'contract_data_warning.test' from 'zemu' to 'ragger'

This commit is contained in:
Charles-Edouard de la Vergne
2024-04-03 18:48:11 +02:00
parent fe1b3874ff
commit e6b2cf30c5
8 changed files with 26 additions and 23 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

View File

@@ -0,0 +1 @@
../nanox/test_legacy_contract

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

View File

@@ -201,6 +201,31 @@ def test_legacy_chainid2(firmware: Firmware,
common(firmware, backend, navigator, tx_params, test_name, BIP32_PATH2)
# Legacy Zemu contract data warning: Try to blind sign with setting disabled
def test_legacy_contract(firmware: Firmware,
backend: BackendInterface,
navigator: Navigator,
test_name: str):
buffer = bytes.fromhex("058000002c8000003c800000010000000000000000f849208506fc23ac008303dc3194f650c3d88d12db855b8bf7d11be6c55a4e07dcc980a4a1712d6800000000000000000000000000000000000000000000000000000000000acbc7018080")
app_client = EthAppClient(backend)
try:
with app_client.send_raw(0xe0, 0x04, 0x00, 0x00, buffer):
if firmware.device.startswith("nano"):
# No screens recorded on Stax
moves = [
NavInsID.RIGHT_CLICK,
NavInsID.BOTH_CLICK
]
navigator.navigate_and_compare(ROOT_SNAPSHOT_PATH,
test_name,
moves)
except ExceptionRAPDU as e:
assert e.status == StatusWord.INVALID_DATA
def test_1559(firmware: Firmware, backend: BackendInterface, navigator: Navigator):
tx_params: dict = {
"nonce": NONCE,