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

Support for "non 3-letter currency codes" #322

Open
mjkeaton opened this issue Jan 20, 2025 · 0 comments · May be fixed by #323
Open

Support for "non 3-letter currency codes" #322

mjkeaton opened this issue Jan 20, 2025 · 0 comments · May be fixed by #323

Comments

@mjkeaton
Copy link

mjkeaton commented Jan 20, 2025

There is an error parsing displaying tokens with "unit" not complying with ISO 4217 3-letter codes, e.g. mlsat.
Apparently NumberFormat does not like it.. hence it is not displaying the amount in the "Receive ecash" dialog.

As far as I am aware, NUTs do not define the type of "unit" other than for it to be a string, right?
Should "non 3-letter currency codes" be supported, e.g. "mlsat" (.length > 3) or "$" (.length < 3) ?

RangeError: invalid currency code in NumberFormat(): mlsat
    formatCurrency https://wallet.cashu.me/assets/base.bb67c1f5.js:1
    displayUnit https://wallet.cashu.me/assets/WalletPage.240f3745.js:1

Any chance the amount can still be displayed?

With "mlsat" currency:
Image

With "sat" currency:
Image

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

Successfully merging a pull request may close this issue.

1 participant