From 3367363b1234a076695758762d7f1220fe4a7f8c Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Mon, 15 May 2017 19:11:16 -0700 Subject: [PATCH] Remove all traces of testnet --- app/scripts/config.js | 11 ++++------- app/scripts/first-time-state.js | 2 +- app/scripts/lib/config-manager.js | 15 +++++---------- ui/app/app.js | 2 +- ui/app/components/drop-menu-item.js | 2 +- ui/app/components/network.js | 2 +- ui/app/config.js | 2 +- 7 files changed, 14 insertions(+), 22 deletions(-) diff --git a/app/scripts/config.js b/app/scripts/config.js index 67067cfd7..8e28db80e 100644 --- a/app/scripts/config.js +++ b/app/scripts/config.js @@ -1,18 +1,15 @@ const MAINET_RPC_URL = 'https://mainnet.infura.io/metamask' -const TESTNET_RPC_URL = 'https://rinkeby.infura.io/metamask' -const KOVAN_RPC_URL = 'https://kovan.infura.io/metamask' const ROPSTEN_RPC_URL = 'https://ropsten.infura.io/metamask' -const DEFAULT_RPC_URL = TESTNET_RPC_URL +const KOVAN_RPC_URL = 'https://kovan.infura.io/metamask' +const RINKEBY_RPC_URL = 'https://rinkeby.infura.io/metamask' global.METAMASK_DEBUG = 'GULP_METAMASK_DEBUG' module.exports = { network: { - default: DEFAULT_RPC_URL, mainnet: MAINET_RPC_URL, - testnet: TESTNET_RPC_URL, - morden: TESTNET_RPC_URL, - kovan: KOVAN_RPC_URL, ropsten: ROPSTEN_RPC_URL, + kovan: KOVAN_RPC_URL, + rinkeby: RINKEBY_RPC_URL, }, } diff --git a/app/scripts/first-time-state.js b/app/scripts/first-time-state.js index 87a7bb7b5..29ec1d8d3 100644 --- a/app/scripts/first-time-state.js +++ b/app/scripts/first-time-state.js @@ -5,7 +5,7 @@ module.exports = { config: { provider: { - type: 'testnet', + type: 'rinkeby', }, }, } diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index 4ca02135a..d77cd2126 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -2,12 +2,10 @@ const MetamaskConfig = require('../config.js') const ethUtil = require('ethereumjs-util') const normalize = require('eth-sig-util').normalize -const TESTNET_RPC = MetamaskConfig.network.testnet const MAINNET_RPC = MetamaskConfig.network.mainnet -const MORDEN_RPC = MetamaskConfig.network.morden -const KOVAN_RPC = MetamaskConfig.network.kovan const ROPSTEN_RPC = MetamaskConfig.network.ropsten - +const KOVAN_RPC = MetamaskConfig.network.kovan +const RINKEBY_RPC = MetamaskConfig.network.rinkeby /* The config-manager is a convenience object * wrapping a pojo-migrator. @@ -150,17 +148,14 @@ ConfigManager.prototype.getCurrentRpcAddress = function () { case 'ropsten': return ROPSTEN_RPC - case 'morden': - return MORDEN_RPC - case 'kovan': return KOVAN_RPC - case 'testnet': - return TESTNET_RPC + case 'rinkeby': + return RINKEBY_RPC default: - return provider && provider.rpcTarget ? provider.rpcTarget : TESTNET_RPC + return provider && provider.rpcTarget ? provider.rpcTarget : RINKEBY_RPC } } diff --git a/ui/app/app.js b/ui/app/app.js index d096ca531..6e5aa57cd 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -267,7 +267,7 @@ App.prototype.renderNetworkDropdown = function () { h(DropMenuItem, { label: 'Rinkeby Test Network', closeMenu: () => this.setState({ isNetworkMenuOpen: false}), - action: () => props.dispatch(actions.setProviderType('testnet')), + action: () => props.dispatch(actions.setProviderType('rinkeby')), icon: h('.menu-icon.golden-square'), activeNetworkRender: props.network, provider: props.provider, diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js index 27c2afde3..e42948209 100644 --- a/ui/app/components/drop-menu-item.js +++ b/ui/app/components/drop-menu-item.js @@ -48,7 +48,7 @@ DropMenuItem.prototype.activeNetworkRender = function () { if (providerType === 'kovan') return h('.check', '✓') break case 'Rinkeby Test Network': - if (providerType === 'testnet') return h('.check', '✓') + if (providerType === 'rinkeby') return h('.check', '✓') break case 'Localhost 8545': if (activeNetwork === 'http://localhost:8545') return h('.check', '✓') diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 1e7c082e1..31a8fc17c 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -43,7 +43,7 @@ Network.prototype.render = function () { } else if (providerName === 'kovan') { hoverText = 'Kovan Test Network' iconName = 'kovan-test-network' - } else if (providerName === 'testnet') { + } else if (providerName === 'rinkeby') { hoverText = 'Rinkeby Test Network' iconName = 'rinkeby-test-network' } else { diff --git a/ui/app/config.js b/ui/app/config.js index 26cfe663f..d7be26757 100644 --- a/ui/app/config.js +++ b/ui/app/config.js @@ -156,7 +156,7 @@ function currentProviderDisplay (metamaskState) { value = 'Main Ethereum Network' break - case 'testnet': + case 'ropsten': title = 'Current Network' value = 'Ropsten Test Network' break