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

Option to show fiat value #52

Open
aguycalled opened this issue Apr 11, 2022 · 6 comments
Open

Option to show fiat value #52

aguycalled opened this issue Apr 11, 2022 · 6 comments
Labels

Comments

@aguycalled
Copy link
Member

User should be able to tap on the balance circle to switch between NAV or FIAT value.

Wallet can fetch the price from https://api.coingecko.com/api/v3/simple/price?ids=nav-coin&vs_currencies=CURRENCY, with currency being one of:

                    "BTC"
                    "EUR"
                    "USD"
                    "ARS"
                    "AUD"
                    "BRL"
                    "CAD"
                    "CHF"
                    "CLP"
                    "CZK"
                    "DKK"
                    "GBP"
                    "HKD"
                    "HUF"
                    "IDR"
                    "ILS"
                    "INR"
                    "JPY"
                    "KRW"
                    "MXN"
                    "MYR"
                    "NOK"
                    "NZD"
                    "PHP"
                    "PKR"
                    "PLN"
                    "RUB"
                    "SEK"
                    "SGD"
                    "THB"
                    "TRY"
                    "TWD"
                    "ZAR"

User should be able to set the currency through the Settings screen.

@aguycalled aguycalled added the UI label Apr 11, 2022
@tsejerome
Copy link
Contributor

Shd a wallet contain mulitple fiat? If the wallet is currently in USD, will the amount in BTC be displayed?
Do we need to refresh the wallet once we switch the fiat?
Is there any logic from the useWallet function or from navcoin-js that can handle this issue? Thanks!

Side note: I think switching fiat is a major case (?) So it shd be in main wallet screen instead of settings screen

@aguycalled
Copy link
Member Author

I think only conversion to one currency at the same time might occur.

If the currency is switched, then, if the main wallet is set to show fiat instead of NAV, it should show the chosen currency. So it would show totalValue * fiatRate. fiatRate is read from the coingecko API, which allows fetching multiple currencies at the same time, for example:

https://api.coingecko.com/api/v3/simple/price?ids=nav-coin&vs_currencies=USD,EUR

So switching the currency would not need additional fetches but just setting the fiatRate multiplier.

I would not complicate the main screen with more elements. How do you think it'd be integrated there instead of in settings?

@tsejerome
Copy link
Contributor

Sounds like a fun feature, I will work on it these two days

@tsejerome
Copy link
Contributor

tsejerome commented Apr 20, 2022

I think it won't complicate the main screen a lot as long as we use hooks to handle it, which if we use settings page, we wud still use hooks

@tsejerome
Copy link
Contributor

Sounds like a fun feature, I will work on it these two days

Conscious decision after discussing with @aguycalled
Will work on this earliest next week as we want to focus on stability for android + KO current PRs first, e.g. #82 and #74

@aguycalled
Copy link
Member Author

I think it won't complicate the main screen a lot as long as we use hooks to handle it, which if we use settings page, we wud still use hooks

I mean how would one pick which of the fiat currencies to use for the conversion from the main screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Open
Development

No branches or pull requests

3 participants