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

Merge pull request #594 from MetaMask/i541-CustomMenuItemFix

Allow selecting custom rpc from menu even when custom rpc is selected
This commit is contained in:
kumavis 2016-08-29 12:49:17 -07:00 committed by GitHub
commit a9c738d4d3
4 changed files with 13 additions and 8 deletions

View File

@ -2,6 +2,8 @@
## Current Master ## Current Master
- Fix bug where provider menu did not allow switching to custom network from a custom network.
## 2.10.0 2016-08-29 ## 2.10.0 2016-08-29
- Changed transaction approval from notifications system to popup system. - Changed transaction approval from notifications system to popup system.

File diff suppressed because one or more lines are too long

View File

@ -158,7 +158,7 @@
} }
], ],
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825", "selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
"network": "loading", "network": "166",
"seedWords": null, "seedWords": null,
"isConfirmed": true, "isConfirmed": true,
"isEthConfirmed": true, "isEthConfirmed": true,

View File

@ -249,6 +249,13 @@ App.prototype.renderNetworkDropdown = function () {
activeNetworkRender: props.provider.rpcTarget, activeNetworkRender: props.provider.rpcTarget,
}), }),
h(DropMenuItem, {
label: 'Custom RPC',
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
action: () => this.props.dispatch(actions.showConfigPage()),
icon: h('i.fa.fa-question-circle.fa-lg', { ariaHidden: true }),
}),
this.renderCustomOption(props.provider.rpcTarget), this.renderCustomOption(props.provider.rpcTarget),
]) ])
} }
@ -501,12 +508,8 @@ App.prototype.toggleMetamaskActive = function () {
App.prototype.renderCustomOption = function (rpcTarget) { App.prototype.renderCustomOption = function (rpcTarget) {
switch (rpcTarget) { switch (rpcTarget) {
case undefined: case undefined:
return h(DropMenuItem, { return null
label: 'Custom RPC',
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
action: () => this.props.dispatch(actions.showConfigPage()),
icon: h('i.fa.fa-question-circle.fa-lg', { ariaHidden: true }),
})
case 'http://localhost:8545': case 'http://localhost:8545':
return h(DropMenuItem, { return h(DropMenuItem, {
label: 'Custom RPC', label: 'Custom RPC',