From 47de7ff63931a55e92e816ee25104b80c39176d8 Mon Sep 17 00:00:00 2001 From: HackyMiner Date: Tue, 14 Aug 2018 18:21:54 +0900 Subject: [PATCH] ethereum: fixed tokenByChainAddress() to use 32bit chain_id (#398) --- firmware/ethereum_tokens.c | 2 +- firmware/ethereum_tokens.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/ethereum_tokens.c b/firmware/ethereum_tokens.c index b7d89ec207..1c9bffe7aa 100644 --- a/firmware/ethereum_tokens.c +++ b/firmware/ethereum_tokens.c @@ -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++) { diff --git a/firmware/ethereum_tokens.h b/firmware/ethereum_tokens.h index 1b60e594e3..c8383f0a04 100644 --- a/firmware/ethereum_tokens.h +++ b/firmware/ethereum_tokens.h @@ -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