diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index c7bfe7f10..49dc9cccc 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -670,8 +670,10 @@ export function getSwapsDefaultToken(state) { export function getIsSwapsChain(state) { const chainId = getCurrentChainId(state); - const isProduction = process.env.METAMASK_ENVIRONMENT === 'production'; - return isProduction + const isNotDevelopment = + process.env.METAMASK_ENVIRONMENT !== 'development' || + process.env.METAMASK_ENVIRONMENT !== 'testing'; + return isNotDevelopment ? ALLOWED_PROD_SWAPS_CHAIN_IDS.includes(chainId) : ALLOWED_DEV_SWAPS_CHAIN_IDS.includes(chainId); }