mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Move BSC chain ID, rename some BSC-related vars (#10807)
This commit is contained in:
parent
cd97340bb8
commit
284c2cb481
@ -18,6 +18,7 @@ export const RINKEBY_CHAIN_ID = '0x4';
|
||||
export const GOERLI_CHAIN_ID = '0x5';
|
||||
export const KOVAN_CHAIN_ID = '0x2a';
|
||||
export const LOCALHOST_CHAIN_ID = '0x539';
|
||||
export const BSC_CHAIN_ID = '0x38';
|
||||
|
||||
/**
|
||||
* The largest possible chain ID we can handle.
|
||||
|
@ -5,6 +5,7 @@ import {
|
||||
BNB_SYMBOL,
|
||||
TEST_ETH_TOKEN_IMAGE_URL,
|
||||
BNB_TOKEN_IMAGE_URL,
|
||||
BSC_CHAIN_ID,
|
||||
} from './network';
|
||||
|
||||
export const QUOTES_EXPIRED_ERROR = 'quotes-expired';
|
||||
@ -52,8 +53,7 @@ const BSC_CONTRACT_ADDRESS = '0x1a1ec25dc08e98e5e93f1104b5e5cdd298707d31';
|
||||
|
||||
const METASWAP_ETH_API_HOST = 'https://api.metaswap.codefi.network';
|
||||
|
||||
const METASWAP_BNB_API_HOST = 'https://bsc-api.metaswap.codefi.network';
|
||||
export const BNB_CHAIN_ID = '0x38';
|
||||
const METASWAP_BSC_API_HOST = 'https://bsc-api.metaswap.codefi.network';
|
||||
|
||||
const SWAPS_TESTNET_CHAIN_ID = '0x539';
|
||||
const SWAPS_TESTNET_HOST = 'https://metaswap-api.airswap-dev.codefi.network';
|
||||
@ -63,27 +63,27 @@ const BSC_DEFAULT_BLOCK_EXPLORER_URL = 'https://bscscan.com/';
|
||||
export const ALLOWED_SWAPS_CHAIN_IDS = {
|
||||
[MAINNET_CHAIN_ID]: true,
|
||||
[SWAPS_TESTNET_CHAIN_ID]: true,
|
||||
[BNB_CHAIN_ID]: true,
|
||||
[BSC_CHAIN_ID]: true,
|
||||
};
|
||||
|
||||
export const METASWAP_CHAINID_API_HOST_MAP = {
|
||||
[MAINNET_CHAIN_ID]: METASWAP_ETH_API_HOST,
|
||||
[SWAPS_TESTNET_CHAIN_ID]: SWAPS_TESTNET_HOST,
|
||||
[BNB_CHAIN_ID]: METASWAP_BNB_API_HOST,
|
||||
[BSC_CHAIN_ID]: METASWAP_BSC_API_HOST,
|
||||
};
|
||||
|
||||
export const SWAPS_CHAINID_CONTRACT_ADDRESS_MAP = {
|
||||
[MAINNET_CHAIN_ID]: MAINNET_CONTRACT_ADDRESS,
|
||||
[SWAPS_TESTNET_CHAIN_ID]: TESTNET_CONTRACT_ADDRESS,
|
||||
[BNB_CHAIN_ID]: BSC_CONTRACT_ADDRESS,
|
||||
[BSC_CHAIN_ID]: BSC_CONTRACT_ADDRESS,
|
||||
};
|
||||
|
||||
export const SWAPS_CHAINID_DEFAULT_TOKEN_MAP = {
|
||||
[MAINNET_CHAIN_ID]: ETH_SWAPS_TOKEN_OBJECT,
|
||||
[SWAPS_TESTNET_CHAIN_ID]: TEST_ETH_SWAPS_TOKEN_OBJECT,
|
||||
[BNB_CHAIN_ID]: BNB_SWAPS_TOKEN_OBJECT,
|
||||
[BSC_CHAIN_ID]: BNB_SWAPS_TOKEN_OBJECT,
|
||||
};
|
||||
|
||||
export const SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP = {
|
||||
[BNB_CHAIN_ID]: BSC_DEFAULT_BLOCK_EXPLORER_URL,
|
||||
[BSC_CHAIN_ID]: BSC_DEFAULT_BLOCK_EXPLORER_URL,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user