Default token list has an error in token decimals which breaks the interface for those tokens
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Bug Description
The Uniswap interface by default pulls tokens from the Coin Market Cap Token List without any intervention from the user. This token list specifies a incorrect number of decimals for at least one token - see: https://github.com/Uniswap/token-lists/issues/128 This breaks the Uniswap interface because the balance of tokens held is not read correctly.
Although it's Coin Market Cap's responsibility to fix the list, does it make sense to allow Token List Creators to over-ride the number of decimals specified directly in the contract itself? In what scenario could that be desirable? Also, should Coin Market Cap's Token List be a default source if it's known to contain errors?
Steps to Reproduce
- Open Uniswap - https://app.uniswap.org/
- Search for a problem token (i.e. CGT) from the Coin Market Cap Token List
- Observe the balance is not displayed correctly because the decimals are set to 18 instead of the correct 8 in the case of CGT (0xF5238462E7235c7B62811567E63Dd17d12C2EAA0)
Expected Behavior
Display the correct balance.
Additional Context
See related issue: https://github.com/Uniswap/token-lists/issues/128
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in app.uniswap.org by searching for CGT and comparing the displayed balance with its contract decimals and the Coin Market Cap token list. Review the related token-lists issue, then determine whether the interface should permit contract-level decimal overrides or stop using this default source; done means the correct balance is displayed and the source or override behavior is decided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100