From c071591adb7b5190c21769114f3c98fd2a5b5ec8 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 26 Jul 2017 15:30:41 -0700 Subject: Fix custom provider indication --- ui/app/app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 4ecc6d6d5..f67335797 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -519,7 +519,7 @@ App.prototype.renderCustomOption = function (provider) { DropdownMenuItem, { key: rpcTarget, - onClick: () => props.dispatch(actions.setCustomRpc(rpcTarget)), + onClick: () => props.dispatch(actions.setRpcTarget(rpcTarget)), closeMenu: () => this.setState({ isNetworkMenuOpen: false }), }, [ @@ -553,24 +553,24 @@ App.prototype.getNetworkName = function () { } App.prototype.renderCommonRpc = function (rpcList, provider) { - const { rpcTarget } = provider const props = this.props + const rpcTarget = provider.rpcTarget return rpcList.map((rpc) => { if ((rpc === 'http://localhost:8545') || (rpc === rpcTarget)) { return null } else { + return h( DropdownMenuItem, { - key: rpc, 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'), rpc, - h('.check', '✓'), + rpcTarget === rpc ? h('.check', '✓') : null, ] ) } -- cgit v1.2.3