diff options
Diffstat (limited to 'app/scripts/controllers/network/network.js')
-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 = { |