bitcoin-connect
bitcoin-connect copied to clipboard
Update currency selector UI
It would be nice to have a sleek currency selector in the modal so user can see in their own currency
I prepared rough design HERE
https://github.com/getAlby/bitcoin-connect/assets/68239231/562ec8bc-ebc3-4fb0-a8d1-1e9e692061e0
I used this icons resource, but I am sure there's some nice library for this
Nice to have:
- searching currency by typing, it would automatically select (live search)
Dev conditions defined by @rolznz
- No assets should be embedded
- Only the bc-currency-switcher component should be edited
This looks awesome. @rolznz do you have in mind specific CDN for assets or what do you suggest? What should be the rules for localization/formatting?
Maybe we could use UTF flag chars.
Maybe we could use UTF flag chars.
Although it won't look so good, maybe this is best. We are trying to remove external dependencies to keep this library minimal and secure. @stackingsaunter would you be happy with this?
Note: I think there are also some issues with using flags to choose a currency (since some countries can have multiple currencies), but this is a limited list, right? @stackingsaunter
yeah. some countries have multiple currencies and multiple countries share same currency..
I'll prepare PR and we can go from there.
I haven't found a way to get country -> currency mapping using Intl. Or it could be hardcoded?
Is there a list of currency-country mapping on api?
Also I noticed there are made multiples calls to api, when changeing currency. need to take a look why..
Can this be closed @rolznz ?