MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
12.08k stars 4.94k forks source link

[Refactor] Replace logic with calcTokenAmount #25891

Closed digiwand closed 4 months ago

digiwand commented 4 months ago

What is this about?

Once https://github.com/MetaMask/metamask-extension/pull/25799 is merged, we can use calcTokenAmount in other parts of the application. Applying this consistency may prevent bugs and ensure consistent results

Files we can update with this PR:

Potentially other files could be included.

Scenario

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

References

No response

digiwand commented 4 months ago

Marked 3 in the list as done. Did a quick search and did not find other places we could reuse calcTokenAmount.

I think for the remaining two, it is not necessary to utilize calcTokenAmount since they have their own logic using Numeric with hex values. There are also no known issues for these two.