Repository navigation
Fix Localbitcoins fallback strategy - #297
Conversation
There was a problem hiding this comment.
2019-12-27 08:39:33.012 7586-7684/hashengineering.darkcoin.wallet_test E/ExchangeRatesRepository: [pool-7-thread-1] failed to fetch exchange rates with de.schildbach.wallet.rates.DashRatesSecondFallback@66202c8
java.lang.NullPointerException: throw with null exception
at de.schildbach.wallet.rates.LocalBitcoinsRate.getAvg1h(Unknown Source:3) ~[na:0.0]
at de.schildbach.wallet.rates.LocalBitcoinsResponse.getDashVesPrice(LocalBitcoinsResponse.java:17) ~[na:0.0]
at de.schildbach.wallet.rates.DashRatesSecondFallback.getRates(DashRatesSecondFallback.java:36) ~[na:0.0]
at de.schildbach.wallet.rates.ExchangeRatesRepository$1.run(ExchangeRatesRepository.java:85) ~[na:0.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) ~[na:0.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) ~[na:0.0]
at java.lang.Thread.run(Thread.java:764) ~[na:0.0]
I am still getting the above exception in the logs and the Local Currencies list is empty if the first three price sources are commented out.
I will defer to @sambarboza and @tomasz-ludek
I also tried running #222 which upgrades okhttp, but that didn't work either.
Edit: The exception from the log was incorrect on the previous post.
|
@HashEngineering please give it a try with the last commit (updated okhttp3). I assume it might be the source of different problem which can be reproducible only on specific Android devices/os versions |
|
@denlb I tried this updated PR on Android 8.1 and 9.0 and both result in no exchange rates and the same exception. However, if the call to LocalBitcoins is removed, then all rates are obtained and this ends up in the log: I don't understand why its only the LocalBitcoins reponse that gives this error / exception, while all other calls work fine. |
|
@HashEngineering please try again with the last commit, I've fixed another serializer problem. Should work now: |
|
This appears to be working. The rates are retrieved. This PR will also superceed #222. |
| } | ||
| if (currencyCode.equalsIgnoreCase("USDC")) { | ||
| return "USD Coin (USDC)"; | ||
| } |
There was a problem hiding this comment.
Done
Crash issue resolved in afc6bd3#diff-d59db2bdbe7841e4cb222c288bc4e156R76

Missing slash caused HTTP 301
Also USDC caption added because BitPay added USDC rate to the response
No need to update okhttp so far