diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-04-13 05:17:36 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-04-24 01:18:05 +0800 |
commit | 9e41f58af2f236389f11bd1d401da73c0d709b2d (patch) | |
tree | cf3cb4dbc49e4ac9fa4a5d8c4d08c32e9a6e8052 /app/scripts/lib | |
parent | 74c419f9b65841c2966d1fe3b7414bf11e09e0d8 (diff) | |
download | tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.gz tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.bz2 tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.lz tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.xz tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.zst tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.zip |
Clean up network config
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/config-manager.js | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index 63d27c40e..c10ff2f4e 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -1,12 +1,11 @@ const ethUtil = require('ethereumjs-util') const normalize = require('eth-sig-util').normalize -const MetamaskConfig = require('../config.js') - - -const MAINNET_RPC = MetamaskConfig.network.mainnet -const ROPSTEN_RPC = MetamaskConfig.network.ropsten -const KOVAN_RPC = MetamaskConfig.network.kovan -const RINKEBY_RPC = MetamaskConfig.network.rinkeby +const { + MAINNET_RPC_URL, + ROPSTEN_RPC_URL, + KOVAN_RPC_URL, + RINKEBY_RPC_URL, +} = require('../controllers/network/enums') /* The config-manager is a convenience object * wrapping a pojo-migrator. @@ -174,19 +173,19 @@ ConfigManager.prototype.getCurrentRpcAddress = function () { switch (provider.type) { case 'mainnet': - return MAINNET_RPC + return MAINNET_RPC_URL case 'ropsten': - return ROPSTEN_RPC + return ROPSTEN_RPC_URL case 'kovan': - return KOVAN_RPC + return KOVAN_RPC_URL case 'rinkeby': - return RINKEBY_RPC + return RINKEBY_RPC_URL default: - return provider && provider.rpcTarget ? provider.rpcTarget : RINKEBY_RPC + return provider && provider.rpcTarget ? provider.rpcTarget : RINKEBY_RPC_URL } } |