mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 20:39:08 +01:00
add rinkeby network
This commit is contained in:
parent
afbe6f5e5f
commit
e9aa37b699
@ -1,6 +1,7 @@
|
||||
const MAINET_RPC_URL = 'https://mainnet.infura.io/metamask'
|
||||
const TESTNET_RPC_URL = 'https://ropsten.infura.io/metamask'
|
||||
const KOVAN_RPC_URL = 'https://kovan.infura.io/metamask'
|
||||
const RINKEBY_RPC_URL = 'https://rinkeby.infura.io'
|
||||
const DEFAULT_RPC_URL = TESTNET_RPC_URL
|
||||
|
||||
global.METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
|
||||
@ -12,5 +13,6 @@ module.exports = {
|
||||
testnet: TESTNET_RPC_URL,
|
||||
morden: TESTNET_RPC_URL,
|
||||
kovan: KOVAN_RPC_URL,
|
||||
rinkeby: RINKEBY_RPC_URL,
|
||||
},
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ 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 RINKEBY_RPC = MetamaskConfig.network.rinkeby
|
||||
|
||||
|
||||
/* The config-manager is a convenience object
|
||||
* wrapping a pojo-migrator.
|
||||
@ -154,6 +156,9 @@ ConfigManager.prototype.getCurrentRpcAddress = function () {
|
||||
case 'kovan':
|
||||
return KOVAN_RPC
|
||||
|
||||
case 'rinkeby':
|
||||
return RINKEBY_RPC
|
||||
|
||||
default:
|
||||
return provider && provider.rpcTarget ? provider.rpcTarget : TESTNET_RPC
|
||||
}
|
||||
|
@ -264,6 +264,15 @@ App.prototype.renderNetworkDropdown = function () {
|
||||
provider: props.provider,
|
||||
}),
|
||||
|
||||
h(DropMenuItem, {
|
||||
label: 'Rinkeby Test Network',
|
||||
closeMenu: () => this.setState({ isNetworkMenuOpen: false}),
|
||||
action: () => props.dispatch(actions.setProviderType('rinkeby')),
|
||||
icon: h('.menu-icon.hollow-diamond'),
|
||||
activeNetworkRender: props.network,
|
||||
provider: props.provider,
|
||||
}),
|
||||
|
||||
h(DropMenuItem, {
|
||||
label: 'Localhost 8545',
|
||||
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
|
||||
|
@ -47,6 +47,9 @@ DropMenuItem.prototype.activeNetworkRender = function () {
|
||||
case 'Kovan Test Network':
|
||||
if (providerType === 'kovan') return h('.check', '✓')
|
||||
break
|
||||
case 'Rinkeby Test Network':
|
||||
if (providerType === 'rinkeby') return h('.check', '✓')
|
||||
break
|
||||
case 'Localhost 8545':
|
||||
if (activeNetwork === 'http://localhost:8545') return h('.check', '✓')
|
||||
break
|
||||
|
@ -43,7 +43,10 @@ Network.prototype.render = function () {
|
||||
} else if (providerName === 'kovan') {
|
||||
hoverText = 'Kovan Test Network'
|
||||
iconName = 'kovan-test-network'
|
||||
} else {
|
||||
} else if (providerName === 'rinkeby') {
|
||||
hoverText = 'Rinkeby Test Network'
|
||||
iconName = 'unknown-private-network'
|
||||
}else {
|
||||
hoverText = 'Unknown Private Network'
|
||||
iconName = 'unknown-private-network'
|
||||
}
|
||||
|
@ -166,6 +166,11 @@ function currentProviderDisplay (metamaskState) {
|
||||
value = 'Kovan Test Network'
|
||||
break
|
||||
|
||||
case 'rinkeby':
|
||||
title = 'Current Network'
|
||||
value = 'Rinkeby Test Network'
|
||||
break
|
||||
|
||||
default:
|
||||
title = 'Current RPC'
|
||||
value = metamaskState.provider.rpcTarget
|
||||
|
Loading…
Reference in New Issue
Block a user