Litecoin-Java / bitcoin-wallet

Bitcoin Wallet app for your Android device. Standalone Bitcoin node, no centralized backend required.
https://play.google.com/store/apps/details?id=de.schildbach.wallet
31 stars 42 forks source link

Negative outputs crash the app #50

Closed hank closed 10 years ago

hank commented 10 years ago

Looks like someone tried to put in a negative number perhaps? WTF happened here? From Developer Console crash reports.

java.lang.IllegalArgumentException: Negative values not allowed
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
at com.google.bitcoin.core.TransactionOutput.<init>(TransactionOutput.java:111)
at com.google.bitcoin.core.TransactionOutput.<init>(TransactionOutput.java:95)
at com.google.bitcoin.core.Transaction.addOutput(Transaction.java:732)
at com.google.bitcoin.core.Wallet$SendRequest.to(Wallet.java:1599)
at de.schildbach.wallet.ui.SendCoinsFragment.handleGo(SendCoinsFragment.java:897)
at de.schildbach.wallet.ui.SendCoinsFragment.access$1800(SendCoinsFragment.java:107)
at de.schildbach.wallet.ui.SendCoinsFragment$7.onClick(SendCoinsFragment.java:466)
at android.view.View.performClick(View.java:4475)
at android.view.View$PerformClick.run(View.java:18786)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
at dalvik.system.NativeStart.main(Native Method)

Perhaps we should make sure one can't enter negative amounts, but I thought that was the case already.

hank commented 10 years ago

Just tried and my phone won't let me enter a negative amount.. Going with wontfix.