aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/send.component.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-07 07:21:18 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-07 07:21:18 +0800
commit7c9d942ba165ff53f44985793f28ffb48fa578e1 (patch)
treec588281c58c8bae4a4da228b2e27ea708c4eb09d /ui/app/components/send_/send.component.js
parent6b2511f94f436a30c6c683f9da2c3142d9a6461c (diff)
parentb4aaf30d6fe829f18dea68a5e6cc321b9fb00d4e (diff)
downloadtangerine-wallet-browser-7c9d942ba165ff53f44985793f28ffb48fa578e1.tar
tangerine-wallet-browser-7c9d942ba165ff53f44985793f28ffb48fa578e1.tar.gz
tangerine-wallet-browser-7c9d942ba165ff53f44985793f28ffb48fa578e1.tar.bz2
tangerine-wallet-browser-7c9d942ba165ff53f44985793f28ffb48fa578e1.tar.lz
tangerine-wallet-browser-7c9d942ba165ff53f44985793f28ffb48fa578e1.tar.xz
tangerine-wallet-browser-7c9d942ba165ff53f44985793f28ffb48fa578e1.tar.zst
tangerine-wallet-browser-7c9d942ba165ff53f44985793f28ffb48fa578e1.zip
Merge branch 'develop' of github.com:MetaMask/metamask-extension into initial-trezor-support
Diffstat (limited to 'ui/app/components/send_/send.component.js')
-rw-r--r--ui/app/components/send_/send.component.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/ui/app/components/send_/send.component.js b/ui/app/components/send_/send.component.js
index 219b362f2..b1ab57a2e 100644
--- a/ui/app/components/send_/send.component.js
+++ b/ui/app/components/send_/send.component.js
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
import PersistentForm from '../../../lib/persistent-form'
import {
getAmountErrorObject,
+ getGasFeeErrorObject,
getToAddressForGasUpdate,
doesAmountErrorRequireUpdate,
} from './send.utils'
@@ -112,7 +113,19 @@ export default class SendTransactionScreen extends PersistentForm {
selectedToken,
tokenBalance,
})
- updateSendErrors(amountErrorObject)
+ const gasFeeErrorObject = selectedToken
+ ? getGasFeeErrorObject({
+ amount,
+ amountConversionRate,
+ balance,
+ conversionRate,
+ gasTotal,
+ primaryCurrency,
+ selectedToken,
+ tokenBalance,
+ })
+ : { gasFee: null }
+ updateSendErrors(Object.assign(amountErrorObject, gasFeeErrorObject))
}
if (!uninitialized) {
@@ -143,6 +156,10 @@ export default class SendTransactionScreen extends PersistentForm {
this.updateGas()
}
+ componentWillUnmount () {
+ this.props.resetSendState()
+ }
+
render () {
const { history } = this.props