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

Number formatting #67

Open
reneaaron opened this issue Aug 30, 2024 · 3 comments
Open

Number formatting #67

reneaaron opened this issue Aug 30, 2024 · 3 comments

Comments

@reneaaron
Copy link
Contributor

  • Seperate thousands by thin space (Unicode: U+2009 ( ,  )), If it's not easy in react, use normal space
  • Add crossed zeroes to all numbers
  • Decimals should work according to the chosen currency (I see comma as decimal for USD, which should be a dot)
@reneaaron reneaaron mentioned this issue Aug 30, 2024
10 tasks
@reneaaron
Copy link
Contributor Author

There also seem to be some problems around the Intl bindings react native has. The option narrowSymbol doesn't seem to be available on all platforms:

https://github.com/getAlby/alby-mobile/blob/master/hooks/useGetFiatAmount.ts#L41

This makes e.g. USD display as US$ instead of just $.

@bumi
Copy link

bumi commented Sep 26, 2024

Is this also related to entering decimal numbers? Currently it seems not possible to enter decimal amounts for fiat currencies.

@reneaaron
Copy link
Contributor Author

#140 has been a first step to address this (just changing the keyboard type), however there are some problems around number formatting / parsing (',' vs. '.' as decimal separator, etc). Probably we should support both? Need to check how other apps handle that...

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

2 participants