diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-08 21:50:25 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-09 03:14:45 +0800 |
commit | 57ead4914f6f9fd1fe47b865559e4908a36f6a8a (patch) | |
tree | e9a8fedb5f7abd87e923726b070f92b9b792b4b0 /ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js | |
parent | 57d458233b189e6752acacbaed97e8fce092b95e (diff) | |
download | tangerine-wallet-browser-57ead4914f6f9fd1fe47b865559e4908a36f6a8a.tar.gz tangerine-wallet-browser-57ead4914f6f9fd1fe47b865559e4908a36f6a8a.tar.zst tangerine-wallet-browser-57ead4914f6f9fd1fe47b865559e4908a36f6a8a.zip |
Fix inline advanced gas editing
Diffstat (limited to 'ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js')
-rw-r--r-- | ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js index 98cde4b03..2ecbe4a64 100644 --- a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js +++ b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js @@ -14,12 +14,6 @@ import { GAS_LIMIT_TOO_LOW_ERROR_KEY, } from '../../../constants/error-keys' import { getHexGasTotal } from '../../../helpers/confirm-transaction/util' -import { - convertGasPriceForInputs, - convertGasLimitForInputs, - decimalToHex, - decGWEIToHexWEI, -} from '../../../helpers/conversions.util' import { isBalanceSufficient, calcGasTotal } from '../../send/send.utils' import { conversionGreaterThan } from '../../../conversion-util' import { MIN_GAS_LIMIT_DEC } from '../../send/send.constants' @@ -132,12 +126,10 @@ const mapStateToProps = (state, props) => { unapprovedTxCount, currentNetworkUnapprovedTxs, customGas: { - gasLimit: customGasLimit || gasPrice, - gasPrice: customGasPrice || gasLimit, + gasLimit: customGasLimit || gasLimit, + gasPrice: customGasPrice || gasPrice, }, advancedInlineGasShown: getAdvancedInlineGasShown(state), - gasPrice: convertGasPriceForInputs(gasPrice), - gasLimit: convertGasLimitForInputs(gasLimit), insufficientBalance, } } @@ -155,12 +147,6 @@ const mapDispatchToProps = dispatch => { updateGasAndCalculate: ({ gasLimit, gasPrice }) => { return dispatch(updateGasAndCalculate({ gasLimit, gasPrice })) }, - convertThenUpdateGasAndCalculate: ({ gasLimit, gasPrice }) => { - return dispatch(updateGasAndCalculate({ - gasLimit: decimalToHex(gasLimit), - gasPrice: decGWEIToHexWEI(gasPrice), - })) - }, showRejectTransactionsConfirmationModal: ({ onSubmit, unapprovedTxCount }) => { return dispatch(showModal({ name: 'REJECT_TRANSACTIONS', onSubmit, unapprovedTxCount })) }, @@ -235,6 +221,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { validate: validateEditGas, }), cancelAllTransactions: () => dispatchCancelAllTransactions(valuesFor(unapprovedTxs)), + updateGasAndCalculate, } } |