55 Commits

Author SHA1 Message Date
Alexandre Paillier
617291db6d Fix uninitialized UI buffer for EIP-712
Would refuse the message altogether if strings.tmp.tmp wasn't empty.
Introduced in 4680a9d583
2024-07-26 14:30:04 +02:00
Alexandre Paillier
4680a9d583 Better counting of EIP-712 filters
* Now counts them when received instead of only counting the displayed fields when filtering
* Fixes issues of filtered fields within an array of size N being counted N times
2024-07-24 11:59:14 +02:00
Alexandre Paillier
ea8ae0d83c Now can show explicit unlimited EIP-712 amount-joins 2024-06-24 17:26:13 +02:00
Alexandre Paillier
ae359b481e Now buffers the EIP-712 pairs to show more than one per screen 2024-06-20 13:20:52 +02:00
Alexandre Paillier
ab914230ce Centralize EIP-712 field shown check 2024-06-20 11:32:20 +02:00
Alexandre Paillier
ae486e9e53 Can now feed the EIP-712 UI value buffer from multiple data (APDU) chunks
Also fixes EIP-712 bytes formatting for values longer than the display buffer, it would only show "..." (introduced by aa38ee995)
2024-06-20 11:32:09 +02:00
Alexandre Paillier
05ddb70e7f Can now handle amount-join EIP-712 filtering on Permit (ERC-2612) messages 2024-06-20 10:40:00 +02:00
Alexandre Paillier
2fdb3bcb34 Date/Time EIP-712 filtering implementation 2024-05-24 17:36:38 +02:00
Alexandre Paillier
e76e429148 Amount-join EIP-712 filtering implementation 2024-05-24 17:35:34 +02:00
Alexandre Paillier
4a7e50138a Revert "EIP-712 addresses can now be displayed as a token ticker or a trusted domain name"
This reverts commit 77f5c9389b.
2024-05-24 15:41:49 +02:00
Charles-Edouard de la Vergne
e434173bc3 Merge pull request #565 from LedgerHQ/cev/B2CA-1558_Port-Flex
B2CA-1558: Port Ethereum on Flex
2024-05-16 17:44:25 +02:00
Charles-Edouard de la Vergne
c0d19fdf6d Update ethereum plugin-sdk 2024-05-13 14:33:10 +02:00
Alexandre Paillier
c8c4b6cccc Renamed get_asset_info to get_asset_info_by_addr 2024-05-07 17:37:04 +02:00
Francois Beutin
27f9ad52a8 Remove token management from main 2024-05-07 11:36:50 +02:00
Charles-Edouard de la Vergne
aa38ee9959 Code improvements / Fix warnings
- Fix CodeQL warnings
- Port lots of improvements/fixes from PR #225
- replace 'array_hexstr' and '%*H' format by sdk function 'format_hex'
- Add 'noreturn' attribute in 'main.c'
2024-04-26 11:09:18 +02:00
Charles-Edouard de la Vergne
f5ea9c51c2 Fix various Linter issues and mispelling 2024-03-27 14:43:15 +01:00
Charles-Edouard de la Vergne
36ae183a1c Fix deprecated warnings 2024-03-27 14:43:15 +01:00
Alexandre Paillier
77f5c9389b EIP-712 addresses can now be displayed as a token ticker or a trusted domain name 2024-02-14 12:10:03 +01:00
Francois Beutin
3bcf12ce1d Rename utils to common_utils 2024-02-02 11:23:30 +01:00
Francois Beutin
3d9da0dd16 Move basic utility functions from ethUtils to main utils file 2024-02-02 11:23:28 +01:00
Alexandre Paillier
49da32af8e Added missing return value checks following recent changes 2023-10-10 16:42:24 +02:00
Alexandre Paillier
fb1e1b2f78 EIP712 verbose mode "Struct review" visual glitch fix 2022-11-18 15:07:08 +01:00
Alexandre Paillier
174d35782f Review fixes 2022-10-26 14:54:10 +02:00
Alexandre Paillier
c158c3e502 Better split between business logic & UI code for EIP-712 2022-10-24 10:18:51 +02:00
Alexandre Paillier
5ce56bd53e Renamed EIP712 context files to less generic ones 2022-09-14 17:27:33 +02:00
Alexandre Paillier
1b46ccb190 Extract EIP-712 UI code 2022-09-14 17:27:33 +02:00
Alexandre Paillier
ed479128fd EIP712 Filtering count checking 2022-09-14 09:41:39 +02:00
Alexandre Paillier
de9e895ad9 EIP-712 code linting 2022-08-05 18:15:59 +02:00
Alexandre Paillier
38f199e46b Now only writes to EIP-712 UI buffers data that should be show
Prevents the case if the last field of a message is supposed to be hidden and after reaching the Approve/Reject screens the user goes back to see the last field, he would see the actual last field that should be hidden instead of the last one he saw beforehand.
2022-08-05 18:15:57 +02:00
Alexandre Paillier
0cc75edf69 EIP712 code Doxygen comments pass 2022-08-05 18:15:57 +02:00
Alexandre Paillier
cfb45a795b Better EIP712 field implementation error handling, including hidden ones 2022-08-05 18:15:55 +02:00
Alexandre Paillier
58d1b40c79 UI 712 logic refactoring 2022-08-05 18:15:55 +02:00
Alexandre Paillier
d1d1aa73e6 Made all EIP712 code use the same function for response APDUs 2022-08-05 18:15:52 +02:00
Alexandre Paillier
7dad477413 Moved EIP 712 commands handling into their own file & renamed some things 2022-08-05 18:15:50 +02:00
Alexandre Paillier
b782a69137 Moved all typed data in RAM related code into its own file 2022-08-05 18:15:49 +02:00
Alexandre Paillier
0100eed1fd EIP712 code now uses the global apdu response code; error handling improvements 2022-08-05 18:15:49 +02:00
Alexandre Paillier
01179730a1 Updated the EIP-712 filtering signature specs; Update the verification implementation to now handle field path intead of only the field key name 2022-08-05 18:15:48 +02:00
Alexandre Paillier
4574c223f2 Clean up mem allocation alignment macro usage + small refactoring of the typehash dependencies search 2022-08-05 18:15:48 +02:00
Alexandre Paillier
559e729188 Better UI for verbose EIP-712, now shows the review struct screen even on inner structures 2022-08-05 18:15:45 +02:00
Alexandre Paillier
1a4149e836 EIP-712 hidden fields now share the shown fields logic 2022-08-05 18:15:44 +02:00
Alexandre Paillier
d8321d422d Renamed EIP-712 UI function 2022-08-05 18:15:44 +02:00
Alexandre Paillier
447e7b9277 Verbose EIP-712 setting now ignores filtering APDUs 2022-08-05 18:15:43 +02:00
Alexandre Paillier
b7a4c0d93b EIP-712 filtering UI adjustments; Removed half-blind special compilation flag 2022-08-05 18:15:41 +02:00
Alexandre Paillier
a24f621ce3 EIP712 filtering, added new APDUs 2022-08-05 18:15:41 +02:00
Alexandre Paillier
56e0875979 Made the hacky 712 generic step redraw a function 2022-08-05 18:15:41 +02:00
Alexandre Paillier
07aca18ab1 New EIP-712 UX set title/value functions 2022-08-05 18:15:40 +02:00
Alexandre Paillier
d5603857b3 Fix UI display of signed negative integers smaller than 256 bits 2022-08-05 18:15:38 +02:00
Alexandre Paillier
f3e307423e EIP712 now displays integers differently if signed or unsigned 2022-08-05 18:15:38 +02:00
Alexandre Paillier
239da44d0e Added a new temporary EIP-712 half-bind mode 2022-08-05 17:52:48 +02:00
Alexandre Paillier
2fa6379470 Now only compiles full EIP-712 support for capable devices 2022-08-05 17:52:47 +02:00