Commit Graph

198 Commits

Author SHA1 Message Date
Alexandre Paillier
8dcb4bc74f New EIP-712 verbose in-app setting + small refactoring & naming unification 2022-08-05 18:15:42 +02:00
Alexandre Paillier
a24f621ce3 EIP712 filtering, added new APDUs 2022-08-05 18:15:41 +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
bbcfe5abc3 Added a util function to convert from byte buffer to uint128_t 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
10fbb8d5bc Unify all the hex digits used in the app 2022-08-05 18:15:37 +02:00
Alexandre Paillier
59d8ace99e Split the uint256 lib into multiple more meaningful files 2022-08-05 18:15:36 +02:00
Alexandre Paillier
31aff6a95f Removed unused custom strchr function 2022-08-05 18:15:35 +02:00
Alexandre Paillier
2fa6379470 Now only compiles full EIP-712 support for capable devices 2022-08-05 17:52:47 +02:00
Alexandre Paillier
c0eaf8d106 Proper cleanup after EIP712 message 2022-08-05 17:52:46 +02:00
Alexandre Paillier
9cd39e2c02 Now uses some of the old EIP712 code as common code between the two implementations + approve/reject button now works 2022-08-05 17:52:45 +02:00
Alexandre Paillier
9f29a7caa2 UI handling WIP 2022-08-05 17:52:44 +02:00
Alexandre Paillier
3095d54394 Now initializes the eip712 context 2022-08-05 17:52:42 +02:00
Alexandre Paillier
9f8b2da74c WIP integration in app 2022-08-05 17:52:41 +02:00
Alexandre Paillier
b25eaa1b48 Renamed the existing EIP712 implementation folder 2022-08-05 17:52:22 +02:00
Alexandre Paillier
895c37e1fa Change apdu payload length to proper size (8 bits) 2022-08-05 17:52:20 +02:00
Jorge Martins
143d0e54f6 Fix function signature 2022-07-15 12:51:30 +02:00
Jorge Martins
53520d23c2 Fix code style 2022-07-15 12:42:09 +02:00
Jorge Martins
2811917658 Mark pointer to databuffer/workbuffer as const 2022-07-15 12:33:19 +02:00
Jorge Martins
9ea16d9098 Mark dataBuffer pointer as const 2022-07-15 11:38:07 +02:00
Jorge Martins
e0218520d8 Fix multiple vulnerabilities 2022-07-08 11:12:50 +02:00
Lucas PASCAL
653b64d6f7 [clean] Removing compound-related plugin code 2022-06-21 15:38:51 +02:00
Alexandre Paillier
b483804ff4 adding astar&shiden 2022-06-15 13:35:46 +02:00
Alexandre Paillier
785cfdc2ea cube 2022-06-15 13:35:44 +02:00
Alexandre Paillier
d1eb4ccc92 okc 2022-06-15 12:07:14 +02:00
Alexandre Paillier
8bc541b994 Increased display value buffer size for LNX & LNS+ 2022-06-08 11:45:20 +02:00
Lucas PASCAL
66ac35bc6f [add] Extending the amount buffer from 30 to 50 bytes + adding some const fields 2022-04-25 16:54:07 +02:00
Alexandre Paillier
78d159761d Linting pass following the clang-format update 2022-04-13 15:52:29 +02:00
tjulien-ledger
6b24a045ce Multiple ETH PRs (#289)
* adding Conflux espace

* adding Moonbeam

* kardiachain and bttc

* adding Wethio
2022-04-13 15:37:30 +02:00
BTChip github
52738e6bf5 Make lint happier 2022-03-22 08:40:36 +01:00
BTChip github
78f4642b6c Add EIP 1024 APDUs 2022-03-22 08:23:30 +01:00
Alexandre Paillier
faf2044108 Bump plugin interface version 2022-03-15 14:19:30 +01:00
Alexandre Paillier
a26da165df Now prevents NFT signatures without NFT metadata 2022-03-09 16:40:42 +01:00
Alexandre Paillier
fed91e2261 Removed old os_strcmp function 2022-03-09 15:23:55 +01:00
Alexandre Paillier
23202f6a63 Minimize includes in header files to what they depend on 2022-03-09 15:23:53 +01:00
Alexandre Paillier
c548aba364 Unify the include guards accross all header files 2022-03-09 11:52:03 +01:00
Alexandre Paillier
89070cd2be Now only loops through tokens once to match it 2022-03-09 11:52:03 +01:00
Alexandre Paillier
76c7f9dbd8 Fixes the location in memory of the address between nftInfo_t & tokenDefinition_t
Both used as members of the same union, also unifies the type (array of uint8_t)
2022-03-08 16:16:40 +01:00
Jean-Baptiste Bédrune
0d9c868a77 Set const qualifier for input buffers for copy functions 2022-02-22 00:08:49 +01:00
Jean-Baptiste Bédrune
ed4e10628a Change type of output length in amountToString
Defining out_buffer_size as uint8_t triggers warnings with static
analysers when sizeof() is used on the output buffer.

There is no reason to use uint8_t here.
2022-02-21 23:56:08 +01:00
Jean-Baptiste Bédrune
89fddf3ef8 Set const qualifiers in few fields used by the plugin interface 2022-02-21 23:46:54 +01:00
lpascal-ledger
bf9bfb3ee7 Merge pull request #231 from LedgerHQ/fix/printable_fees
[fix] Get printable amount handle should not parse configuration for ticker and decimal if the amount is a fee
2022-02-15 15:21:56 +01:00
Alexandre Paillier
2e63a428b2 Removed useless header include in shared_context.h
Could easily create a circular header dependency
2022-02-15 14:13:55 +01:00
Lucas PASCAL
1b24fc2eca [fix] Get printable amount handle should not parse configuration for ticker and decimal if the amount is a fee 2022-02-15 11:46:19 +01:00
Edouard Merle
617b60483f fix: build for lns+ 2022-02-08 16:43:45 +01:00
greenknot
3c36c41d3e enclose COLLECTION_NAME_MAX_LEN and HEADER_SIZE in parentheses
to prevent future potential issues.
2022-01-20 10:37:04 +01:00
Alexandre Paillier
eb531de5d2 [clean] Linting pass 2022-01-14 17:33:20 +01:00
Alexandre Paillier
8fd033e32a Merge remote-tracking branch 'origin/master' into fix/version_adjustment 2022-01-14 17:22:51 +01:00
Noel Moldvai
c8bf437424 Add Shyft support 2022-01-14 10:38:58 +01:00
Jean P
a53a2428cc Fix nft transactions (#229)
* Removed pluginType "hack"

* Fix some ERC 721 & 1155 function signature hashes

* Fix UI for ERC721 operations

* Explicit Batch Transfer UI with ERC1155

* Unified some ERC721 & 1155 non-static functions naming

* Fix UI for ERC1155 operations

* Added missing pin-lock check when signing transactions

* Fix the shell script that builds the elf files for testing

* Add tests dependency ethers

* Removed the space in the test filename

* Tests build script refactoring

* Now works when called from anywhere (not just the script's directory)
* Now handles LNS & LNX builds together (less duplicated code)

* Temporarily disable Nano X tests

Until Zemu supports Nano X 2.0 SDK

* Tests now start with blind signing disabled

Makes it closer to reality & very few of them requires it

* Update to the latest sdk version

* make eth_plugin_perform_init() readable

Introduce 2 functions.

* Now properly parses the apdu and displays the total quantity of NFT IDs transferred in ERC1155 batch transfer

* Add NFT prod public keys

* Added extra checks for the chain ID handling

Following the security review

* NFTs now only supported by LNS

* Version bump

Co-authored-by: Alexandre Paillier <alexandre.paillier@ledger.fr>
Co-authored-by: greenknot <greenknot@users.noreply.github.com>
2021-12-17 12:04:51 +01:00