Update CWalletTx::GetAmounts() to return COutputEntry for Sapling valueBalance.

This commit is contained in:
Simon 2018-07-31 20:15:00 -07:00
parent f686388991
commit f9816408b2
1 changed files with 12 additions and 0 deletions

View File

@ -1906,6 +1906,18 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
}
}
// If we sent utxos from this transaction, create output for value taken from (negative valueBalance)
// or added (positive valueBalance) to the transparent value pool by Sapling shielding and unshielding.
if (isFromMyTaddr) {
if (valueBalance < 0) {
COutputEntry output = {CNoDestination(), -valueBalance, (int) vout.size()};
listSent.push_back(output);
} else if (valueBalance > 0) {
COutputEntry output = {CNoDestination(), valueBalance, (int) vout.size()};
listReceived.push_back(output);
}
}
// Sent/received.
for (unsigned int i = 0; i < vout.size(); ++i)
{