getAlby / lightning-browser-extension

The Bitcoin Lightning Browser Extension that brings deep Lightning & Nostr integration to the web. Wallet interface to multiple lightning nodes and key signer for Nostr, Liquid and onchain use.
https://getalby.com/#extension
MIT License
539 stars 194 forks source link

Thousands separator is interpreted as decimal point #813

Open MoritzKa opened 2 years ago

MoritzKa commented 2 years ago

Is your feature request related to a problem? Please describe. image

Describe the solution you'd like Is there a way to interpret the thousands separator correctly?

Describe alternatives you've considered Have an own sat to fiat converter in Alby

Additional context I am not sure how often this actually happens. So it could me an exception.

Are you working on this? (Yes/No) No

bumi commented 2 years ago

note: this is an i18n issue (thousands separator are different in different countries)

escapedcat commented 2 years ago

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString

abhiShandy commented 1 year ago

I want to use this as my first contribution to Alby (and Hactoberfest). Please let me know the context of this issue.

Alby allows users to enter amounts in sats/fiat in numerous places. Eg. the user enters the amount in sats to create an LN invoice here: image

and the Alby converts it to fiat. The input doesn't allow commas right now but allows the decimal dot. Should I change that?

OR, should I add a switch to enter the amount in fiat?