-
Notifications
You must be signed in to change notification settings - Fork 48
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
Balance
is always treated like network currency
#472
Comments
i guess thats not a bug |
Agree this can be confusing. It's blindly stating the chains token symbol for any Adding some custom logic for detecting an interaction with a psp22 contract could help here, however imho the actual benefits are a bit limited. I would almost rather opt for not showing any Symbol on a |
IMO the most simple fix would be a little toggle in the input field that either denominates the value as a balance (12 decimals) or doesn't denominate at all. Just removing the symbol still leaves up the question: Is this value denominated or now? And if yes, how many decimals? |
Hey, when working with fungible token contracts (i.e. PSP-22) we've noticed that contracts-ui is statically assuming that values with the
Balance
type are always the native chain currency with it's decimals & token identifier.In the PSP-22 interface,
Balance
is just an alias type foru128
and can have any decimal & any token identifier. And as the input field is already denominating with the networks decimals (e.g. 12) it's super confusing that it assumes the same for other tokens Balances.Maybe adding a "Network Currency" switch that switches between networks decimals & token symbol between just the plain
u128
value w/o any decimals applied would help here?The text was updated successfully, but these errors were encountered: