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

Add dynamic token precision #40

Open
dchernokur opened this issue May 22, 2024 · 2 comments
Open

Add dynamic token precision #40

dchernokur opened this issue May 22, 2024 · 2 comments

Comments

@dchernokur
Copy link
Collaborator

dchernokur commented May 22, 2024

We have a static const VAULT_TOKEN_PRECISION_VALUE with 8 decimals for now.
We should fetch this info for respective vault token with readHederaVaultDecimals call and use the response value for the amounts formatting int <> bigint

@dchernokur
Copy link
Collaborator Author

This also should be considered for the output formatting of the tokens and balances we show in the UI.

@dchernokur
Copy link
Collaborator Author

dchernokur commented Aug 22, 2024

I've ran into SyntaxError when using current way of formatting bigints from numbers with decimals, like trying to mint 1000 tokens.

We should swap our current formatNumberToBigint and formatBalance to viem's parseUnits and formatUnits respectively for more reliability.

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

No branches or pull requests

1 participant