diff --git a/shared/constants/network.ts b/shared/constants/network.ts index f7979eb85..50c1ba903 100644 --- a/shared/constants/network.ts +++ b/shared/constants/network.ts @@ -140,6 +140,8 @@ export const CHAIN_IDS = { OPTIMISM_TESTNET: '0x1a4', BASE: '0x2105', BASE_TESTNET: '0x14a33', + OPBNB: '0xcc', + OPBNB_TESTNET: '0x15eb', POLYGON: '0x89', POLYGON_TESTNET: '0x13881', AVALANCHE: '0xa86a', @@ -557,6 +559,8 @@ export const BUYABLE_CHAINS_MAP: { | typeof CHAIN_IDS.OPTIMISM_TESTNET | typeof CHAIN_IDS.BASE_TESTNET | typeof CHAIN_IDS.BASE + | typeof CHAIN_IDS.OPBNB_TESTNET + | typeof CHAIN_IDS.OPBNB | typeof CHAIN_IDS.BSC_TESTNET | typeof CHAIN_IDS.POLYGON_TESTNET | typeof CHAIN_IDS.AVALANCHE_TESTNET diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 4a2a50698..4d77bcec8 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -1353,13 +1353,21 @@ export function getIsBase(state) { ); } +export function getIsOpbnb(state) { + return ( + getCurrentChainId(state) === CHAIN_IDS.OPBNB || + getCurrentChainId(state) === CHAIN_IDS.OPBNB_TESTNET + ); +} + export function getIsOpStack(state) { - return getIsOptimism(state) || getIsBase(state); + return getIsOptimism(state) || getIsBase(state) || getIsOpbnb(state); } export function getIsMultiLayerFeeNetwork(state) { return getIsOpStack(state); } + /** * To retrieve the maxBaseFee and priorityFee the user has set as default *