From 72a7dd0704633f6714633a9c6d3abffc334e3be2 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Wed, 11 Jul 2018 11:43:07 -0400 Subject: [PATCH] subtract fee from reissuance token if token is fee asset during reissuance --- src/wallet/rpcwallet.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index b8f7a26352..2313ca7308 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -478,6 +478,10 @@ static void SendGenerationTransaction(const CScript& assetScriptPubKey, const CP if (!reissuanceToken.IsNull()) { recipient.asset = reissuanceToken; recipient.nAmount = curBalance; // Or 1? + // If the issuance token *is* the fee asset, subtract fee from this output + if (reissuanceToken == policyAsset) { + recipient.fSubtractFeeFromAmount = true; + } } vecSend.push_back(recipient); }