From c605c9897d40f8fc2568b63d33cfc018635bcf25 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 29 Aug 2017 16:09:56 -0230 Subject: [PATCH] Minor clean up. --- ui/app/components/gas-tooltip.js | 7 +------ ui/app/css/itcss/components/send.scss | 5 +++++ ui/app/send.js | 17 ++++++----------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/ui/app/components/gas-tooltip.js b/ui/app/components/gas-tooltip.js index 29d1af4ad..68b7aea61 100644 --- a/ui/app/components/gas-tooltip.js +++ b/ui/app/components/gas-tooltip.js @@ -59,12 +59,7 @@ GasTooltip.prototype.render = function () { const { position, title, children, className } = this.props const { gasPrice, gasLimit } = this.state - return h('div', { - style: { - display: 'flex', - justifyContent: 'center', - } - }, [ + return h('div.gas-tooltip', {}, [ h('div.gas-tooltip-close-area', { onClick: this.onClose }), diff --git a/ui/app/css/itcss/components/send.scss b/ui/app/css/itcss/components/send.scss index 8609fb399..507351cd1 100644 --- a/ui/app/css/itcss/components/send.scss +++ b/ui/app/css/itcss/components/send.scss @@ -148,6 +148,11 @@ position: relative; } +.gas-tooltip { + display: flex; + justify-content: center; +} + .gas-tooltip-label { font-size: 16px; color: $tundora; diff --git a/ui/app/send.js b/ui/app/send.js index a65c51d30..848f53f7c 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -66,14 +66,11 @@ function SendTransactionScreen () { tooltipIsOpen: false, } - this.back = this.back.bind(this) this.back = this.back.bind(this) this.closeTooltip = this.closeTooltip.bind(this) this.onSubmit = this.onSubmit.bind(this) - this.onSubmit = this.onSubmit.bind(this) this.recipientDidChange = this.recipientDidChange.bind(this) this.setCurrentCurrency = this.setCurrentCurrency.bind(this) - this.setCurrentCurrency = this.setCurrentCurrency.bind(this) this.toggleTooltip = this.toggleTooltip.bind(this) } @@ -232,13 +229,11 @@ SendTransactionScreen.prototype.render = function () { onClose: this.closeTooltip, onFeeChange: ({gasLimit, gasPrice}) => { this.setState({ - newTx: Object.assign( - this.state.newTx, - { - gas: gasLimit, - gasPrice, - } - ), + newTx: { + ...this.state.newTx, + gas: gasLimit, + gasPrice, + }, }) } }), @@ -287,7 +282,7 @@ SendTransactionScreen.prototype.render = function () { } }), h('div.send-screen-gas-input-customize', { - onClick: () => this.toggleTooltip.bind(this)(!this.state.tooltipIsOpen), + onClick: this.toggleTooltip, }, [ 'Customize' ]),