aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-08-29 22:50:48 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-08-31 19:16:07 +0800
commite7b3ef0708290a81dad5c469adaa6fab3f1c45b5 (patch)
tree29f471ff840cf3eb97af77de45eb136a703e7aa6 /ui/app/components/send
parent3ea841e27621a8e9972677e46dbd8e3f0c002632 (diff)
downloadtangerine-wallet-browser-e7b3ef0708290a81dad5c469adaa6fab3f1c45b5.tar
tangerine-wallet-browser-e7b3ef0708290a81dad5c469adaa6fab3f1c45b5.tar.gz
tangerine-wallet-browser-e7b3ef0708290a81dad5c469adaa6fab3f1c45b5.tar.bz2
tangerine-wallet-browser-e7b3ef0708290a81dad5c469adaa6fab3f1c45b5.tar.lz
tangerine-wallet-browser-e7b3ef0708290a81dad5c469adaa6fab3f1c45b5.tar.xz
tangerine-wallet-browser-e7b3ef0708290a81dad5c469adaa6fab3f1c45b5.tar.zst
tangerine-wallet-browser-e7b3ef0708290a81dad5c469adaa6fab3f1c45b5.zip
Lint fixes
Diffstat (limited to 'ui/app/components/send')
-rw-r--r--ui/app/components/send/currency-toggle.js6
-rw-r--r--ui/app/components/send/gas-tooltip.js30
2 files changed, 17 insertions, 19 deletions
diff --git a/ui/app/components/send/currency-toggle.js b/ui/app/components/send/currency-toggle.js
index 37c026542..d3c2222a4 100644
--- a/ui/app/components/send/currency-toggle.js
+++ b/ui/app/components/send/currency-toggle.js
@@ -14,13 +14,13 @@ CurrencyToggle.prototype.render = function () {
return h('span', {}, [
h('span', {
className: currentCurrency === 'ETH' ? 'selected-currency' : 'unselected-currency',
- onClick: () => onClick('ETH')
+ onClick: () => onClick('ETH'),
}, ['ETH']),
'<>',
h('span', {
className: currentCurrency === 'USD' ? 'selected-currency' : 'unselected-currency',
- onClick: () => onClick('USD'),
+ onClick: () => onClick('USD'),
}, ['USD']),
- ]) //holding on icon from design
+ ]) // holding on icon from design
}
diff --git a/ui/app/components/send/gas-tooltip.js b/ui/app/components/send/gas-tooltip.js
index 472a8e287..bef419e48 100644
--- a/ui/app/components/send/gas-tooltip.js
+++ b/ui/app/components/send/gas-tooltip.js
@@ -2,7 +2,6 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const InputNumber = require('../input-number.js')
-const findDOMNode = require('react-dom').findDOMNode
module.exports = GasTooltip
@@ -14,14 +13,14 @@ function GasTooltip () {
gasPrice: 0,
}
- this.updateGasPrice = this.updateGasPrice.bind(this);
- this.updateGasLimit = this.updateGasLimit.bind(this);
- this.onClose = this.onClose.bind(this);
+ this.updateGasPrice = this.updateGasPrice.bind(this)
+ this.updateGasLimit = this.updateGasLimit.bind(this)
+ this.onClose = this.onClose.bind(this)
}
GasTooltip.prototype.componentWillMount = function () {
const { gasPrice = 0, gasLimit = 0} = this.props
-
+
this.setState({
gasPrice: parseInt(gasPrice, 16) / 1000000000,
gasLimit: parseInt(gasLimit, 16),
@@ -35,7 +34,7 @@ GasTooltip.prototype.updateGasPrice = function (newPrice) {
this.setState({ gasPrice: newPrice })
onFeeChange({
gasLimit: gasLimit.toString(16),
- gasPrice: (newPrice * 1000000000).toString(16)
+ gasPrice: (newPrice * 1000000000).toString(16),
})
}
@@ -46,29 +45,28 @@ GasTooltip.prototype.updateGasLimit = function (newLimit) {
this.setState({ gasLimit: newLimit })
onFeeChange({
gasLimit: newLimit.toString(16),
- gasPrice: (gasPrice * 1000000000).toString(16)
+ gasPrice: (gasPrice * 1000000000).toString(16),
})
}
GasTooltip.prototype.onClose = function (e) {
- e.stopPropagation();
- this.props.onClose();
+ e.stopPropagation()
+ this.props.onClose()
}
GasTooltip.prototype.render = function () {
- const { position, title, children, className } = this.props
const { gasPrice, gasLimit } = this.state
return h('div.gas-tooltip', {}, [
h('div.gas-tooltip-close-area', {
- onClick: this.onClose
+ onClick: this.onClose,
}),
h('div.customize-gas-tooltip-container', {}, [
h('div.customize-gas-tooltip', {}, [
h('div.gas-tooltip-header.gas-tooltip-label', {}, ['Customize Gas']),
h('div.gas-tooltip-input-label', {}, [
h('span.gas-tooltip-label', {}, ['Gas Price']),
- h('i.fa.fa-info-circle')
+ h('i.fa.fa-info-circle'),
]),
h(InputNumber, {
unitLabel: 'GWEI',
@@ -76,7 +74,7 @@ GasTooltip.prototype.render = function () {
min: 0,
placeholder: '0',
initValue: gasPrice,
- onChange: (newPrice) => this.updateGasPrice(newPrice),
+ onChange: (newPrice) => this.updateGasPrice(newPrice),
}),
h('div.gas-tooltip-input-label', {
style: {
@@ -84,7 +82,7 @@ GasTooltip.prototype.render = function () {
},
}, [
h('span.gas-tooltip-label', {}, ['Gas Limit']),
- h('i.fa.fa-info-circle')
+ h('i.fa.fa-info-circle'),
]),
h(InputNumber, {
unitLabel: 'UNITS',
@@ -92,11 +90,11 @@ GasTooltip.prototype.render = function () {
min: 0,
placeholder: '0',
initValue: gasLimit,
- onChange: (newLimit) => this.updateGasLimit(newLimit),
+ onChange: (newLimit) => this.updateGasLimit(newLimit),
}),
]),
h('div.gas-tooltip-arrow', {}),
- ])
+ ]),
])
}