|
|
@ -519,7 +519,7 @@ App.prototype.renderCustomOption = function (provider) { |
|
|
|
DropdownMenuItem, |
|
|
|
DropdownMenuItem, |
|
|
|
{ |
|
|
|
{ |
|
|
|
key: rpcTarget, |
|
|
|
key: rpcTarget, |
|
|
|
onClick: () => props.dispatch(actions.setCustomRpc(rpcTarget)), |
|
|
|
onClick: () => props.dispatch(actions.setRpcTarget(rpcTarget)), |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: false }), |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: false }), |
|
|
|
}, |
|
|
|
}, |
|
|
|
[ |
|
|
|
[ |
|
|
@ -553,24 +553,24 @@ App.prototype.getNetworkName = function () { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
App.prototype.renderCommonRpc = function (rpcList, provider) { |
|
|
|
App.prototype.renderCommonRpc = function (rpcList, provider) { |
|
|
|
const { rpcTarget } = provider |
|
|
|
|
|
|
|
const props = this.props |
|
|
|
const props = this.props |
|
|
|
|
|
|
|
const rpcTarget = provider.rpcTarget |
|
|
|
|
|
|
|
|
|
|
|
return rpcList.map((rpc) => { |
|
|
|
return rpcList.map((rpc) => { |
|
|
|
if ((rpc === 'http://localhost:8545') || (rpc === rpcTarget)) { |
|
|
|
if ((rpc === 'http://localhost:8545') || (rpc === rpcTarget)) { |
|
|
|
return null |
|
|
|
return null |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
return h( |
|
|
|
return h( |
|
|
|
DropdownMenuItem, |
|
|
|
DropdownMenuItem, |
|
|
|
{ |
|
|
|
{ |
|
|
|
key: rpc, |
|
|
|
|
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: false }), |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: false }), |
|
|
|
action: () => props.dispatch(actions.setRpcTarget(rpc)), |
|
|
|
onClick: () => props.dispatch(actions.setRpcTarget(rpc)), |
|
|
|
}, |
|
|
|
}, |
|
|
|
[ |
|
|
|
[ |
|
|
|
h('i.fa.fa-question-circle.fa-lg.menu-icon'), |
|
|
|
h('i.fa.fa-question-circle.fa-lg.menu-icon'), |
|
|
|
rpc, |
|
|
|
rpc, |
|
|
|
h('.check', '✓'), |
|
|
|
rpcTarget === rpc ? h('.check', '✓') : null, |
|
|
|
] |
|
|
|
] |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|