Commit Graph

53 Commits

Author SHA1 Message Date
pscott
d541f1f524 Add pointer to msg_sender in Eth_plugin_finalize (#170)
* Add some PRINTF debug statements and fir additional screens init

* Memzero struture and use two pointers less

* Clang-format

* Use ADDRESS_LENGTH where possible; Add printf statements when failing to compare contracts

* clang-format

* Remove 'token1' and 'token2' locals

* Fix typo

* apply clang-format

* Add bip32path to sharedRO for plugins

* Change getEthAddressStringFromKey to accept char instead of uint8_t

* Update ethereum plugin sdk

* Add BYPASS_SIGNATURES compilation option

* Remove bip32path and pathLength from sharedRO; add msg_sender pointer to pluginFinalize.address

* clang format eth_plugin_interface

* Update submodule

* Set address BEFORE making the finalize call

* Update SDK

Co-authored-by: TamtamHero <10632523+TamtamHero@users.noreply.github.com>
2021-07-09 11:46:36 +02:00
pscott
b646cf1b28 Fix compilation warnings (#159)
* Fix easy warnings for sdk 2.0

* Add attribute unused to bagl_elemt_t in callback functions

* Add attribute unused to io_event function

* Clang-format

* Use elfs from CI in tests (#167)

* Add Nano X build

* Use CI's build artifacts for CI's tests

* 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>

Co-authored-by: Jean P <10632523+TamtamHero@users.noreply.github.com>
2021-07-05 11:01:51 +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
Jean-Baptiste Bédrune
ea7d3754c6 Fix compilation waring in eth sdk 2021-06-08 10:24:52 +02:00
TamtamHero
82bf81cca6 Remove dead code + expand allzeroes usage to bigger integers 2021-06-08 10:24:51 +02:00
pscott
a05ac69808 clang-format 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
27b380ff0a Add a check for transaction type when checking for end of parsing 2021-05-20 20:18:48 +02:00
pscott
704c34a5d5 Rename to PARSING_IS_DONE 2021-04-21 17:15:43 +02:00
pscott
cac2b95136 Remove printf when parsing legacy tx 2021-04-21 17:11:51 +02:00
pscott
fa0dacb447 Remove printf when parsing chainID 2021-04-21 17:10:58 +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
pscott
5dd99c3d48 Move TxType parsing in cmd_signTx and add 0x6501 error 2021-04-15 17:59:41 +02:00
pscott
6ccc36fa39 Move txType parsing outside of forloop 2021-04-15 17:08:09 +02:00
pscott
01fd39ea96 Add LEGACY_TX 2021-04-15 16:20:39 +02:00
pscott
99950a396c Add max and min values and restrict bounds 2021-04-15 16:19:12 +02:00
pscott
9876999b8d Enumerate through variants 2021-04-15 16:13:42 +02:00
pscott
9e6610c56a Fix debug messages 2021-04-15 15:42:46 +02:00
pscott
65ac116e91 Restrict txType to be within enum bounds 2021-04-15 15:38:38 +02:00
pscott
9c20c54013 Apply clang format 2021-04-15 15:37:26 +02:00
pscott
3faa172ec2 Add MAX and MIN tx types 2021-04-15 15:36:21 +02:00
pscott
48562ccfc7 Add TransactionType and adapt parser to parse them 2021-04-15 15:25:46 +02:00
Jean P
b09ba946d5 Merge pull request #127 from LedgerHQ/fix_warning_1.6
Fix compilation warnings for 1.6.1-2 and NanoX sdk
2021-03-25 12:42:12 +01:00
pscott
9a798e3662 Fix warnings for nanox sdk 2021-03-24 16:32:08 +01:00
pscott
b2d5b85a2f Add nonce display settings ; nonce is always displayed 2021-02-05 17:36:54 +01: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
eac45259da Remove trailing whitespaces 2020-10-07 16:56:40 +02:00
TamtamHero
9d4dfbe1bf Add Swap feature 2020-09-14 14:43:36 +02:00
BTChip github
8d0544bf68 Merge Starkware branch 2020-06-27 13:24:04 +02:00
Olivier Hériveaux
9d4a20c290 Minor code improvement
Using MIN instead of ternary operator for better code in ethUstream.c.
2020-04-14 19:43:20 +02:00
BTChip github
658164ae18 Remove CX_COMPLIANCE_141 2020-01-18 12:46:37 +01:00
Clément Péron
f75adced1d Use correct include headers
Some headers are overkilled, and the order should be

/* LibC */
include <stdxxx.h>

/* Framework */
include <os.h>

/* Local */
include "EthUstream.h"
2019-01-16 11:10:35 +01:00
Clément Péron
649d5ebe26 update header license 2019-01-16 11:10:35 +01:00
Clément Péron
6af656c5ce Add Include macro guards 2019-01-16 11:10:34 +01:00
Clément Péron
056dc0099e Remove trailing spaces
find -name '*.c' -o -name '*.h' -o -name 'Makefile' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i
2018-12-19 17:05:59 +01:00
BTChip github
051742a289 Fix checksum altogether 2018-08-06 23:46:37 +02:00
BTChip github
6308202cbb Fix EIP 1191 2018-08-06 23:05:22 +02:00
BTChip github
b9e1e4e42d Add EIP 1191 checksum support (RSK) 2018-08-02 11:16:25 +02:00
BTChip github
adfcb0e6ec Display the data being signed 2018-07-31 19:59:59 +02:00
BTChip github
8260268b02 Supports 32 bits chainId for signature and matching - the returned V will be wrong and has to be recomputed by the client 2018-07-28 17:36:12 +02:00
BTChip github
c276531c83 Update to U2F managed SDK - add forks 2018-07-27 21:02:24 +02:00
BTChip github
a954625362 Fix non decimal display glitch 2017-05-31 21:48:49 +02:00
BTChip
0c094f4fe6 ERC-20 tokens support for a simple set of tokens - display additional transaction details 2017-02-04 13:14:24 +01:00
BTChip
7083e3bc74 Blue compliant debugging 2017-01-22 18:25:42 +01:00
BTChip
54ea8ac82e EIP 155 support. Free up some RAM for U2F buffers 2016-11-25 09:10:04 +01:00
BTChip
533c14adc2 Remove copypasta invalid check for contract data size 2016-10-17 23:36:29 +02:00
BTChip
893c9820e4 Handle to: destination length to detect a null contract address 2016-10-17 23:35:55 +02:00
BTChip
40df08c386 Add multiplication support for fees computations instead of displaying startgas and gasprice 2016-10-17 23:34:07 +02:00
BTChip
34310ef17c Fix display for < 1 ETH values 2016-08-28 23:38:27 +02:00