mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
subtract fee from reissuance token if token is fee asset during reissuance
This commit is contained in:
parent
dfcb26c7bf
commit
72a7dd0704
1 changed files with 4 additions and 0 deletions
|
|
@ -478,6 +478,10 @@ static void SendGenerationTransaction(const CScript& assetScriptPubKey, const CP
|
||||||
if (!reissuanceToken.IsNull()) {
|
if (!reissuanceToken.IsNull()) {
|
||||||
recipient.asset = reissuanceToken;
|
recipient.asset = reissuanceToken;
|
||||||
recipient.nAmount = curBalance; // Or 1?
|
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);
|
vecSend.push_back(recipient);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue