1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Prevent user from selecting max amount until there is an estimated gas total.

This commit is contained in:
Dan 2018-03-05 23:12:06 -03:30
parent 1bd18cebd7
commit 68604b53dd

View File

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