1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #1432 from MetaMask/i1419-rinkebydefaultnetwork

I1419 rinkebydefaultnetwork
This commit is contained in:
kumavis 2017-05-15 22:58:36 -07:00 committed by GitHub
commit 687dfc87bd
7 changed files with 12 additions and 20 deletions

View File

@ -1,17 +1,14 @@
const MAINET_RPC_URL = 'https://mainnet.infura.io/metamask' const MAINET_RPC_URL = 'https://mainnet.infura.io/metamask'
const TESTNET_RPC_URL = 'https://ropsten.infura.io/metamask' const ROPSTEN_RPC_URL = 'https://ropsten.infura.io/metamask'
const KOVAN_RPC_URL = 'https://kovan.infura.io/metamask' const KOVAN_RPC_URL = 'https://kovan.infura.io/metamask'
const RINKEBY_RPC_URL = 'https://rinkeby.infura.io/metamask' const RINKEBY_RPC_URL = 'https://rinkeby.infura.io/metamask'
const DEFAULT_RPC_URL = TESTNET_RPC_URL
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, ropsten: ROPSTEN_RPC_URL,
morden: TESTNET_RPC_URL,
kovan: KOVAN_RPC_URL, kovan: KOVAN_RPC_URL,
rinkeby: RINKEBY_RPC_URL, rinkeby: RINKEBY_RPC_URL,
}, },

View File

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

View File

@ -2,13 +2,11 @@ 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 ROPSTEN_RPC = MetamaskConfig.network.ropsten
const KOVAN_RPC = MetamaskConfig.network.kovan const KOVAN_RPC = MetamaskConfig.network.kovan
const RINKEBY_RPC = MetamaskConfig.network.rinkeby 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.
* *
@ -147,11 +145,8 @@ ConfigManager.prototype.getCurrentRpcAddress = function () {
case 'mainnet': case 'mainnet':
return MAINNET_RPC return MAINNET_RPC
case 'testnet': case 'ropsten':
return TESTNET_RPC return ROPSTEN_RPC
case 'morden':
return MORDEN_RPC
case 'kovan': case 'kovan':
return KOVAN_RPC return KOVAN_RPC
@ -160,7 +155,7 @@ ConfigManager.prototype.getCurrentRpcAddress = function () {
return RINKEBY_RPC return RINKEBY_RPC
default: default:
return provider && provider.rpcTarget ? provider.rpcTarget : TESTNET_RPC return provider && provider.rpcTarget ? provider.rpcTarget : RINKEBY_RPC
} }
} }

View File

@ -249,7 +249,7 @@ App.prototype.renderNetworkDropdown = function () {
h(DropMenuItem, { h(DropMenuItem, {
label: 'Ropsten Test Network', label: 'Ropsten Test Network',
closeMenu: () => this.setState({ isNetworkMenuOpen: false }), closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
action: () => props.dispatch(actions.setProviderType('testnet')), action: () => props.dispatch(actions.setProviderType('ropsten')),
icon: h('.menu-icon.red-dot'), icon: h('.menu-icon.red-dot'),
activeNetworkRender: props.network, activeNetworkRender: props.network,
provider: props.provider, provider: props.provider,

View File

@ -42,7 +42,7 @@ DropMenuItem.prototype.activeNetworkRender = function () {
if (providerType === 'mainnet') return h('.check', '✓') if (providerType === 'mainnet') return h('.check', '✓')
break break
case 'Ropsten Test Network': case 'Ropsten Test Network':
if (providerType === 'testnet') return h('.check', '✓') if (providerType === 'ropsten') return h('.check', '✓')
break break
case 'Kovan Test Network': case 'Kovan Test Network':
if (providerType === 'kovan') return h('.check', '✓') if (providerType === 'kovan') return h('.check', '✓')

View File

@ -34,7 +34,7 @@ Network.prototype.render = function () {
} else if (providerName === 'mainnet') { } else if (providerName === 'mainnet') {
hoverText = 'Main Ethereum Network' hoverText = 'Main Ethereum Network'
iconName = 'ethereum-network' iconName = 'ethereum-network'
} else if (providerName === 'testnet') { } else if (providerName === 'ropsten') {
hoverText = 'Ropsten Test Network' hoverText = 'Ropsten Test Network'
iconName = 'ropsten-test-network' iconName = 'ropsten-test-network'
} else if (parseInt(networkNumber) === 3) { } else if (parseInt(networkNumber) === 3) {
@ -90,7 +90,7 @@ Network.prototype.render = function () {
h('.menu-icon.golden-square'), h('.menu-icon.golden-square'),
h('.network-name', { h('.network-name', {
style: { style: {
color: '#550077', color: '#e7a218',
}}, }},
'Rinkeby Test Net'), 'Rinkeby Test Net'),
]) ])

View File

@ -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