diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-03-29 21:57:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-29 21:57:05 +0800 |
commit | 125a95ba711f110cec40b79eafc798a31413eef3 (patch) | |
tree | 479bad27e4090fd894d2cfea83d5998078054488 /app | |
parent | c3a605f27a846b72227237cefa6e4590c8a3b2c1 (diff) | |
parent | 3113114d51eeb4ecc469abfbf0685183a7fd996e (diff) | |
download | tangerine-wallet-browser-125a95ba711f110cec40b79eafc798a31413eef3.tar tangerine-wallet-browser-125a95ba711f110cec40b79eafc798a31413eef3.tar.gz tangerine-wallet-browser-125a95ba711f110cec40b79eafc798a31413eef3.tar.bz2 tangerine-wallet-browser-125a95ba711f110cec40b79eafc798a31413eef3.tar.lz tangerine-wallet-browser-125a95ba711f110cec40b79eafc798a31413eef3.tar.xz tangerine-wallet-browser-125a95ba711f110cec40b79eafc798a31413eef3.tar.zst tangerine-wallet-browser-125a95ba711f110cec40b79eafc798a31413eef3.zip |
Merge pull request #6364 from MetaMask/prevent-infura-requests-e2e-tests
Prevent infura requests in e2e tests
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/network/network.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/scripts/controllers/network/network.js b/app/scripts/controllers/network/network.js index 0c6327f6e..47432c1e2 100644 --- a/app/scripts/controllers/network/network.js +++ b/app/scripts/controllers/network/network.js @@ -25,10 +25,18 @@ const INFURA_PROVIDER_TYPES = [ROPSTEN, RINKEBY, KOVAN, MAINNET] const env = process.env.METAMASK_ENV const METAMASK_DEBUG = process.env.METAMASK_DEBUG -const testMode = (METAMASK_DEBUG || env === 'test') + +let defaultProviderConfigType +if (process.env.IN_TEST === 'true') { + defaultProviderConfigType = LOCALHOST +} else if (METAMASK_DEBUG || env === 'test') { + defaultProviderConfigType = RINKEBY +} else { + defaultProviderConfigType = MAINNET +} const defaultProviderConfig = { - type: testMode ? RINKEBY : MAINNET, + type: defaultProviderConfigType, } const defaultNetworkConfig = { |