mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +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) {
|
export function getIsSwapsChain(state) {
|
||||||
const chainId = getCurrentChainId(state);
|
const chainId = getCurrentChainId(state);
|
||||||
const isProduction = process.env.METAMASK_ENVIRONMENT === 'production';
|
const isNotDevelopment =
|
||||||
return isProduction
|
process.env.METAMASK_ENVIRONMENT !== 'development' ||
|
||||||
|
process.env.METAMASK_ENVIRONMENT !== 'testing';
|
||||||
|
return isNotDevelopment
|
||||||
? ALLOWED_PROD_SWAPS_CHAIN_IDS.includes(chainId)
|
? ALLOWED_PROD_SWAPS_CHAIN_IDS.includes(chainId)
|
||||||
: ALLOWED_DEV_SWAPS_CHAIN_IDS.includes(chainId);
|
: ALLOWED_DEV_SWAPS_CHAIN_IDS.includes(chainId);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user