MetaMask / MetaMask/metamask-mobile

[Bug][`Asset`]: Inconsistency decimals length for tokens balance in the asset page

Open
#19,678 0 comments 0 reactions 1 assignee Claimed by @OGPoyraz View on GitHub
regression-RC-7.55.0 Sev3-low team-confirmations type-bug
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### Describe the bug

Depending on the token, we show different number of decimals in the assets page. This doesn't seem to correlate with the token contract decimals or the balance.

We should probably cap it at a max decimals: 5 so it matches the token list in the home page.

Numbers smaller than 0.00001 should be shown as `<0.00001`.

### Expected behavior

_No response_

### Screenshots/Recordings

Image

### Steps to reproduce

1. Click Send
2. Notice the token balances for your token list

### Error messages or log output

```shell

```

### Detection stage

During release testing

### Version

7.55.0

### Build type

None

### Device

iphone 11

### Operating system

iOS

### Additional context

_No response_

### Severity

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.