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:
parent
156fab867b
commit
a1379371a0
@ -244,17 +244,23 @@ 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
|
||||||
|
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
|
default : suffix = " UNKN"; break; // unknown chain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user