aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2019-03-29 00:04:31 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-03-29 02:50:11 +0800
commit10097b6a1140d87aef0d8b982115dd6dba90dbe1 (patch)
tree05ddbfb06c437a447733054a66171f8a8191a546 /app
parenta44f2bb6ebe6979efc3c4711147b2420aa290e15 (diff)
downloadtangerine-wallet-browser-10097b6a1140d87aef0d8b982115dd6dba90dbe1.tar
tangerine-wallet-browser-10097b6a1140d87aef0d8b982115dd6dba90dbe1.tar.gz
tangerine-wallet-browser-10097b6a1140d87aef0d8b982115dd6dba90dbe1.tar.bz2
tangerine-wallet-browser-10097b6a1140d87aef0d8b982115dd6dba90dbe1.tar.lz
tangerine-wallet-browser-10097b6a1140d87aef0d8b982115dd6dba90dbe1.tar.xz
tangerine-wallet-browser-10097b6a1140d87aef0d8b982115dd6dba90dbe1.tar.zst
tangerine-wallet-browser-10097b6a1140d87aef0d8b982115dd6dba90dbe1.zip
Default to localhost network when running e2e tests
Diffstat (limited to 'app')
-rw-r--r--app/scripts/controllers/network/network.js12
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 = {