1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-21 13:58:08 +00:00

ethereum: fixed tokenByChainAddress() to use 32bit chain_id (#398)

This commit is contained in:
HackyMiner 2018-08-14 18:21:54 +09:00 committed by Pavol Rusnak
parent df5348fb14
commit 47de7ff639
2 changed files with 3 additions and 3 deletions

View File

@ -722,7 +722,7 @@ const TokenType tokens[TOKENS_COUNT] = {
const TokenType *UnknownToken = (const TokenType *)1; 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; if (!address) return 0;
for (int i = 0; i < TOKENS_COUNT; i++) { for (int i = 0; i < TOKENS_COUNT; i++) {

View File

@ -25,7 +25,7 @@
#define TOKENS_COUNT 716 #define TOKENS_COUNT 716
typedef struct { typedef struct {
uint8_t chain_id; uint32_t chain_id;
const char * const address; const char * const address;
const char * const ticker; const char * const ticker;
int decimals; int decimals;
@ -35,6 +35,6 @@ extern const TokenType tokens[TOKENS_COUNT];
extern const TokenType *UnknownToken; 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 #endif