diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00001.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00001.png index 5ea6164a8f..02ab24df7f 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00001.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00001.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00002.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00002.png index e9adb7c1d9..9379125410 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00002.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00002.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00003.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00003.png index 13f8255b9e..953bdd2299 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00003.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00003.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00004.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00004.png index 6983285c24..5e15c3b8d2 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00004.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering/00004.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00002.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00002.png index 71834ce430..27384cb8bd 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00002.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00002.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00007.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00007.png index 2191773cc1..17f59fdc15 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00007.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00007.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00008.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00008.png index 394eff681f..b8ab0408bb 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00008.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00008.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00009.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00009.png index 139d265572..2f7c57461a 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00009.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00009.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00010.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00010.png index aa7c74d61a..1415c12703 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00010.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00010.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00011.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00011.png index 53ae65195f..6a53a258ee 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00011.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00011.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00012.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00012.png index 6578872258..53ae65195f 100644 Binary files a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00012.png and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00012.png differ diff --git a/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00013.png b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00013.png new file mode 100644 index 0000000000..6578872258 Binary files /dev/null and b/tests/ragger/snapshots/nanosp/test_eip712_advanced_filtering_verbose/00013.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00001.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00001.png index 5ea6164a8f..02ab24df7f 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00001.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00001.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00002.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00002.png index e9adb7c1d9..9379125410 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00002.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00002.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00003.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00003.png index 13f8255b9e..953bdd2299 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00003.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00003.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00004.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00004.png index 6983285c24..5e15c3b8d2 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00004.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering/00004.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00002.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00002.png index 71834ce430..27384cb8bd 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00002.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00002.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00007.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00007.png index 2191773cc1..17f59fdc15 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00007.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00007.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00008.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00008.png index 394eff681f..b8ab0408bb 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00008.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00008.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00009.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00009.png index 139d265572..2f7c57461a 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00009.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00009.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00010.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00010.png index aa7c74d61a..1415c12703 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00010.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00010.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00011.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00011.png index 53ae65195f..6a53a258ee 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00011.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00011.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00012.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00012.png index 6578872258..53ae65195f 100644 Binary files a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00012.png and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00012.png differ diff --git a/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00013.png b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00013.png new file mode 100644 index 0000000000..6578872258 Binary files /dev/null and b/tests/ragger/snapshots/nanox/test_eip712_advanced_filtering_verbose/00013.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00001.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00001.png index 7437b4fcac..d3d6ca4ce8 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00001.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00001.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00002.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00002.png index 7d3100bcce..ed9a1a7e4a 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00002.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00002.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00003.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00003.png index 404c495539..493de9aa5a 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00003.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00003.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00004.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00004.png index 987479c5ed..50ef8b64aa 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00004.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00004.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00002.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00002.png index ebd81164b9..bbba3f9d0c 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00002.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00002.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00007.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00007.png index 26ca679616..0d55d517da 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00007.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00007.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00008.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00008.png index dee5c6cd2a..6eb7b8a2b6 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00008.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00008.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00009.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00009.png index fa8a88e3c4..92c1b5127a 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00009.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00009.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00010.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00010.png index 606a1edc83..58adc5f791 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00010.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00010.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00011.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00011.png index 726c927de7..3a036c1f8e 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00011.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00011.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00012.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00012.png index 1c2d6cd43f..726c927de7 100644 Binary files a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00012.png and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00012.png differ diff --git a/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00013.png b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00013.png new file mode 100644 index 0000000000..1c2d6cd43f Binary files /dev/null and b/tests/ragger/snapshots/stax/test_eip712_advanced_filtering_verbose/00013.png differ diff --git a/tests/ragger/test_eip712.py b/tests/ragger/test_eip712.py index 59c44f763e..545b22ef50 100644 --- a/tests/ragger/test_eip712.py +++ b/tests/ragger/test_eip712.py @@ -208,10 +208,11 @@ def test_eip712_advanced_filtering(firmware: Firmware, "version": "1" }, "message": { - "from": "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa", - "to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", - "amount": 117, - "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F" + "with": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", + "value_recv": 10000000000000000, + "token_send": "0x6B175474E89094C44Da98b954EedeAC495271d0F", + "value_send": 24500000000000000000, + "token_recv": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", }, "primaryType": "Transfer", "types": { @@ -222,10 +223,11 @@ def test_eip712_advanced_filtering(firmware: Firmware, {"name": "verifyingContract", "type": "address"} ], "Transfer": [ - {"name": "from", "type": "address"}, - {"name": "to", "type": "address"}, - {"name": "amount", "type": "uint256"}, - {"name": "token", "type": "address"} + {"name": "with", "type": "address"}, + {"name": "value_recv", "type": "uint256"}, + {"name": "token_send", "type": "address"}, + {"name": "value_send", "type": "uint256"}, + {"name": "token_recv", "type": "address"}, ] } } @@ -236,10 +238,43 @@ def test_eip712_advanced_filtering(firmware: Firmware, else: filters = { "name": "Advanced Filtering", + "tokens": [ + { + "addr": "0x6b175474e89094c44da98b954eedeac495271d0f", + "ticker": "DAI", + "decimals": 18, + "chain_id": 1, + }, + { + "addr": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "ticker": "WETH", + "decimals": 18, + "chain_id": 1, + }, + ], "fields": { - "amount": "Amount", - "token": "Token", - "to": "To", + "value_send": { + "type": "amount_join_value", + "name": "Send", + "token": 0, + }, + "token_send": { + "type": "amount_join_token", + "token": 0, + }, + "value_recv": { + "type": "amount_join_value", + "name": "Receive", + "token": 1, + }, + "token_recv": { + "type": "amount_join_token", + "token": 1, + }, + "with": { + "type": "raw", + "name": "With", + }, } }