diff --git a/ui/app/components/currency-input.js b/ui/app/components/currency-input.js index 016f14d3e..66880091f 100644 --- a/ui/app/components/currency-input.js +++ b/ui/app/components/currency-input.js @@ -40,7 +40,7 @@ function sanitizeDecimal (val) { // sanitizeValue('.200') -> '0.200' // sanitizeValue('a.b.1.c,89.123') -> '0.189123' function sanitizeValue (value) { - let [integer, point, decimal] = (/([^.]*)([.]?)([^.]*)/).exec(value) + let [ , integer, point, decimal] = (/([^.]*)([.]?)([^.]*)/).exec(value) integer = sanitizeInteger(integer) || '0' decimal = sanitizeDecimal(decimal) diff --git a/ui/app/components/pending-tx/confirm-send-ether.js b/ui/app/components/pending-tx/confirm-send-ether.js index 8b5801aec..b4d955b80 100644 --- a/ui/app/components/pending-tx/confirm-send-ether.js +++ b/ui/app/components/pending-tx/confirm-send-ether.js @@ -40,16 +40,15 @@ function mapDispatchToProps (dispatch) { const { gas: gasLimit, gasPrice, - from, to, - value: amount + value: amount, } = txParams dispatch(actions.editTx(id)) - dispatch(actions.updateGasLimit(gasLimit)), - dispatch(actions.updateGasPrice(gasPrice)), - dispatch(actions.updateSendTo(to)), - dispatch(actions.updateSendAmount(amount)), - dispatch(actions.updateSendErrors({ to: null, amount: null })), + dispatch(actions.updateGasLimit(gasLimit)) + dispatch(actions.updateGasPrice(gasPrice)) + dispatch(actions.updateSendTo(to)) + dispatch(actions.updateSendAmount(amount)) + dispatch(actions.updateSendErrors({ to: null, amount: null })) dispatch(actions.showSendPage()) }, cancelTransaction: ({ id }) => dispatch(actions.cancelTx({ id })), @@ -176,7 +175,7 @@ ConfirmSendEther.prototype.getData = function () { } ConfirmSendEther.prototype.render = function () { - const { editTransaction, selectedAddress, currentCurrency, clearSend } = this.props + const { editTransaction, currentCurrency, clearSend } = this.props const txMeta = this.gatherTxMeta() const txParams = txMeta.txParams || {} @@ -441,7 +440,7 @@ ConfirmSendEther.prototype.getFormEl = function () { ConfirmSendEther.prototype.gatherTxMeta = function () { const props = this.props const state = this.state - let txData = clone(state.txData) || clone(props.txData) + const txData = clone(state.txData) || clone(props.txData) if (props.send.editingTransactionId) { const { @@ -450,7 +449,7 @@ ConfirmSendEther.prototype.gatherTxMeta = function () { amount: value, gasLimit: gas, gasPrice, - } + }, } = props const { txParams: { from, to } } = txData txData.txParams = { diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index bc0d0a4b3..56bf1fba6 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -150,9 +150,9 @@ function reduceMetamask (state, action) { case actions.SAVE_ACCOUNT_LABEL: const account = action.value.account const name = action.value.label - var id = {} + const id = {} id[account] = extend(metamaskState.identities[account], { name }) - var identities = extend(metamaskState.identities, id) + const identities = extend(metamaskState.identities, id) return extend(metamaskState, { identities }) case actions.SET_CURRENT_FIAT: @@ -272,10 +272,10 @@ function reduceMetamask (state, action) { }) case actions.UPDATE_TRANSACTION_PARAMS: - const { id, value } = action + const { id: txId, value } = action let { selectedAddressTxList } = metamaskState selectedAddressTxList = selectedAddressTxList.map(tx => { - if (tx.id === id) { + if (tx.id === txId) { tx.txParams = value } return tx diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js index b7e904ea8..0d745c66e 100644 --- a/ui/app/send-v2.js +++ b/ui/app/send-v2.js @@ -111,7 +111,7 @@ SendTransactionScreen.prototype.componentWillMount = function () { .all([ getGasPrice(), estimateGas(estimateGasParams), - tokenContract && tokenContract.balanceOf(from.address) + tokenContract && tokenContract.balanceOf(from.address), ]) .then(([gasPrice, gas, usersToken]) => { @@ -565,9 +565,7 @@ SendTransactionScreen.prototype.onSubmit = function (event) { gasPrice, signTokenTx, signTx, - updateAndApproveTx, selectedToken, - toAccounts, editingTransactionId, errors: { amount: amountError, to: toError }, backToConfirmScreen,