Closed openintents closed 13 years ago
Scaning the QR-code with amount 0.5 on http://bitcoin-labs.github.com/bitcoin-mobile-android/uriScheme.html with a device with non-english locale , e.g. German fails as the amount is formated with "," instead of "." The latter is expected from the parser.
06-07 22:19:49.500: ERROR/AndroidRuntime(4835): java.lang.RuntimeException: invalid amount string: 0,05 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at com.bitcoinlabs.android.MoneyUtils.btcStringToSatoshis(MoneyUtils.java:54) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at com.bitcoinlabs.android.ConfirmPay$1.onClick(ConfirmPay.java:79) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at android.view.View.performClick(View.java:2485) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at android.view.View$PerformClick.run(View.java:9080) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at android.os.Handler.handleCallback(Handler.java:587) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at android.os.Handler.dispatchMessage(Handler.java:92)
FIX: add new DecimalFormatSymbols(Locale.ENGLISH) in MoneyUtils.java (54)
Thanks! We'll include that in the overhaul this weekend.
I pushed the change in MoneyUtils.
Scaning the QR-code with amount 0.5 on http://bitcoin-labs.github.com/bitcoin-mobile-android/uriScheme.html with a device with non-english locale , e.g. German fails as the amount is formated with "," instead of "." The latter is expected from the parser.
06-07 22:19:49.500: ERROR/AndroidRuntime(4835): java.lang.RuntimeException: invalid amount string: 0,05 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at com.bitcoinlabs.android.MoneyUtils.btcStringToSatoshis(MoneyUtils.java:54) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at com.bitcoinlabs.android.ConfirmPay$1.onClick(ConfirmPay.java:79) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at android.view.View.performClick(View.java:2485) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at android.view.View$PerformClick.run(View.java:9080) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at android.os.Handler.handleCallback(Handler.java:587) 06-07 22:19:49.500: ERROR/AndroidRuntime(4835): at android.os.Handler.dispatchMessage(Handler.java:92)
FIX: add new DecimalFormatSymbols(Locale.ENGLISH) in MoneyUtils.java (54)