Skip to content

Commit

Permalink
Remove useless screenshots for test_legacy_contract, and simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
cedelavergne-ledger committed Apr 15, 2024
1 parent 6ba4905 commit 1c57070
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 16 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion tests/ragger/snapshots/nanosp/test_legacy_contract

This file was deleted.

Binary file not shown.
Binary file not shown.
17 changes: 2 additions & 15 deletions tests/ragger/test_sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,26 +180,13 @@ def test_legacy_chainid(firmware: Firmware,


# Try to blind sign with setting disabled
def test_legacy_contract(firmware: Firmware,
backend: BackendInterface,
navigator: Navigator,
test_name: str,
default_screenshot_path: Path):
def test_legacy_contract(backend: BackendInterface):

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(default_screenshot_path,
test_name,
moves)
app_client.send_raw(0xe0, 0x04, 0x00, 0x00, buffer)

except ExceptionRAPDU as e:
assert e.status == StatusWord.INVALID_DATA
Expand Down

0 comments on commit 1c57070

Please sign in to comment.