Closed Gitju closed 10 years ago
Should be fixed in https://github.com/Gitju/bitcoin-wallet/commit/0ab11511e3b82fee040e799ea4aa4d2afcba3456 Accordingly to BigDecimal(BigInteger unscaledVal, int scale) "Translates a BigInteger unscaled value and an int scale into a BigDecimal." in http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html
In https://github.com/Gitju/bitcoin-wallet/blob/messy/wallet/src/de/schildbach/wallet/ExchangeRatesProvider.java#L352 fromNanoCoins throws an exception when running in the background and resuming the app after a while. This is caused by final BigDecimal decUsdRate = GenericUtils.fromNanoCoins(usdRate.rate, 0); in https://github.com/Gitju/bitcoin-wallet/blob/messy/wallet/src/de/schildbach/wallet/ExchangeRatesProvider.java#L352 where BigDecimal needs to round a value and don't know how. This will be fixed soon.