Skip to content

Commit

Permalink
Add amount-join ragger tests
Browse files Browse the repository at this point in the history
  • Loading branch information
apaillier-ledger committed May 21, 2024
1 parent b26d1b8 commit 65ae3a5
Show file tree
Hide file tree
Showing 37 changed files with 46 additions and 11 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/ragger/snapshots/stax/test_eip712_advanced_filtering/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 46 additions & 11 deletions tests/ragger/test_eip712.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"},
]
}
}
Expand All @@ -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",
},
}
}

Expand Down

0 comments on commit 65ae3a5

Please sign in to comment.