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

Sui TypeScript SDK: Add formatAmount() util #17791

Open
kkomelin opened this issue May 17, 2024 · 0 comments
Open

Sui TypeScript SDK: Add formatAmount() util #17791

kkomelin opened this issue May 17, 2024 · 0 comments
Assignees
Labels

Comments

@kkomelin
Copy link

kkomelin commented May 17, 2024

Problem/Motivation

It would be good to have a standard way to format Sui amounts with TypeScript SDK, like existing formatDigest() or formatAddress().
It's a very trivial operation and it's necessary for many projects, so it deserves to be standardised, in my opinion.

And, moreover, you already have it implemented here: formatAmount()

Look how even example projects now have to copy&paste the code. Not the best way because you cannot pull the latest bug fixes and updates automatically.

Proposed resolution

Move formatAmount() function from apps to TypeScript SDK utils.

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

4 participants