|
|
@ -350,11 +350,13 @@ module.exports = class AppBar extends Component { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
renderCommonRpc (rpcList, {rpcTarget}) { |
|
|
|
renderCommonRpc (rpcList, provider) { |
|
|
|
const {dispatch} = this.props |
|
|
|
const {dispatch} = this.props |
|
|
|
|
|
|
|
|
|
|
|
return rpcList.map((rpc) => { |
|
|
|
return rpcList.map((rpc) => { |
|
|
|
if ((rpc === LOCALHOST_RPC_URL) || (rpc === rpcTarget)) { |
|
|
|
const currentRpcTarget = provider.type === 'rpc' && rpc === provider.rpcTarget |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((rpc === LOCALHOST_RPC_URL) || currentRpcTarget) { |
|
|
|
return null |
|
|
|
return null |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return h(DropdownMenuItem, { |
|
|
|
return h(DropdownMenuItem, { |
|
|
@ -364,7 +366,7 @@ module.exports = class AppBar extends Component { |
|
|
|
}, [ |
|
|
|
}, [ |
|
|
|
h('i.fa.fa-question-circle.fa-lg.menu-icon'), |
|
|
|
h('i.fa.fa-question-circle.fa-lg.menu-icon'), |
|
|
|
rpc, |
|
|
|
rpc, |
|
|
|
rpcTarget === rpc |
|
|
|
currentRpcTarget |
|
|
|
? h('.check', '✓') |
|
|
|
? h('.check', '✓') |
|
|
|
: null, |
|
|
|
: null, |
|
|
|
]) |
|
|
|
]) |
|
|
|