-
Notifications
You must be signed in to change notification settings - Fork 207
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
[ERTP] decimal property #119
Comments
How does Intl (internationalization API) handle formatting of currency amounts? |
I've used it only a little, but i've had a really good experience with it This issue is about the fact that if you create a currency with ERTP, you represent it only with natural numbers (like cents for dollars or satoshi for bitcoins), but ERTP does not allow to configure what a canonical string representation for the currency would be. This is where allowing mint authors to provide a Where i see the connection is that it can be recommanded to mint authors to use Intl/NumberFormat to write their formatting functions. But ERTP still needs to provide a way to share the |
follow up to Agoric/documentation#65 (comment)_
I imagine a good place for this could be the mint configuration. It's not clear to me how exactly yet
But it could take the form of a
stringify
function that takes units as argument and would return a string representing the units. Example: units representing dollars would be an object with the extent expressed as cents (like the number1234
for $12.34) and the stringify function would return the string12.34
The text was updated successfully, but these errors were encountered: