Avoid adding an operation to send a fee to agorise when the amount is zero, this can happen when the amount that is going to be sent is very small such that 0.01% of that is less than the minimum amount available of that asset.

This commit is contained in:
Severiano Jaramillo 2019-01-16 15:31:54 -06:00
parent ea80a3e7e3
commit cfc8b13dbb

View file

@ -368,7 +368,7 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand
break
}
}
tietMemo.setText(invoice.memo)
var amount = 0.0
@ -463,7 +463,7 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand
// Transfer operation to be sent as a fee to Agorise
val feeOperation = getAgoriseFeeOperation(transferOperation)
if (feeOperation != null)
if (feeOperation != null && (feeOperation.assetAmount?.amount?.toLong() ?: 0L) > 0L)
operations.add(feeOperation)
transaction = Transaction(privateKey, null, operations)