aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/config.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-22 04:18:32 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-22 04:18:32 +0800
commita08c3bc01b11fbd0e3a243359befbe9fc909edf4 (patch)
treeb79b7324139945c429ca4b6c74715d8040fdf4e1 /ui/app/config.js
parentf7f8f8b1c50be39db22a7b10c6c6db007fe590aa (diff)
downloadtangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.gz
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.zst
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.zip
Auto linted
Diffstat (limited to 'ui/app/config.js')
-rw-r--r--ui/app/config.js47
1 files changed, 23 insertions, 24 deletions
diff --git a/ui/app/config.js b/ui/app/config.js
index c4d473b10..7af3cf0f7 100644
--- a/ui/app/config.js
+++ b/ui/app/config.js
@@ -6,7 +6,7 @@ const actions = require('./actions')
module.exports = connect(mapStateToProps)(ConfigScreen)
-function mapStateToProps(state) {
+function mapStateToProps (state) {
return {
rpc: state.metamask.rpcTarget,
metamask: state.metamask,
@@ -14,12 +14,11 @@ function mapStateToProps(state) {
}
inherits(ConfigScreen, Component)
-function ConfigScreen() {
+function ConfigScreen () {
Component.call(this)
}
-
-ConfigScreen.prototype.render = function() {
+ConfigScreen.prototype.render = function () {
var state = this.props
var rpc = state.rpc
var metamaskState = state.metamask
@@ -32,7 +31,7 @@ ConfigScreen.prototype.render = function() {
h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
onClick: (event) => {
state.dispatch(actions.goHome())
- }
+ },
}),
h('h2.page-subtitle', 'Configuration'),
]),
@@ -42,7 +41,7 @@ ConfigScreen.prototype.render = function() {
h('.flex-space-around', {
style: {
padding: '20px',
- }
+ },
}, [
currentProviderDisplay(metamaskState),
@@ -56,25 +55,25 @@ ConfigScreen.prototype.render = function() {
height: '30px',
margin: '8px',
},
- onKeyPress(event) {
+ onKeyPress (event) {
if (event.key === 'Enter') {
var element = event.target
var newRpc = element.value
state.dispatch(actions.setRpcTarget(newRpc))
}
- }
+ },
}),
h('button', {
style: {
alignSelf: 'center',
},
- onClick(event) {
+ onClick (event) {
event.preventDefault()
var element = document.querySelector('input#new_rpc')
var newRpc = element.value
state.dispatch(actions.setRpcTarget(newRpc))
- }
- }, 'Save')
+ },
+ }, 'Save'),
]),
h('div', [
@@ -82,10 +81,10 @@ ConfigScreen.prototype.render = function() {
style: {
alignSelf: 'center',
},
- onClick(event) {
+ onClick (event) {
event.preventDefault()
state.dispatch(actions.setProviderType('mainnet'))
- }
+ },
}, 'Use Main Network'),
]),
@@ -94,10 +93,10 @@ ConfigScreen.prototype.render = function() {
style: {
alignSelf: 'center',
},
- onClick(event) {
+ onClick (event) {
event.preventDefault()
state.dispatch(actions.setProviderType('testnet'))
- }
+ },
}, 'Use Morden Test Network'),
]),
@@ -106,10 +105,10 @@ ConfigScreen.prototype.render = function() {
style: {
alignSelf: 'center',
},
- onClick(event) {
+ onClick (event) {
event.preventDefault()
state.dispatch(actions.setRpcTarget('http://localhost:8545/'))
- }
+ },
}, 'Use http://localhost:8545'),
]),
@@ -118,17 +117,17 @@ ConfigScreen.prototype.render = function() {
h('div', {
style: {
marginTop: '20px',
- }
+ },
}, [
h('button', {
style: {
alignSelf: 'center',
},
- onClick(event) {
+ onClick (event) {
event.preventDefault()
state.dispatch(actions.revealSeedConfirmation())
- }
- }, 'Reveal Seed Words')
+ },
+ }, 'Reveal Seed Words'),
]),
]),
@@ -137,7 +136,7 @@ ConfigScreen.prototype.render = function() {
)
}
-function currentProviderDisplay(metamaskState) {
+function currentProviderDisplay (metamaskState) {
var provider = metamaskState.provider
var title, value
@@ -156,10 +155,10 @@ function currentProviderDisplay(metamaskState) {
default:
title = 'Current RPC'
value = metamaskState.provider.rpcTarget
- }
+ }
return h('div', [
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, title),
- h('span', value)
+ h('span', value),
])
}