mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix undefined provider menu item
This commit is contained in:
parent
822face7a3
commit
1e46d858e9
@ -258,7 +258,7 @@ App.prototype.renderNetworkDropdown = function () {
|
|||||||
activeNetworkRender: props.provider.rpcTarget,
|
activeNetworkRender: props.provider.rpcTarget,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
this.renderCustomOption(props.provider.rpcTarget),
|
this.renderCustomOption(props.provider),
|
||||||
|
|
||||||
h(DropMenuItem, {
|
h(DropMenuItem, {
|
||||||
label: 'Custom RPC',
|
label: 'Custom RPC',
|
||||||
@ -480,7 +480,10 @@ App.prototype.toggleMetamaskActive = function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
App.prototype.renderCustomOption = function (rpcTarget) {
|
App.prototype.renderCustomOption = function (provider) {
|
||||||
|
const { rpcTarget, type } = provider
|
||||||
|
if (type !== 'rpc') return null
|
||||||
|
|
||||||
switch (rpcTarget) {
|
switch (rpcTarget) {
|
||||||
|
|
||||||
case 'http://localhost:8545':
|
case 'http://localhost:8545':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user