1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #3444 from danjm/i3348-minus-not-a-number

Prevent user from selecting max amount until gas is estimated.
This commit is contained in:
Dan Finlay 2018-03-06 15:05:25 -08:00 committed by GitHub
commit 31e7d9263f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,14 +396,15 @@ SendTransactionScreen.prototype.renderAmountRow = function () {
amount, amount,
setMaxModeTo, setMaxModeTo,
maxModeOn, maxModeOn,
gasTotal,
} = this.props } = this.props
return h('div.send-v2__form-row', [ return h('div.send-v2__form-row', [
h('div.send-v2__form-label', [ h('div.send-v2__form-label', [
'Amount:', 'Amount:',
this.renderErrorMessage('amount'), this.renderErrorMessage('amount'),
!errors.amount && h('div.send-v2__amount-max', { !errors.amount && gasTotal && h('div.send-v2__amount-max', {
onClick: (event) => { onClick: (event) => {
event.preventDefault() event.preventDefault()
setMaxModeTo(true) setMaxModeTo(true)