mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-21 05:48:23 +00:00
ethereum: fixed tokenByChainAddress() to use 32bit chain_id (#398)
This commit is contained in:
parent
df5348fb14
commit
47de7ff639
@ -722,7 +722,7 @@ const TokenType tokens[TOKENS_COUNT] = {
|
||||
|
||||
const TokenType *UnknownToken = (const TokenType *)1;
|
||||
|
||||
const TokenType *tokenByChainAddress(uint8_t chain_id, const uint8_t *address)
|
||||
const TokenType *tokenByChainAddress(uint32_t chain_id, const uint8_t *address)
|
||||
{
|
||||
if (!address) return 0;
|
||||
for (int i = 0; i < TOKENS_COUNT; i++) {
|
||||
|
@ -25,7 +25,7 @@
|
||||
#define TOKENS_COUNT 716
|
||||
|
||||
typedef struct {
|
||||
uint8_t chain_id;
|
||||
uint32_t chain_id;
|
||||
const char * const address;
|
||||
const char * const ticker;
|
||||
int decimals;
|
||||
@ -35,6 +35,6 @@ extern const TokenType tokens[TOKENS_COUNT];
|
||||
|
||||
extern const TokenType *UnknownToken;
|
||||
|
||||
const TokenType *tokenByChainAddress(uint8_t chain_id, const uint8_t *address);
|
||||
const TokenType *tokenByChainAddress(uint32_t chain_id, const uint8_t *address);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user