iron-fish / ironfish

A novel cryptocurrency focused on privacy and accessibility.
https://ironfish.network
Mozilla Public License 2.0
963 stars 574 forks source link

Multi-Asset Send succeeds with 0 balance #3097

Closed TheKidKevin closed 1 year ago

TheKidKevin commented 1 year ago

What happened?

A bug happened! Multi-Asset Send transaction succeeds even though asset balance is 0. Ironfish send bug

Version

0.1.6.2

Debug output

No response

Relevant log output

ubuntu@ip-172-31-13-0:~$ ironfish wallet:send
? Select the asset you wish to send ab318df3f6a5df135ecfe40f524044254e9a6c8f7fafc521ff65343ca892b014 (Sojourner)
Enter the amount (balance: 0.00000000): 0
Enter the public address of the recipient: dfc2679369551e64e3950e06a88e68466e813c63b100283520045925adbe59ca
Enter the fee amount in $IRON (min: 0.00000001 recommended: 0.00000001) [0.00000001]: 0.00000001

You are about to send:
ab318df3f6a5df135ecfe40f524044254e9a6c8f7fafc521ff65343ca892b014 0.00000000 plus a transaction fee of $IRON 0.00000001 to dfc2679369551e64e3950e06a88e68466e813c63b100283520045925adbe59ca from the account default

* This action is NOT reversible *

Do you confirm (Y/N)?: Y
Creating the transaction: [████████████████████████████████████████] 100% | ETA: 0s

Sending ab318df3f6a5df135ecfe40f524044254e9a6c8f7fafc521ff65343ca892b014 0.00000000 to dfc2679369551e64e3950e06a88e68466e813c63b100283520045925adbe59ca from default
Transaction Hash: 61425143edb556caae7ca178e4cc9ec93104f5d6a5e1451e1fd65c6422838a79
Transaction fee: $IRON 0.00000001

Find the transaction on https://explorer.ironfish.network/transaction/61425143edb556caae7ca178e4cc9ec93104f5d6a5e1451e1fd65c6422838a79 (it can take a few minutes before the transaction appears in the Explorer)

Graffiti

Sojourner

hughy commented 1 year ago

We've added input validation for the send amount.