aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/drop-menu-item.js14
-rw-r--r--ui/app/components/network.js21
2 files changed, 27 insertions, 8 deletions
diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js
index f5800f799..8bff3e131 100644
--- a/ui/app/components/drop-menu-item.js
+++ b/ui/app/components/drop-menu-item.js
@@ -32,20 +32,24 @@ DropMenuItem.prototype.render = function () {
}
DropMenuItem.prototype.activeNetworkRender = function () {
- var activeNetwork = this.props.activeNetworkRender
+ let activeNetwork = this.props.activeNetworkRender
+ let { provider } = this.props
if (activeNetwork === undefined) return
switch (this.props.label) {
case 'Main Ethereum Network':
- if (activeNetwork === '1') return h('.check', ' ✓')
+ if (provider.type === 'mainnet') return h('.check', '✓')
+ break
+ case 'Ethereum Classic Network':
+ if (provider.type === 'classic') return h('.check', '✓')
break
case 'Morden Test Network':
- if (activeNetwork === '2') return h('.check', ' ✓')
+ if (activeNetwork === '2') return h('.check', '✓')
break
case 'Localhost 8545':
- if (activeNetwork === 'http://localhost:8545') return h('.check', ' ✓')
+ if (activeNetwork === 'http://localhost:8545') return h('.check', '✓')
break
default:
- if (activeNetwork === 'custom') return h('.check', ' ✓')
+ if (activeNetwork === 'custom') return h('.check', '✓')
}
}
diff --git a/ui/app/components/network.js b/ui/app/components/network.js
index 032e71699..22b11aa6c 100644
--- a/ui/app/components/network.js
+++ b/ui/app/components/network.js
@@ -11,11 +11,13 @@ function Network () {
}
Network.prototype.render = function () {
- const state = this.props
- const networkNumber = state.network
+ const props = this.props
+ const networkNumber = props.network
+ const providerName = props.provider.type
let iconName, hoverText
if (networkNumber === 'loading') {
+
return h('img', {
title: 'Attempting to connect to blockchain.',
onClick: (event) => this.props.onClick(event),
@@ -25,9 +27,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 +61,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'),