diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-07-27 06:30:41 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-07-27 06:30:41 +0800 |
commit | c071591adb7b5190c21769114f3c98fd2a5b5ec8 (patch) | |
tree | 699528988e32614f21bced57fc57cdda8567f132 /ui | |
parent | bc65484e1bd15fb6ccc9b94f23c991a170b8d39c (diff) | |
download | tangerine-wallet-browser-c071591adb7b5190c21769114f3c98fd2a5b5ec8.tar.gz tangerine-wallet-browser-c071591adb7b5190c21769114f3c98fd2a5b5ec8.tar.zst tangerine-wallet-browser-c071591adb7b5190c21769114f3c98fd2a5b5ec8.zip |
Fix custom provider indication
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 2 | ||||
-rw-r--r-- | ui/app/app.js | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index d99291e46..fca34d624 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -719,7 +719,7 @@ function setDefaultRpcTarget (rpcList) { } function setRpcTarget (newRpc) { - log.debug(`background.setRpcTarget`) + log.debug(`background.setRpcTarget: ${newRpc}`) return (dispatch) => { background.setCustomRpc(newRpc, (err, result) => { if (err) { 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, ] ) } |