Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling decimal mismatch when switching tokens with different decimal support #21330

Open
VolodLytvynenko opened this issue Sep 26, 2024 · 0 comments

Comments

@VolodLytvynenko
Copy link
Contributor

VolodLytvynenko commented Sep 26, 2024

Steps to Reproduce:

  1. Select a token with 18 decimal support (like DAI) in the Send field.
  2. Change the token to one with 6 decimal support (like USDC).

Actual Result:

The behavior is inconsistent or undefined when switching tokens with different decimal places.

decimals.mp4

Expected Result:

Potential solutions:

  • Clear the field: Some apps, like TrustWallet and Binance, clear the value to 0 when switching tokens with different decimal support.
binance.mp4

OR

  • Other apps, like Uniswap, do not treat this as a critical issue. They allow the 18 decimals to remain for tokens with only 6 decimal support and do not recalculate the value.
usniswap.mp4

In such case the validation message "Token supports fewer decimals. Please adjust the value." should be shown

discussed with design team https://discord.com/channels/1210237582470807632/1270072144067563520/1288802954626990090

OS:

IOS, Android

Devices:

  • Pixel 7a, Android 13
  • iPhone 11 Pro Max, IOS 17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant