From e9aa37b699a105019384cbde88a114965ff1e2cd Mon Sep 17 00:00:00 2001 From: Nickyg Date: Wed, 26 Apr 2017 01:40:33 +0530 Subject: add rinkeby network --- ui/app/components/drop-menu-item.js | 3 +++ ui/app/components/network.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'ui/app/components') diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js index 3eb6ec876..bd9d8f597 100644 --- a/ui/app/components/drop-menu-item.js +++ b/ui/app/components/drop-menu-item.js @@ -47,6 +47,9 @@ DropMenuItem.prototype.activeNetworkRender = function () { case 'Kovan Test Network': if (providerType === 'kovan') return h('.check', '✓') break + case 'Rinkeby Test Network': + if (providerType === 'rinkeby') return h('.check', '✓') + break case 'Localhost 8545': if (activeNetwork === 'http://localhost:8545') return h('.check', '✓') break diff --git a/ui/app/components/network.js b/ui/app/components/network.js index d9045167f..f0fc14454 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -43,7 +43,10 @@ Network.prototype.render = function () { } else if (providerName === 'kovan') { hoverText = 'Kovan Test Network' iconName = 'kovan-test-network' - } else { + } else if (providerName === 'rinkeby') { + hoverText = 'Rinkeby Test Network' + iconName = 'unknown-private-network' + }else { hoverText = 'Unknown Private Network' iconName = 'unknown-private-network' } -- cgit v1.2.3 From d764e46a500d0dc156a1da86498b751d23c94747 Mon Sep 17 00:00:00 2001 From: Nickyg Date: Wed, 26 Apr 2017 02:15:15 +0530 Subject: change network name to rinkeby when selected --- ui/app/components/network.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ui/app/components') diff --git a/ui/app/components/network.js b/ui/app/components/network.js index f0fc14454..94704b1bc 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -45,7 +45,7 @@ Network.prototype.render = function () { iconName = 'kovan-test-network' } else if (providerName === 'rinkeby') { hoverText = 'Rinkeby Test Network' - iconName = 'unknown-private-network' + iconName = 'rinkeby-test-network' }else { hoverText = 'Unknown Private Network' iconName = 'unknown-private-network' @@ -85,6 +85,15 @@ Network.prototype.render = function () { }}, 'Kovan Test Net'), ]) + case 'rinkeby-test-network': + return h('.network-indicator', [ + h('.menu-icon.hollow-diamond'), + h('.network-name', { + style: { + color: '#550077', + }}, + 'Rinkeby Test Net'), + ]) default: return h('.network-indicator', [ h('i.fa.fa-question-circle.fa-lg', { -- cgit v1.2.3 From 242dc1e99f1dd53e2bec9deefb5da0c8329b5f00 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 25 Apr 2017 14:39:01 -0700 Subject: Add missing changes. Create unique style for rinkeby icon. --- ui/app/components/buy-button-subview.js | 8 +++++++- ui/app/components/network.js | 2 +- ui/app/components/transaction-list-item.js | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'ui/app/components') diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js index 191f46319..87084f92d 100644 --- a/ui/app/components/buy-button-subview.js +++ b/ui/app/components/buy-button-subview.js @@ -152,13 +152,19 @@ BuyButtonSubview.prototype.formVersionSubview = function () { marginBottom: '15px', }, }, 'In order to access this feature, please switch to the Main Network'), - ((network === '3') || (network === '42')) ? h('h3.text-transform-uppercase', 'or go to the') : null, + ((network === '3') || (network === '4') || (network === '42')) ? h('h3.text-transform-uppercase', 'or go to the') : null, (network === '3') ? h('button.text-transform-uppercase', { onClick: () => this.props.dispatch(actions.buyEth({ network })), style: { marginTop: '15px', }, }, 'Ropsten Test Faucet') : null, + (network === '4') ? h('button.text-transform-uppercase', { + onClick: () => this.props.dispatch(actions.buyEth({ network })), + style: { + marginTop: '15px', + }, + }, 'Rinkeby Test Faucet') : null, (network === '42') ? h('button.text-transform-uppercase', { onClick: () => this.props.dispatch(actions.buyEth({ network })), style: { diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 94704b1bc..e8065cf00 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -87,7 +87,7 @@ Network.prototype.render = function () { ]) case 'rinkeby-test-network': return h('.network-indicator', [ - h('.menu-icon.hollow-diamond'), + h('.menu-icon.golden-square'), h('.network-name', { style: { color: '#550077', diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js index 9fef52355..6f4dfae2d 100644 --- a/ui/app/components/transaction-list-item.js +++ b/ui/app/components/transaction-list-item.js @@ -27,7 +27,7 @@ TransactionListItem.prototype.render = function () { let isLinkable = false const numericNet = parseInt(network) - isLinkable = numericNet === 1 || numericNet === 3 || numericNet === 42 + isLinkable = numericNet === 1 || numericNet === 3 || numericNet === 4 || numericNet === 42 var isMsg = ('msgParams' in transaction) var isTx = ('txParams' in transaction) -- cgit v1.2.3 From f2bf7326ccc87fa944307f0b1ffd7ca51621e53c Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 25 Apr 2017 14:44:25 -0700 Subject: Linting. --- ui/app/components/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/components') diff --git a/ui/app/components/network.js b/ui/app/components/network.js index e8065cf00..f7ea8c49e 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -46,7 +46,7 @@ Network.prototype.render = function () { } else if (providerName === 'rinkeby') { hoverText = 'Rinkeby Test Network' iconName = 'rinkeby-test-network' - }else { + } else { hoverText = 'Unknown Private Network' iconName = 'unknown-private-network' } -- cgit v1.2.3 From 6bdb4c87288a522d9ea2e984bc1f6436d6c7369a Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Wed, 26 Apr 2017 21:05:45 -0700 Subject: Fix linting warnings --- ui/app/components/ens-input.js | 6 +++--- ui/app/components/notice.js | 5 +++-- ui/app/components/transaction-list-item-icon.js | 2 +- ui/app/components/transaction-list-item.js | 2 -- 4 files changed, 7 insertions(+), 8 deletions(-) (limited to 'ui/app/components') diff --git a/ui/app/components/ens-input.js b/ui/app/components/ens-input.js index facf29d97..f1cf49998 100644 --- a/ui/app/components/ens-input.js +++ b/ui/app/components/ens-input.js @@ -24,7 +24,7 @@ EnsInput.prototype.render = function () { list: 'addresses', onChange: () => { const network = this.props.network - let resolverAddress = networkResolvers[network] + const resolverAddress = networkResolvers[network] if (!resolverAddress) return const recipient = document.querySelector('input[name="address"]').value @@ -52,7 +52,7 @@ EnsInput.prototype.render = function () { [ // Corresponds to the addresses owned. Object.keys(props.identities).map((key) => { - let identity = props.identities[key] + const identity = props.identities[key] return h('option', { value: identity.address, label: identity.name, @@ -72,7 +72,7 @@ EnsInput.prototype.render = function () { EnsInput.prototype.componentDidMount = function () { const network = this.props.network - let resolverAddress = networkResolvers[network] + const resolverAddress = networkResolvers[network] if (resolverAddress) { const provider = web3.currentProvider diff --git a/ui/app/components/notice.js b/ui/app/components/notice.js index b85787033..3c8523daf 100644 --- a/ui/app/components/notice.js +++ b/ui/app/components/notice.js @@ -115,8 +115,9 @@ Notice.prototype.render = function () { Notice.prototype.componentDidMount = function () { var node = findDOMNode(this) linker.setupListener(node) - if (document.getElementsByClassName('notice-box')[0].clientHeight < 310) { this.setState({disclaimerDisabled: false}) } - + if (document.getElementsByClassName('notice-box')[0].clientHeight < 310) { + this.setState({disclaimerDisabled: false}) + } } Notice.prototype.componentWillUnmount = function () { diff --git a/ui/app/components/transaction-list-item-icon.js b/ui/app/components/transaction-list-item-icon.js index ca2781451..d63cae259 100644 --- a/ui/app/components/transaction-list-item-icon.js +++ b/ui/app/components/transaction-list-item-icon.js @@ -15,7 +15,7 @@ TransactionIcon.prototype.render = function () { const { transaction, txParams, isMsg } = this.props switch (transaction.status) { case 'unapproved': - return h( !isMsg ? '.unapproved-tx-icon' : 'i.fa.fa-certificate.fa-lg') + return h(!isMsg ? '.unapproved-tx-icon' : 'i.fa.fa-certificate.fa-lg') case 'rejected': return h('i.fa.fa-exclamation-triangle.fa-lg.warning', { diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js index 9fef52355..ec1b0d66c 100644 --- a/ui/app/components/transaction-list-item.js +++ b/ui/app/components/transaction-list-item.js @@ -134,7 +134,6 @@ function failIfFailed (transaction) { return h('span.error', ' (Rejected)') } if (transaction.err) { - return h(Tooltip, { title: transaction.err.message, position: 'bottom', @@ -142,5 +141,4 @@ function failIfFailed (transaction) { h('span.error', ' (Failed)'), ]) } - } -- cgit v1.2.3