Commit Graph

26 Commits

Author SHA1 Message Date
Alexandre Paillier
31aff6a95f Removed unused custom strchr function 2022-08-05 18:15:35 +02:00
Jorge Martins
2811917658 Mark pointer to databuffer/workbuffer as const 2022-07-15 12:33:19 +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
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
Salvatore Ingala
29024c0c8b Avoid signed division
Signed-off-by: Edouard Merle <edouard.merle@ledger.fr>
2021-11-17 10:45:35 +01:00
Jean P
408805f751 Fix big amounts (#199)
* Fix wrong display of amounts >= 2^87

* Add test to check that amounts >= 2^87 make the app throw

* Bump v1.9.7 and update changelog
2021-10-04 11:26:01 +02:00
pscott
b2172e4627 Use uint64_t for chainID 2021-08-26 13:02:07 +02:00
pscott
c5fb10dd47 Remove check for v length 2021-08-06 15:20:58 +02:00
pscott
ee4a865144 Use strlcpy instead of strncpy 2021-07-27 12:24:05 +02:00
pscott
a2d9a8068a Add network display (#152)
* Add network name display instead of chainID

* Add display of correct ticker along with network

* Add FTM

* Clang-format

* Add comment in python script

* Rename SIZE_MAX to MAX_SIZE

* Change %u to %d in printf

* Remove needless PIC

* Update comment about get_chain_id()

* Update example script to follow EIP155

* Remove unused PIC calls

* Add whitespace between ticker and amount when using EIP155

* Remove decimal config per network, set back 18 everywhere

* Adapt u32_from_BE to swith cases

* Remove chainid from signTx.py

* Switch to switch in stead of if in get_chain_id

* Revert "Remove chainid from signTx.py"

This reverts commit 454e09f280ec3e3ec1c7d7cc0027247ef4390088.

* Change Ethereum chainid to 1

* Rename chainid_step to network_step

* Adapt finalizeParsing to new chainid for Ethereum

* Update snapshots

* clang-format

* Fix network display logic for clones

* Fix tests

* Add clone tests

Co-authored-by: TamtamHero <10632523+TamtamHero@users.noreply.github.com>
2021-07-02 18:46:23 +02:00
pscott
268ce5d9dd Fix uint256_to_decimal 2021-06-08 10:25:15 +02:00
pscott
5e70ea1736 Update uint256_to_decimal to right-align value 2021-06-08 10:24:52 +02:00
Jean-Baptiste Bédrune
787f158485 Change amountToString prototype 2021-06-08 10:24:52 +02:00
pscott
8592a22542 Clang-format 2021-06-08 10:24:51 +02:00
TamtamHero
a54b4bda1d Fix alignment access issue on nano S 2021-06-08 10:24:51 +02:00
TamtamHero
82bf81cca6 Remove dead code + expand allzeroes usage to bigger integers 2021-06-08 10:24:51 +02:00
TamtamHero
e80207cf6f Add uint256_to_decimal to replace tostring256
TODO: replace tostring256 everywhere
2021-06-08 10:24:51 +02:00
pscott
5fd27ff5ca Use INT256_LENGTH and ADDRESS_LENGTH define 2021-06-08 10:24:51 +02:00
pscott
ebffb48cd3 Use snprintf instead of u32_to_str 2021-04-28 10:48:18 +02:00
pscott
dafdc404ac Add strict parameter to u32_from_BE 2021-04-21 17:07:16 +02:00
pscott
970f0355dd Add support for EIP2718 (enveloppe) and EIP2930 (acess list tx); Display chain ID when different from 1 (ethereum mainnet) 2021-04-21 16:56:17 +02:00
TamtamHero
17bd07a346 Apply clang-format 2020-12-01 16:20:13 +01:00
BTChip github
d43f7f6698 Cleanup os_mem* functions 2020-11-30 18:22:17 +01:00
TamtamHero
9d4dfbe1bf Add Swap feature 2020-09-14 14:43:36 +02:00
Clément Péron
1ad2170560 Move more functions to utils 2019-01-16 11:10:36 +01:00
Clément Péron
334372c12f Split utils function from main 2019-01-16 11:10:36 +01:00