metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

[Bug]: Incorrect balance displayed when adding a token with lots of decimals

Open seaona opened this issue 1 year ago • 1 comments

Describe the bug

Problem: whenever I am adding a token with lots of decimals (i.e. 30) I can see how the balance displayed is incorrect.

Expected behavior

I'm expecting to see 10 TST like in Extension

Screenshots/Recordings

https://github.com/MetaMask/metamask-mobile/assets/54408225/d95d99bb-e460-4e22-8fa7-2289d69cff34

Steps to reproduce

  1. Go to the test dapp https://metamask.github.io/test-dapp/
  2. Connect MM
  3. Deploy an ERC20 token withg 30 decimals
  4. Click Add Tokens to wallet
  5. See balance displayed is 4.2498937....e+26, when it should be 10

Error messages or log output

No response

Version

7.16.0 rc branch but seems an old issue

Build type

None

Device

Pixel 6

Operating system

iOS, Android

Additional context

No response

Severity

No response

seaona avatar Feb 19 '24 14:02 seaona

Hi There! Thank you for reporting this, it has been assigned to a team to be looked at.

Bullcoiner avatar Feb 20 '24 21:02 Bullcoiner

Hi @salimtb , we weren't sure during the bug triage session: is this something you've been working on recently?

gauthierpetetin avatar Mar 01 '24 16:03 gauthierpetetin

hey @gauthierpetetin , i increased the number of decimals that we can support , but i did it lot of month ago. but i have good knowledge on this, maybe we need to increase it again, i can work on it

salimtb avatar Mar 01 '24 16:03 salimtb

@gauthierpetetin the bug is on mobile , the work that i have done was on extension

salimtb avatar Mar 01 '24 16:03 salimtb

Ok makes sense, thanks for the explanation!

gauthierpetetin avatar Mar 02 '24 20:03 gauthierpetetin

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 7 days. Thank you for your contributions.

github-actions[bot] avatar May 31 '24 21:05 github-actions[bot]