diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-08-05 04:26:03 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-08-05 04:26:03 +0800 |
commit | 479abadaa7dc59dc900cb35e897e0f164e3bb345 (patch) | |
tree | 07ea368e21d9c8277828e76e975f4671270b10a4 /ui/app/components/network.js | |
parent | 0ae5305822b86e43c7921c53456a4042b4bc8af6 (diff) | |
parent | 106cbc133f26606449746587d4a33a3b8fb3f727 (diff) | |
download | tangerine-wallet-browser-479abadaa7dc59dc900cb35e897e0f164e3bb345.tar tangerine-wallet-browser-479abadaa7dc59dc900cb35e897e0f164e3bb345.tar.gz tangerine-wallet-browser-479abadaa7dc59dc900cb35e897e0f164e3bb345.tar.bz2 tangerine-wallet-browser-479abadaa7dc59dc900cb35e897e0f164e3bb345.tar.lz tangerine-wallet-browser-479abadaa7dc59dc900cb35e897e0f164e3bb345.tar.xz tangerine-wallet-browser-479abadaa7dc59dc900cb35e897e0f164e3bb345.tar.zst tangerine-wallet-browser-479abadaa7dc59dc900cb35e897e0f164e3bb345.zip |
Merge branch 'master' into usd-conversion
Diffstat (limited to 'ui/app/components/network.js')
-rw-r--r-- | ui/app/components/network.js | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 032e71699..95901fe70 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -11,11 +11,18 @@ function Network () { } Network.prototype.render = function () { - const state = this.props - const networkNumber = state.network + const props = this.props + const networkNumber = props.network + let providerName + try { + providerName = props.provider.type + } catch (e) { + providerName = null + } let iconName, hoverText if (networkNumber === 'loading') { + return h('img', { title: 'Attempting to connect to blockchain.', onClick: (event) => this.props.onClick(event), @@ -25,9 +32,13 @@ Network.prototype.render = function () { }, src: 'images/loading.svg', }) - } else if (parseInt(networkNumber) === 1) { + + } else if (providerName === 'mainnet') { hoverText = 'Main Ethereum Network' iconName = 'ethereum-network' + } else if (providerName === 'classic') { + hoverText = 'Ethereum Classic Network' + iconName = 'classic-network' } else if (parseInt(networkNumber) === 2) { hoverText = 'Morden Test Network' iconName = 'morden-test-network' @@ -55,6 +66,15 @@ Network.prototype.render = function () { }}, 'Etherum Main Net'), ]) + case 'classic-network': + return h('.network-indicator', [ + h('.menu-icon.hollow-diamond'), + h('.network-name', { + style: { + color: '#039396', + }}, + 'Etherum Classic'), + ]) case 'morden-test-network': return h('.network-indicator', [ h('.menu-icon.red-dot'), |