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

more decimal places need to be allowed in amount inputs #453

Open
madvas opened this issue Feb 20, 2025 · 1 comment
Open

more decimal places need to be allowed in amount inputs #453

madvas opened this issue Feb 20, 2025 · 1 comment
Assignees
Labels

Comments

@madvas
Copy link
Collaborator

madvas commented Feb 20, 2025

Image

Since any token is allowed, we certainly need to allow more than 3 decimal places for amount inputs, either in invoice or proposals, basically everywhere for token amount input

@madis
Copy link
Member

madis commented Feb 24, 2025

Currently the UI component that handles the decimals is c-token-amount-input and the logic is the following:

decimals-for-ui (min decimals max-ui-decimals)

Using the token decimals as defined in its smart contract directly could be one option, but it would make the up and down arrows unusable (as the increment is the last decimal, i.e. 0.000000000000000001 for ETH and 0.000001 for USDC.

Another option would be a more sophisticated UI (e.g. switching between WEI and ETH for ethereum) but it would be hard to come up with something universal for all the other tokens.

Do you prefer one of these or have a different solution in mind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants