1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00

ethereum: add new networks

This commit is contained in:
Pavol Rusnak 2018-06-21 15:52:23 +02:00
parent 156fab867b
commit a1379371a0
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -244,18 +244,24 @@ static void ethereumFormatAmount(const bignum256 *amnt, const TokenType *token,
if (tx_type == 1 || tx_type == 6) { if (tx_type == 1 || tx_type == 6) {
suffix = " WAN"; suffix = " WAN";
} else { } else {
// constants from trezor-common/defs/ethereum/networks.json
switch (chain_id) { switch (chain_id) {
case 1: suffix = " ETH"; break; // Ethereum Mainnet case 1: suffix = " ETH"; break; // Ethereum
case 61: suffix = " ETC"; break; // Ethereum Classic Mainnet
case 62: suffix = " tETC"; break; // Ethereum Classic Testnet
case 30: suffix = " RSK"; break; // Rootstock Mainnet
case 31: suffix = " tRSK"; break; // Rootstock Testnet
case 3: suffix = " tETH"; break; // Ethereum Testnet: Ropsten
case 4: suffix = " tETH"; break; // Ethereum Testnet: Rinkeby
case 42: suffix = " tETH"; break; // Ethereum Testnet: Kovan
case 2: suffix = " EXP"; break; // Expanse case 2: suffix = " EXP"; break; // Expanse
case 3: suffix = " tETH"; break; // Ethereum Testnet Ropsten
case 4: suffix = " tETH"; break; // Ethereum Testnet Rinkeby
case 8: suffix = " UBQ"; break; // UBIQ case 8: suffix = " UBQ"; break; // UBIQ
default: suffix = " UNKN"; break; // unknown chain case 20: suffix = " EOSC"; break; // EOS Classic
case 28: suffix = " ETSC"; break; // Ethereum Social
case 30: suffix = " RSK"; break; // RSK
case 31: suffix = " tRSK"; break; // RSK Testnet
case 42: suffix = " tETH"; break; // Ethereum Testnet Kovan
case 61: suffix = " ETC"; break; // Ethereum Classic
case 62: suffix = " tETC"; break; // Ethereum Classic Testnet
case 64: suffix = " ELLA"; break; // Ellaism
case 820: suffix = " CLO"; break; // Callisto
case 1987: suffix = " EGEM"; break; // EtherGem
default : suffix = " UNKN"; break; // unknown chain
} }
} }
} }