From cfc8b13dbb97cba257f75a079c0f4624019c2395 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Wed, 16 Jan 2019 15:31:54 -0600 Subject: [PATCH] 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. --- .../bitsybitshareswallet/fragments/SendTransactionFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/SendTransactionFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/SendTransactionFragment.kt index 6dffca3..d0551ac 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/SendTransactionFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/SendTransactionFragment.kt @@ -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)