Blockstream / green_android

Blockstream Green Wallet for Android
GNU General Public License v3.0
177 stars 74 forks source link

Fiat value is displayed as "n/a" when fx rate look up fails #143

Closed kaiwolfram closed 1 year ago

kaiwolfram commented 2 years ago

Description

Sometimes the app fails to fetch the current exchange rate and then displays the wallet's fiat value as "n/a". I think this is undesirable, especially when the wallet has 0 sats. In this case it should always show "0 USD" and not "n/a", independent of the fetched fiat value.

Version

3.8.2 and also latest master e853833ce78ee50664d7f8ed7afd19360651a661

Steps to reproduce

Reopen your wallet until "n/a" is shown. When Tor is activated it almost always shows "n/a" (on my phone and also in Android Studio).

Expected behaviour

Show "0 USD" and not "n/a" when wallet has 0 sats. Also don't show "n/a" at all when fx rate lookup fails, just like in the transaction detail view (imo).

Actual behaviour

When fiat value lookup fails the wallet's value is shown as "n/a" even when it has no sats.

Screenshots

"n/a" in overview but not in transaction details image image

Device or machine

On Nokia 5 with Android 9 and also Android Studio on Ubuntu 22.04

domegabri commented 1 year ago

hello, in the transaction details you shared there is no fiat amounts. For the tor issue, thats because the price feed we are using blocks connections from tor clients. This will be fixed in a following release when we will use a new endpoint accepting requests via tor. We'll fix the N/A label when balance is zero. Thanks for the report