aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/app/accounts/import/index.js2
-rw-r--r--ui/app/actions.js6
-rw-r--r--ui/app/app.js10
-rw-r--r--ui/app/components/buy-button-subview.js8
-rw-r--r--ui/app/components/drop-menu-item.js3
-rw-r--r--ui/app/components/ens-input.js6
-rw-r--r--ui/app/components/network.js12
-rw-r--r--ui/app/components/notice.js5
-rw-r--r--ui/app/components/transaction-list-item-icon.js2
-rw-r--r--ui/app/components/transaction-list-item.js4
-rw-r--r--ui/app/conf-tx.js2
-rw-r--r--ui/app/config.js5
-rw-r--r--ui/app/css/lib.css4
-rw-r--r--ui/app/reducers/app.js2
-rw-r--r--ui/lib/account-link.js3
-rw-r--r--ui/lib/explorer-link.js3
16 files changed, 59 insertions, 18 deletions
diff --git a/ui/app/accounts/import/index.js b/ui/app/accounts/import/index.js
index 96350852a..a0f0f9bdb 100644
--- a/ui/app/accounts/import/index.js
+++ b/ui/app/accounts/import/index.js
@@ -73,7 +73,7 @@ AccountImportSubview.prototype.render = function () {
)
}
-AccountImportSubview.prototype.renderImportView = function() {
+AccountImportSubview.prototype.renderImportView = function () {
const props = this.props
const state = this.state || {}
const { type } = state
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 18f341411..c15c9be7e 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -314,7 +314,7 @@ function importNewAccount (strategy, args) {
}
}
-function navigateToNewAccountScreen() {
+function navigateToNewAccountScreen () {
return {
type: this.NEW_ACCOUNT_SCREEN,
}
@@ -665,7 +665,7 @@ function clearNotices () {
}
}
-function markAccountsFound() {
+function markAccountsFound () {
log.debug(`background.markAccountsFound`)
return callBackgroundThenUpdate(background.markAccountsFound)
}
@@ -978,7 +978,7 @@ function callBackgroundThenUpdate (method, ...args) {
}
}
-function forceUpdateMetamaskState(dispatch){
+function forceUpdateMetamaskState (dispatch) {
log.debug(`background.getState`)
background.getState((err, newState) => {
if (err) {
diff --git a/ui/app/app.js b/ui/app/app.js
index 5a7596aca..bbfd58588 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -265,6 +265,15 @@ App.prototype.renderNetworkDropdown = function () {
}),
h(DropMenuItem, {
+ label: 'Rinkeby Test Network',
+ closeMenu: () => this.setState({ isNetworkMenuOpen: false}),
+ action: () => props.dispatch(actions.setProviderType('rinkeby')),
+ icon: h('.menu-icon.golden-square'),
+ activeNetworkRender: props.network,
+ provider: props.provider,
+ }),
+
+ h(DropMenuItem, {
label: 'Localhost 8545',
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
action: () => props.dispatch(actions.setDefaultRpcTarget(rpcList)),
@@ -552,5 +561,4 @@ App.prototype.renderCommonRpc = function (rpcList, provider) {
})
}
})
-
}
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/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/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/network.js b/ui/app/components/network.js
index d9045167f..f7ea8c49e 100644
--- a/ui/app/components/network.js
+++ b/ui/app/components/network.js
@@ -43,6 +43,9 @@ Network.prototype.render = function () {
} else if (providerName === 'kovan') {
hoverText = 'Kovan Test Network'
iconName = 'kovan-test-network'
+ } else if (providerName === 'rinkeby') {
+ hoverText = 'Rinkeby Test Network'
+ iconName = 'rinkeby-test-network'
} else {
hoverText = 'Unknown Private Network'
iconName = 'unknown-private-network'
@@ -82,6 +85,15 @@ Network.prototype.render = function () {
}},
'Kovan Test Net'),
])
+ case 'rinkeby-test-network':
+ return h('.network-indicator', [
+ h('.menu-icon.golden-square'),
+ h('.network-name', {
+ style: {
+ color: '#550077',
+ }},
+ 'Rinkeby Test Net'),
+ ])
default:
return h('.network-indicator', [
h('i.fa.fa-question-circle.fa-lg', {
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..7fb2e88d9 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)
@@ -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)'),
])
}
-
}
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js
index 770f79b19..83ac5a4fd 100644
--- a/ui/app/conf-tx.js
+++ b/ui/app/conf-tx.js
@@ -125,14 +125,12 @@ function currentTxView (opts) {
if (txParams) {
log.debug('txParams detected, rendering pending tx')
return h(PendingTx, opts)
-
} else if (msgParams) {
log.debug('msgParams detected, rendering pending msg')
if (type === 'eth_sign') {
log.debug('rendering eth_sign message')
return h(PendingMsg, opts)
-
} else if (type === 'personal_sign') {
log.debug('rendering personal_sign message')
return h(PendingPersonalMsg, opts)
diff --git a/ui/app/config.js b/ui/app/config.js
index 444365de2..26cfe663f 100644
--- a/ui/app/config.js
+++ b/ui/app/config.js
@@ -166,6 +166,11 @@ function currentProviderDisplay (metamaskState) {
value = 'Kovan Test Network'
break
+ case 'rinkeby':
+ title = 'Current Network'
+ value = 'Rinkeby Test Network'
+ break
+
default:
title = 'Current RPC'
value = metamaskState.provider.rpcTarget
diff --git a/ui/app/css/lib.css b/ui/app/css/lib.css
index 670dc9fd0..910a24ee2 100644
--- a/ui/app/css/lib.css
+++ b/ui/app/css/lib.css
@@ -191,6 +191,10 @@ hr.horizontal-line {
border: 3px solid #690496;
}
+.golden-square {
+ background: #EBB33F;
+}
+
.pending-dot {
background: red;
left: 14px;
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index 324a4df35..deacad0a7 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -315,7 +315,7 @@ function reduceApp (state, action) {
case actions.COMPLETED_TX:
log.debug('reducing COMPLETED_TX for tx ' + action.value)
const otherUnconfActions = getUnconfActionList(state)
- .filter(tx => tx.id !== action.value )
+ .filter(tx => tx.id !== action.value)
const hasOtherUnconfActions = otherUnconfActions.length > 0
if (hasOtherUnconfActions) {
diff --git a/ui/lib/account-link.js b/ui/lib/account-link.js
index 4f27b35c0..d061d0ad1 100644
--- a/ui/lib/account-link.js
+++ b/ui/lib/account-link.js
@@ -11,6 +11,9 @@ module.exports = function (address, network) {
case 3: // ropsten test net
link = `http://ropsten.etherscan.io/address/${address}`
break
+ case 4: // rinkeby test net
+ link = `http://rinkeby.etherscan.io/address/${address}`
+ break
case 42: // kovan test net
link = `http://kovan.etherscan.io/address/${address}`
break
diff --git a/ui/lib/explorer-link.js b/ui/lib/explorer-link.js
index ca89f8b25..e11249551 100644
--- a/ui/lib/explorer-link.js
+++ b/ui/lib/explorer-link.js
@@ -8,6 +8,9 @@ module.exports = function (hash, network) {
case 3: // ropsten test net
prefix = 'ropsten.'
break
+ case 4: // rinkeby test net
+ prefix = 'rinkeby.'
+ break
case 42: // kovan test net
prefix = 'kovan.'
break