mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Prevent user from selecting max amount until there is an estimated gas total.
This commit is contained in:
parent
1bd18cebd7
commit
68604b53dd
@ -396,6 +396,7 @@ 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', [
|
||||||
@ -403,7 +404,7 @@ SendTransactionScreen.prototype.renderAmountRow = function () {
|
|||||||
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user