mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Disable swaps whenever the environment is not development or testing, so that behaviour follows production for QA purposes (#14499)
This commit is contained in:
parent
ce77be6402
commit
617b7828a5
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user