[Bug]: Investigate and apply Permit token decimal value to Spending Cap and Message values #27243
Labels
regression-develop
Regression bug that was found on development branch, but not yet present in production
Sev2-normal
Normal severity; minor loss of service or inconvenience.
team-confirmations
Push issues to confirmations team
type-bug
Describe the bug
When we adopted
fetchErc20Decimals
for Permit Simulation, we enforced a default of 18 token decimals to be used when no token decimals are found in the details.fetchErc30Decimals
is the same method used inui/pages/confirmations/components/simulation-details/useBalanceChanges.test.ts
which is why we adopted it.Now, we can observe that the value no longer matches the value from previous confirmation versions.
Previously, clicking on test-dapp > Permit would display 3,000. Now, it displays 0 < 0.000001.
We also did not apply
fetchErc20Decimals
to the "Value" in the Message section which we can see the inconsistency of.The question is, do we want to default to 18 decimals if no token decimals were found from the details?
If so:
fetchErc20Decimals
to Message > token valuesElse:
fetchErc20Decimals
usage in permit-simulation or updatefetchErc20Decimals
default decimal valueInvestigation Lead
@dbrans:
Expected behavior
No response
Screenshots/Recordings
Notice that Simulation > Spending Cap value does not match Message > Value
Steps to reproduce
Error messages or log output
No response
Detection stage
On the development branch
Version
12.2.2
Build type
None
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
No response
Severity
No response
The text was updated successfully, but these errors were encountered: