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:
parent
ea80a3e7e3
commit
cfc8b13dbb
1 changed files with 2 additions and 2 deletions
|
@ -368,7 +368,7 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tietMemo.setText(invoice.memo)
|
tietMemo.setText(invoice.memo)
|
||||||
|
|
||||||
var amount = 0.0
|
var amount = 0.0
|
||||||
|
@ -463,7 +463,7 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand
|
||||||
|
|
||||||
// Transfer operation to be sent as a fee to Agorise
|
// Transfer operation to be sent as a fee to Agorise
|
||||||
val feeOperation = getAgoriseFeeOperation(transferOperation)
|
val feeOperation = getAgoriseFeeOperation(transferOperation)
|
||||||
if (feeOperation != null)
|
if (feeOperation != null && (feeOperation.assetAmount?.amount?.toLong() ?: 0L) > 0L)
|
||||||
operations.add(feeOperation)
|
operations.add(feeOperation)
|
||||||
|
|
||||||
transaction = Transaction(privateKey, null, operations)
|
transaction = Transaction(privateKey, null, operations)
|
||||||
|
|
Loading…
Reference in a new issue