Open plasmacorral opened 10 months ago
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.
Describe the bug
Advanced gas is denoted in GWEI and as such it should be impossible to submit a value less than 0.000000000 (0 WEI) when paying gas in ETH. However, the input field lacks appropriate validation and allows a user to save unacceptable values between 10 and 17 decimal places beyond 0 GWEI. (a)
The UI is also misleading in that when gas less than 1 WEI is offered, the estimated gas shown on confirmation does not match what gets broadcast (shown in recordings a & d). I also notice that if the gas offering is less than 1000 WEI it will be represented in scientific notation if the user goes back to review through the edit link after initially saving. (b)
There also seems to be rounding when a value is less than 1 WEI, such that that .99 WEI is will be rounded up to 1 WEI when the transaction is submitted. (c)
In the event that a user attempts to offer 17+ decimal positions after 0, the input box is reset when the 18th character after decimal is entered.(d)
Expected behavior
User should see an error and not be able to proceed if they attempt to offer less than 0 WEI (0.0000000000+ ten positions or more beyond 0) User should not see gas values presented in scientific notation User should be presented a gas estimate that matches what they authorized after using advanced gas, in the confirmation.
Screenshots/Recordings
8a. Offering less than 1 WEI (.00077 WEI keyed in as 0.00000000000077 GWEI) truncates values to 0 contrary to subsequent UI presentation: https://recordit.co/zU6smrP7aM
8b. Offering 3 WEI max (0.000000003) presents in scientific notation: https://recordit.co/hDurLwjDpy 8c. Offering 0.00000000099 max priority fee (.99 WEI) is rounded up to 1 WEI when submitted to network, even though activity details show gas being offered at 0 and confirmation screen showed 0.0000315 Sepolia ETH: https://recordit.co/e7bj2mJpXn 8d. Attempting to supply a value more than 17 decimal positions beyond 0 results in the input field resetting IN this video I typed 0.000000000000000009, but the 9 reset the field resulting in a value of 0 being saved: https://recordit.co/0lwwQZDCfO
Steps to reproduce
All the steps are the same for each of the 4 observations here, and only step 8 changes slightly with each variation-
Next
Market
Advanced
Save
edit
to review the submission0
and Max base fee of1.500000013
now in details, 8b shows values in scientific notationX
to close and not save over valuesConfirm
Error messages or log output
No response
Version
11.4.0
Build type
None
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
This was initially observed in 11.4.0 RC commit 6723b69a074c6d1efb02948c0639041d8211891c, but confirmed in both 11.2.0 and 11.3.0 in chrome 117 on Mac Sonoma 14.0 while using Sepolia testnet.
Severity
No response