metamask-extension
metamask-extension copied to clipboard
[Bug]: Sending MAX amount while having low balance results in error.
Describe the bug
For accounts with a lower balance, the calculation of the 'MAX' amount may not be accurately reflecting the available balance and estimated gas fees. This discrepancy can lead to an amount being suggested that exceeds the actual balance, clicking 'Continue' seems to do nothing, error appear in the background console.
Expected behavior
The Max amount on confirmation screen accurately reflects account balance, taking into account the gas estimation.
Screenshots/Recordings
https://github.com/MetaMask/metamask-extension/assets/104780023/8ec17a67-e1a8-4cde-b030-93c38a31d270
Steps to reproduce
- Have an account with low balance (e.i. 0.000001 ETH)
- Try to send MAX amount
- See the amount to be sent exceeds the actual account balance
- Click 'Continue'
- See the error in the background console
Error messages or log output
No response
Version
dev build <mb843/data-flows>
Build type
None
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
No response
Severity
No response
Still present on the latest build:
https://github.com/MetaMask/metamask-extension/assets/104780023/252c65de-9013-4ac8-8d99-6c9d24f8b9c0
@micaelae @BZahory @ejwessel Correct behavior for sending Max amount with insufficient funds, production 11.15.5- 'Max' and 'Confirm' disabled:
https://github.com/MetaMask/metamask-extension/assets/104780023/f9eff0b7-3107-48f4-ba02-7aebf45b988f
Current 14.4.4 behavior:
https://github.com/MetaMask/metamask-extension/assets/104780023/643a700c-1a8f-428e-8669-e9a2680beadd
https://github.com/MetaMask/metamask-extension/assets/44588480/9da8bb18-4337-48a8-82e0-75fe3a3750ce
Resolve the Max button issue in c091dd28193e9d628df69a3ad03c44ed2f76594b