diff options
author | Dan J Miller <danjm.com@gmail.com> | 2018-08-23 19:43:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-23 19:43:18 +0800 |
commit | 3ae082aad8ccea338514b4cb6f3cec4e7862bb9e (patch) | |
tree | 8cacedb8df608164ab435d2e8b5e7532cda9e354 /ui/app | |
parent | 38546505464f8bb03fc719bf200b58c9913188b9 (diff) | |
parent | 9a80d6e8598850fec00471c6101c194e90c30353 (diff) | |
download | tangerine-wallet-browser-3ae082aad8ccea338514b4cb6f3cec4e7862bb9e.tar tangerine-wallet-browser-3ae082aad8ccea338514b4cb6f3cec4e7862bb9e.tar.gz tangerine-wallet-browser-3ae082aad8ccea338514b4cb6f3cec4e7862bb9e.tar.bz2 tangerine-wallet-browser-3ae082aad8ccea338514b4cb6f3cec4e7862bb9e.tar.lz tangerine-wallet-browser-3ae082aad8ccea338514b4cb6f3cec4e7862bb9e.tar.xz tangerine-wallet-browser-3ae082aad8ccea338514b4cb6f3cec4e7862bb9e.tar.zst tangerine-wallet-browser-3ae082aad8ccea338514b4cb6f3cec4e7862bb9e.zip |
Merge pull request #5096 from evgeniuz/develop
implemented improvements to RPC history
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/components/dropdowns/network-dropdown.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ui/app/components/dropdowns/network-dropdown.js b/ui/app/components/dropdowns/network-dropdown.js index e5363ff56..63a30dd82 100644 --- a/ui/app/components/dropdowns/network-dropdown.js +++ b/ui/app/components/dropdowns/network-dropdown.js @@ -272,10 +272,12 @@ NetworkDropdown.prototype.getNetworkName = function () { NetworkDropdown.prototype.renderCommonRpc = function (rpcList, provider) { const props = this.props - const rpcTarget = provider.rpcTarget + const reversedRpcList = rpcList.slice().reverse() - return rpcList.map((rpc) => { - if ((rpc === 'http://localhost:8545') || (rpc === rpcTarget)) { + return reversedRpcList.map((rpc) => { + const currentRpcTarget = provider.type === 'rpc' && rpc === provider.rpcTarget + + if ((rpc === 'http://localhost:8545') || currentRpcTarget) { return null } else { return h( @@ -291,11 +293,11 @@ NetworkDropdown.prototype.renderCommonRpc = function (rpcList, provider) { }, }, [ - rpcTarget === rpc ? h('i.fa.fa-check') : h('.network-check__transparent', '✓'), + currentRpcTarget ? h('i.fa.fa-check') : h('.network-check__transparent', '✓'), h('i.fa.fa-question-circle.fa-med.menu-icon-circle'), h('span.network-name-item', { style: { - color: rpcTarget === rpc ? '#ffffff' : '#9b9b9b', + color: currentRpcTarget ? '#ffffff' : '#9b9b9b', }, }, rpc), ] |