Skip to content

Commit

Permalink
Adding ChainID Currency Symbol Map (#22292)
Browse files Browse the repository at this point in the history
We want a ChainID: Ticker Map for future validation on some of our more
commonly used networks. This PR adds that mapping constant, changes
Optimism's "OP" ticker to "ETH" and fixes a resulting unit test failure.

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Fixes: [#1708
](MetaMask/MetaMask-planning#1708)

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [X] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've clearly explained what problem this PR is solving and how it
is solved.
- [X] I've linked related issues
- [X] I've included manual testing steps
- [X] I've included screenshots/recordings if applicable
- [X] I’ve included tests if applicable
- [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [X] I’ve properly set the pull request status:
  - [X] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Dan J Miller <[email protected]>
  • Loading branch information
2 people authored and DDDDDanica committed Dec 18, 2023
1 parent 307e7c0 commit c8e8a10
Show file tree
Hide file tree
Showing 7 changed files with 425 additions and 114 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
- Updated onboarding flow to ensure user is prompted for password during reminder based backup [#22307](https://github.com/MetaMask/metamask-extension/pull/22297)

### Fixed
- Fixed QR scan functionality when sending a transaction to another contact [#22297](https://github.com/MetaMask/metamask-extension/pull/22297)
Expand Down
264 changes: 245 additions & 19 deletions shared/constants/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,61 @@ export const CHAIN_IDS = {
CRONOS: '0x19',
GNOSIS: '0x64',
ZKSYNC_ERA: '0x144',
TEST_ETH: '0x539',
} as const;

const CHAINLIST_CHAIN_IDS_MAP = {
...CHAIN_IDS,
SCROLL: '0x82750',
ZORA_MAINNET: '0x76adf1',
TAIKO_JOLNIR_L2_MAINNET: '0x28c5f',
POLYGON_ZKEVM: '0x44d',
FANTOM_OPERA: '0xfa',
CELO_MAINNET: '0xa4ec',
ARBITRUM_NOVA: '0xa4ba',
MANTLE: '0x1388',
CORE_BLOCKCHAIN_MAINNET: '0x45c',
MANTA_PACIFIC_MAINNET: '0xa9',
PULSECHAIN_MAINNET: '0x171',
FUSE_GOLD_MAINNET: '0x7a',
KAVA_EVM: '0x8ae',
DFK_CHAIN: '0xd2af',
HARMONY_MAINNET_SHARD_0: '0x63564c40',
PGN_PUBLIC_GOODS_NETWORK: '0x1a8',
LIGHTLINK_PHOENIX_MAINNET: '0x762',
NEAR_AURORA_MAINNET: '0x4e454152',
KROMA_MAINNET: '0xff',
NEBULA_MAINNET: '0x585eb4b1',
KLAYTN_MAINNET_CYPRESS: '0x2019',
ENDURANCE_SMART_CHAIN_MAINNET: '0x288',
CRONOS_MAINNET_BETA: '0x19',
FLARE_MAINNET: '0xe',
KCC_MAINNET: '0x141',
SHARDEUM_SPHINX_1X: '0x1f92',
ETHEREUM_CLASSIC_MAINNET: '0x3d',
HAQQ_NETWORK: '0x2be3',
SHARDEUM_LIBERTY_2X: '0x1f91',
BLACKFORT_EXCHANGE_NETWORK: '0x1387',
CONFLUX_ESPACE: '0x406',
FUSE_MAINNET: '0x7a',
CANTO: '0x1e14',
SHIB_MAINNET: '0x1b',
OKXCHAIN_MAINNET: '0x42',
ZKATANA: '0x133e40',
DEXALOT_SUBNET: '0x6984c',
ASTAR: '0x250',
EVMOS: '0x2329',
BAHAMUT_MAINNET: '0x142d',
SONGBIRD_CANARY_NETWORK: '0x13',
STEP_NETWORK: '0x4d2',
VELAS_EVM_MAINNET: '0x6a',
Q_MAINNET: '0x8a71',
TELOS_EVM_MAINNET: '0x28',
TENET: '0x617',
DOGECHAIN_MAINNET: '0x7d0',
OASYS_MAINNET: '0xf8',
HUOBI_ECO_CHAIN_MAINNET: '0x80',
ACALA_NETWORK: '0x313',
} as const;

/**
Expand All @@ -167,11 +222,11 @@ export const OPTIMISM_DISPLAY_NAME = 'OP Mainnet';
export const FANTOM_DISPLAY_NAME = 'Fantom Opera';
export const HARMONY_DISPLAY_NAME = 'Harmony Mainnet Shard 0';
export const PALM_DISPLAY_NAME = 'Palm';
export const AURORA_DISPLAY_NAME = 'Aurora Mainnet';
export const CELO_DISPLAY_NAME = 'Celo Mainnet';
export const GNOSIS_DISPLAY_NAME = 'Gnosis';
export const ZK_SYNC_ERA_DISPLAY_NAME = 'zkSync Era Mainnet';
export const BASE_DISPLAY_NAME = 'Base Mainnet';
export const AURORA_ETH_DISPLAY_NAME = 'Aurora';

export const infuraProjectId = process.env.INFURA_PROJECT_ID;
export const getRpcUrl = ({
Expand Down Expand Up @@ -203,7 +258,6 @@ export const LOCALHOST_RPC_URL = 'http://localhost:8545';
*/
export const CURRENCY_SYMBOLS = {
ARBITRUM: 'ETH',
AURORA_ETH: 'AURORA ETH',
AVALANCHE: 'AVAX',
BNB: 'BNB',
BUSD: 'BUSD',
Expand All @@ -219,13 +273,72 @@ export const CURRENCY_SYMBOLS = {
USDC: 'USDC',
USDT: 'USDT',
WETH: 'WETH',
OPTIMISM: 'OP',
OPTIMISM: 'ETH',
CRONOS: 'CRO',
GLIMMER: 'GLMR',
MOONRIVER: 'MOVR',
ONE: 'ONE',
} as const;

const CHAINLIST_CURRENCY_SYMBOLS_MAP = {
...CURRENCY_SYMBOLS,
BASE: 'ETH',
LINEA_MAINNET: 'ETH',
OPBNB: 'BNB',
ZKSYNC_ERA: 'ETH',
SCROLL: 'ETH',
ZORA_MAINNET: 'ETH',
TAIKO_JOLNIR_L2_MAINNET: 'ETH',
POLYGON_ZKEVM: 'ETH',
FANTOM_OPERA: 'FTM',
CELO_MAINNET: 'CELO',
ARBITRUM_NOVA: 'ETH',
MANTLE: 'MNT',
CORE_BLOCKCHAIN_MAINNET: 'CORE',
MANTA_PACIFIC_MAINNET: 'ETH',
PULSECHAIN_MAINNET: 'PLS',
MOONBEAM: 'GLMR',
FUSE_GOLD_MAINNET: 'FUSE',
KAVA_EVM: 'KAVA',
DFK_CHAIN: 'JEWEL',
HARMONY_MAINNET_SHARD_0: 'ONE',
PGN_PUBLIC_GOODS_NETWORK: 'ETH',
LIGHTLINK_PHOENIX_MAINNET: 'ETH',
NEAR_AURORA_MAINNET: 'ETH',
KROMA_MAINNET: 'ETH',
NEBULA_MAINNET: 'sFUEL',
KLAYTN_MAINNET_CYPRESS: 'KLAY',
ENDURANCE_SMART_CHAIN_MAINNET: 'ACE',
CRONOS_MAINNET_BETA: 'CRO',
FLARE_MAINNET: 'FLR',
KCC_MAINNET: 'KCS',
SHARDEUM_SPHINX_1X: 'SHM',
ETHEREUM_CLASSIC_MAINNET: 'ETC',
HAQQ_NETWORK: 'ISLM',
SHARDEUM_LIBERTY_2X: 'SHM',
BLACKFORT_EXCHANGE_NETWORK: 'BXN',
CONFLUX_ESPACE: 'CFX',
FUSE_MAINNET: 'FUSE',
CANTO: 'CANTO',
SHIB_MAINNET: 'SHIB',
OKXCHAIN_MAINNET: 'OKT',
ZKATANA: 'ETH',
DEXALOT_SUBNET: 'ALOT',
ASTAR: 'ASTR',
EVMOS: 'EVMOS',
BAHAMUT_MAINNET: 'FTN',
SONGBIRD_CANARY_NETWORK: 'SGB',
STEP_NETWORK: 'FITFI',
VELAS_EVM_MAINNET: 'VLX',
Q_MAINNET: 'Q',
TELOS_EVM_MAINNET: 'TLOS',
TENET: 'TENET',
DOGECHAIN_MAINNET: 'DOGE',
OASYS_MAINNET: 'OAS',
HUOBI_ECO_CHAIN_MAINNET: 'HT',
ACALA_NETWORK: 'ACA',
} as const;

export const ETH_TOKEN_IMAGE_URL = './images/eth_logo.png';
export const LINEA_GOERLI_TOKEN_IMAGE_URL = './images/linea-logo-testnet.png';
export const LINEA_MAINNET_TOKEN_IMAGE_URL = './images/linea-logo-mainnet.png';
Expand All @@ -238,7 +351,6 @@ export const FTM_TOKEN_IMAGE_URL = './images/fantom-opera.svg';
export const HARMONY_ONE_TOKEN_IMAGE_URL = './images/harmony-one.svg';
export const OPTIMISM_TOKEN_IMAGE_URL = './images/optimism.svg';
export const PALM_TOKEN_IMAGE_URL = './images/palm.svg';
export const AURORA_TOKEN_IMAGE_URL = './images/aurora.png';
export const CELO_TOKEN_IMAGE_URL = './images/celo.svg';
export const GNOSIS_TOKEN_IMAGE_URL = './images/gnosis.svg';
export const ZK_SYNC_ERA_TOKEN_IMAGE_URL = './images/zk-sync.svg';
Expand All @@ -259,6 +371,11 @@ export const TEST_CHAINS = [
CHAIN_IDS.LOCALHOST,
];

export const MAINNET_CHAINS = [
{ chainId: CHAIN_IDS.MAINNET },
{ chainId: CHAIN_IDS.LINEA_MAINNET },
];

const typedCapitalize = <K extends string>(k: K): Capitalize<K> =>
capitalize(k) as Capitalize<typeof k>;

Expand Down Expand Up @@ -340,6 +457,120 @@ export const NETWORK_TO_NAME_MAP = {
[CHAIN_IDS.LOCALHOST]: LOCALHOST_DISPLAY_NAME,
} as const;

export const CHAIN_ID_TO_CURRENCY_SYMBOL_MAP = {
[CHAINLIST_CHAIN_IDS_MAP.AVALANCHE]: CHAINLIST_CURRENCY_SYMBOLS_MAP.AVALANCHE,
[CHAINLIST_CHAIN_IDS_MAP.BSC]: CHAINLIST_CURRENCY_SYMBOLS_MAP.BNB,
[CHAINLIST_CHAIN_IDS_MAP.BASE]: CHAINLIST_CURRENCY_SYMBOLS_MAP.BASE,
[CHAINLIST_CHAIN_IDS_MAP.ARBITRUM]: CHAINLIST_CURRENCY_SYMBOLS_MAP.ARBITRUM,
[CHAINLIST_CHAIN_IDS_MAP.LINEA_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.LINEA_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.MAINNET]: CHAINLIST_CURRENCY_SYMBOLS_MAP.ETH,
[CHAINLIST_CHAIN_IDS_MAP.OPBNB]: CHAINLIST_CURRENCY_SYMBOLS_MAP.OPBNB,
[CHAINLIST_CHAIN_IDS_MAP.OPTIMISM]: CHAINLIST_CURRENCY_SYMBOLS_MAP.OPTIMISM,
[CHAINLIST_CHAIN_IDS_MAP.POLYGON]: CHAINLIST_CURRENCY_SYMBOLS_MAP.MATIC,
[CHAINLIST_CHAIN_IDS_MAP.ZKSYNC_ERA]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.ZKSYNC_ERA,
[CHAINLIST_CHAIN_IDS_MAP.GOERLI]:
TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.GOERLI],
[CHAINLIST_CHAIN_IDS_MAP.SEPOLIA]:
TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.SEPOLIA],
[CHAINLIST_CHAIN_IDS_MAP.LINEA_GOERLI]:
TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.LINEA_GOERLI],
[CHAINLIST_CHAIN_IDS_MAP.SCROLL]: CHAINLIST_CURRENCY_SYMBOLS_MAP.SCROLL,
[CHAINLIST_CHAIN_IDS_MAP.ZORA_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.ZORA_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.TAIKO_JOLNIR_L2_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.TAIKO_JOLNIR_L2_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.POLYGON_ZKEVM]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.POLYGON_ZKEVM,
[CHAINLIST_CHAIN_IDS_MAP.FANTOM_OPERA]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.FANTOM_OPERA,
[CHAINLIST_CHAIN_IDS_MAP.CELO_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.CELO_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.ARBITRUM_NOVA]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.ARBITRUM_NOVA,
[CHAINLIST_CHAIN_IDS_MAP.MANTLE]: CHAINLIST_CURRENCY_SYMBOLS_MAP.MANTLE,
[CHAINLIST_CHAIN_IDS_MAP.GNOSIS]: CHAINLIST_CURRENCY_SYMBOLS_MAP.GNOSIS,
[CHAINLIST_CHAIN_IDS_MAP.CORE_BLOCKCHAIN_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.CORE_BLOCKCHAIN_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.MANTA_PACIFIC_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.MANTA_PACIFIC_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.PULSECHAIN_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.PULSECHAIN_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.MOONBEAM]: CHAINLIST_CURRENCY_SYMBOLS_MAP.MOONBEAM,
[CHAINLIST_CHAIN_IDS_MAP.FUSE_GOLD_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.FUSE_GOLD_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.KAVA_EVM]: CHAINLIST_CURRENCY_SYMBOLS_MAP.KAVA_EVM,
[CHAINLIST_CHAIN_IDS_MAP.DFK_CHAIN]: CHAINLIST_CURRENCY_SYMBOLS_MAP.DFK_CHAIN,
[CHAINLIST_CHAIN_IDS_MAP.HARMONY_MAINNET_SHARD_0]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.HARMONY_MAINNET_SHARD_0,
[CHAINLIST_CHAIN_IDS_MAP.PGN_PUBLIC_GOODS_NETWORK]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.PGN_PUBLIC_GOODS_NETWORK,
[CHAINLIST_CHAIN_IDS_MAP.LIGHTLINK_PHOENIX_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.LIGHTLINK_PHOENIX_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.NEAR_AURORA_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.NEAR_AURORA_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.KROMA_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.KROMA_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.NEBULA_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.NEBULA_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.KLAYTN_MAINNET_CYPRESS]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.KLAYTN_MAINNET_CYPRESS,
[CHAINLIST_CHAIN_IDS_MAP.MOONRIVER]: CHAINLIST_CURRENCY_SYMBOLS_MAP.MOONRIVER,
[CHAINLIST_CHAIN_IDS_MAP.ENDURANCE_SMART_CHAIN_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.ENDURANCE_SMART_CHAIN_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.CRONOS_MAINNET_BETA]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.CRONOS_MAINNET_BETA,
[CHAINLIST_CHAIN_IDS_MAP.FLARE_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.FLARE_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.KCC_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.KCC_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.SHARDEUM_SPHINX_1X]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.SHARDEUM_SPHINX_1X,
[CHAINLIST_CHAIN_IDS_MAP.ETHEREUM_CLASSIC_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.ETHEREUM_CLASSIC_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.HAQQ_NETWORK]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.HAQQ_NETWORK,
[CHAINLIST_CHAIN_IDS_MAP.SHARDEUM_LIBERTY_2X]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.SHARDEUM_LIBERTY_2X,
[CHAINLIST_CHAIN_IDS_MAP.BLACKFORT_EXCHANGE_NETWORK]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.BLACKFORT_EXCHANGE_NETWORK,
[CHAINLIST_CHAIN_IDS_MAP.CONFLUX_ESPACE]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.CONFLUX_ESPACE,
[CHAINLIST_CHAIN_IDS_MAP.FUSE_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.FUSE_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.CANTO]: CHAINLIST_CURRENCY_SYMBOLS_MAP.CANTO,
[CHAINLIST_CHAIN_IDS_MAP.SHIB_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.SHIB_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.OKXCHAIN_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.OKXCHAIN_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.ZKATANA]: CHAINLIST_CURRENCY_SYMBOLS_MAP.ZKATANA,
[CHAINLIST_CHAIN_IDS_MAP.DEXALOT_SUBNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.DEXALOT_SUBNET,
[CHAINLIST_CHAIN_IDS_MAP.ASTAR]: CHAINLIST_CURRENCY_SYMBOLS_MAP.ASTAR,
[CHAINLIST_CHAIN_IDS_MAP.EVMOS]: CHAINLIST_CURRENCY_SYMBOLS_MAP.EVMOS,
[CHAINLIST_CHAIN_IDS_MAP.BAHAMUT_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.BAHAMUT_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.SONGBIRD_CANARY_NETWORK]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.SONGBIRD_CANARY_NETWORK,
[CHAINLIST_CHAIN_IDS_MAP.STEP_NETWORK]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.STEP_NETWORK,
[CHAINLIST_CHAIN_IDS_MAP.VELAS_EVM_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.VELAS_EVM_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.Q_MAINNET]: CHAINLIST_CURRENCY_SYMBOLS_MAP.Q_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.TELOS_EVM_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.TELOS_EVM_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.TENET]: CHAINLIST_CURRENCY_SYMBOLS_MAP.TENET,
[CHAINLIST_CHAIN_IDS_MAP.DOGECHAIN_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.DOGECHAIN_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.OASYS_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.OASYS_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.HUOBI_ECO_CHAIN_MAINNET]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.HUOBI_ECO_CHAIN_MAINNET,
[CHAINLIST_CHAIN_IDS_MAP.ACALA_NETWORK]:
CHAINLIST_CURRENCY_SYMBOLS_MAP.ACALA_NETWORK,
} as const;

export const CHAIN_ID_TO_TYPE_MAP = {
[CHAIN_IDS.MAINNET]: NETWORK_TYPES.MAINNET,
[CHAIN_IDS.GOERLI]: NETWORK_TYPES.GOERLI,
Expand Down Expand Up @@ -370,7 +601,6 @@ export const CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP = {
[CHAIN_IDS.HARMONY]: HARMONY_ONE_TOKEN_IMAGE_URL,
[CHAIN_IDS.OPTIMISM]: OPTIMISM_TOKEN_IMAGE_URL,
[CHAIN_IDS.PALM]: PALM_TOKEN_IMAGE_URL,
[CHAIN_IDS.AURORA]: AURORA_TOKEN_IMAGE_URL,
[CHAIN_IDS.CELO]: CELO_TOKEN_IMAGE_URL,
[CHAIN_IDS.GNOSIS]: GNOSIS_TOKEN_IMAGE_URL,
} as const;
Expand All @@ -383,16 +613,15 @@ export const CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP = {
[CHAIN_IDS.LINEA_MAINNET]: NETWORK_TYPES.LINEA_MAINNET,
} as const;

export const NATIVE_CURRENCY_TOKEN_IMAGE_MAP = {
[CURRENCY_SYMBOLS.ETH]: ETH_TOKEN_IMAGE_URL,
[CURRENCY_SYMBOLS.TEST_ETH]: TEST_ETH_TOKEN_IMAGE_URL,
[CURRENCY_SYMBOLS.BNB]: BNB_TOKEN_IMAGE_URL,
[CURRENCY_SYMBOLS.MATIC]: MATIC_TOKEN_IMAGE_URL,
[CURRENCY_SYMBOLS.AVALANCHE]: AVAX_TOKEN_IMAGE_URL,
[CURRENCY_SYMBOLS.OPTIMISM]: OPTIMISM_TOKEN_IMAGE_URL,
[CURRENCY_SYMBOLS.CELO]: CELO_TOKEN_IMAGE_URL,
[CURRENCY_SYMBOLS.AURORA_ETH]: ETH_TOKEN_IMAGE_URL,
[CURRENCY_SYMBOLS.GNOSIS]: GNOSIS_TOKEN_IMAGE_URL,
export const CHAIN_ID_TOKEN_IMAGE_MAP = {
[CHAIN_IDS.MAINNET]: ETH_TOKEN_IMAGE_URL,
[CHAIN_IDS.TEST_ETH]: TEST_ETH_TOKEN_IMAGE_URL,
[CHAIN_IDS.BSC]: BNB_TOKEN_IMAGE_URL,
[CHAIN_IDS.POLYGON]: MATIC_TOKEN_IMAGE_URL,
[CHAIN_IDS.AVALANCHE]: AVAX_TOKEN_IMAGE_URL,
[CHAIN_IDS.OPTIMISM]: OPTIMISM_TOKEN_IMAGE_URL,
[CHAIN_IDS.CELO]: CELO_TOKEN_IMAGE_URL,
[CHAIN_IDS.GNOSIS]: GNOSIS_TOKEN_IMAGE_URL,
} as const;

export const INFURA_BLOCKED_KEY = 'countryBlocked';
Expand Down Expand Up @@ -525,6 +754,7 @@ export const BUYABLE_CHAINS_MAP: {
| typeof CHAIN_IDS.GOERLI
| typeof CHAIN_IDS.SEPOLIA
| typeof CHAIN_IDS.GNOSIS
| typeof CHAIN_IDS.AURORA
>]: BuyableChainSettings;
} = {
[CHAIN_IDS.MAINNET]: {
Expand Down Expand Up @@ -571,10 +801,6 @@ export const BUYABLE_CHAINS_MAP: {
nativeCurrency: CURRENCY_SYMBOLS.MOONRIVER,
network: 'moonriver',
},
[CHAIN_IDS.AURORA]: {
nativeCurrency: CURRENCY_SYMBOLS.AURORA_ETH,
network: 'aurora',
},
[CHAIN_IDS.HARMONY]: {
nativeCurrency: CURRENCY_SYMBOLS.ONE,
network: 'harmony',
Expand Down
Loading

0 comments on commit c8e8a10

Please sign in to comment.