Remove all traces of testnet

feature/default_network_editable
Thomas Huang 8 years ago
parent 62ee038889
commit 3367363b12
  1. 11
      app/scripts/config.js
  2. 2
      app/scripts/first-time-state.js
  3. 15
      app/scripts/lib/config-manager.js
  4. 2
      ui/app/app.js
  5. 2
      ui/app/components/drop-menu-item.js
  6. 2
      ui/app/components/network.js
  7. 2
      ui/app/config.js

@ -1,18 +1,15 @@
const MAINET_RPC_URL = 'https://mainnet.infura.io/metamask' 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 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' global.METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
module.exports = { module.exports = {
network: { network: {
default: DEFAULT_RPC_URL,
mainnet: MAINET_RPC_URL, mainnet: MAINET_RPC_URL,
testnet: TESTNET_RPC_URL,
morden: TESTNET_RPC_URL,
kovan: KOVAN_RPC_URL,
ropsten: ROPSTEN_RPC_URL, ropsten: ROPSTEN_RPC_URL,
kovan: KOVAN_RPC_URL,
rinkeby: RINKEBY_RPC_URL,
}, },
} }

@ -5,7 +5,7 @@
module.exports = { module.exports = {
config: { config: {
provider: { provider: {
type: 'testnet', type: 'rinkeby',
}, },
}, },
} }

@ -2,12 +2,10 @@ const MetamaskConfig = require('../config.js')
const ethUtil = require('ethereumjs-util') const ethUtil = require('ethereumjs-util')
const normalize = require('eth-sig-util').normalize const normalize = require('eth-sig-util').normalize
const TESTNET_RPC = MetamaskConfig.network.testnet
const MAINNET_RPC = MetamaskConfig.network.mainnet 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 ROPSTEN_RPC = MetamaskConfig.network.ropsten
const KOVAN_RPC = MetamaskConfig.network.kovan
const RINKEBY_RPC = MetamaskConfig.network.rinkeby
/* The config-manager is a convenience object /* The config-manager is a convenience object
* wrapping a pojo-migrator. * wrapping a pojo-migrator.
@ -150,17 +148,14 @@ ConfigManager.prototype.getCurrentRpcAddress = function () {
case 'ropsten': case 'ropsten':
return ROPSTEN_RPC return ROPSTEN_RPC
case 'morden':
return MORDEN_RPC
case 'kovan': case 'kovan':
return KOVAN_RPC return KOVAN_RPC
case 'testnet': case 'rinkeby':
return TESTNET_RPC return RINKEBY_RPC
default: default:
return provider && provider.rpcTarget ? provider.rpcTarget : TESTNET_RPC return provider && provider.rpcTarget ? provider.rpcTarget : RINKEBY_RPC
} }
} }

@ -267,7 +267,7 @@ App.prototype.renderNetworkDropdown = function () {
h(DropMenuItem, { h(DropMenuItem, {
label: 'Rinkeby Test Network', label: 'Rinkeby Test Network',
closeMenu: () => this.setState({ isNetworkMenuOpen: false}), closeMenu: () => this.setState({ isNetworkMenuOpen: false}),
action: () => props.dispatch(actions.setProviderType('testnet')), action: () => props.dispatch(actions.setProviderType('rinkeby')),
icon: h('.menu-icon.golden-square'), icon: h('.menu-icon.golden-square'),
activeNetworkRender: props.network, activeNetworkRender: props.network,
provider: props.provider, provider: props.provider,

@ -48,7 +48,7 @@ DropMenuItem.prototype.activeNetworkRender = function () {
if (providerType === 'kovan') return h('.check', '✓') if (providerType === 'kovan') return h('.check', '✓')
break break
case 'Rinkeby Test Network': case 'Rinkeby Test Network':
if (providerType === 'testnet') return h('.check', '✓') if (providerType === 'rinkeby') return h('.check', '✓')
break break
case 'Localhost 8545': case 'Localhost 8545':
if (activeNetwork === 'http://localhost:8545') return h('.check', '✓') if (activeNetwork === 'http://localhost:8545') return h('.check', '✓')

@ -43,7 +43,7 @@ Network.prototype.render = function () {
} else if (providerName === 'kovan') { } else if (providerName === 'kovan') {
hoverText = 'Kovan Test Network' hoverText = 'Kovan Test Network'
iconName = 'kovan-test-network' iconName = 'kovan-test-network'
} else if (providerName === 'testnet') { } else if (providerName === 'rinkeby') {
hoverText = 'Rinkeby Test Network' hoverText = 'Rinkeby Test Network'
iconName = 'rinkeby-test-network' iconName = 'rinkeby-test-network'
} else { } else {

@ -156,7 +156,7 @@ function currentProviderDisplay (metamaskState) {
value = 'Main Ethereum Network' value = 'Main Ethereum Network'
break break
case 'testnet': case 'ropsten':
title = 'Current Network' title = 'Current Network'
value = 'Ropsten Test Network' value = 'Ropsten Test Network'
break break

Loading…
Cancel
Save