-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[Bug]: Rounding issue in approval amount (use site suggestion) #8199
Copy link
Copy link
Closed
Labels
Sev1-highAn issue that may have caused fund loss or access to wallet in the past & may still be ongoingAn issue that may have caused fund loss or access to wallet in the past & may still be ongoingexternal-contributorregression-prod-7.12.3Regression bug that was found in production in release 7.12.3Regression bug that was found in production in release 7.12.3release-7.17.0Issue or pull request that will be included in release 7.17.0Issue or pull request that will be included in release 7.17.0team-confirmationsPush issues to confirmations teamPush issues to confirmations teamteam-confirmations-secure-ux-deprecatedDEPRECATED: please use "team-confirmations" insteadDEPRECATED: please use "team-confirmations" insteadtype-bugSomething isn't workingSomething isn't working
Metadata
Metadata
Assignees
Labels
Sev1-highAn issue that may have caused fund loss or access to wallet in the past & may still be ongoingAn issue that may have caused fund loss or access to wallet in the past & may still be ongoingexternal-contributorregression-prod-7.12.3Regression bug that was found in production in release 7.12.3Regression bug that was found in production in release 7.12.3release-7.17.0Issue or pull request that will be included in release 7.17.0Issue or pull request that will be included in release 7.17.0team-confirmationsPush issues to confirmations teamPush issues to confirmations teamteam-confirmations-secure-ux-deprecatedDEPRECATED: please use "team-confirmations" insteadDEPRECATED: please use "team-confirmations" insteadtype-bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
While testing our dApp using metamask webview / metamask android, I saw that the approval transaction amount is modified by metamask even if the user clicks on "Use site suggestion".
I believe there is a rounding issue when metamask decodes and encodes the user amount.
For example, this is the tx data which is generated by dApp:
and this is the final data used by metamask even if user clicks on use site suggestion:
as you can see, the amount part is slightly changed.
Expected amount based on original data: 6.296359739485676709
Metamask modified version: 6.296359739485676544
Screenshots/Recordings
None
Expected behavior
I think when user clicks on use site suggestion, dapp transaction data should not be changed.
Steps to reproduce
(0x095ea7b300000000000000000000000069460570c93f9de5e2edbc3052bf10125f0ca22d000000000000000000000000000000000000000000000000576129d2d21d6400)
Error messages or log output
There is no specific error log.
Version
7.12.3
Build type
None
Device
Samsung S21
Operating system
Android
Additional context
I faced this bug in Metamask android version several times, but I'm not sure if it is only related to Metamask mobile or the android version.
Severity
It creates some bugs during the next steps of dapps transactions flow.