Update CWalletTx::GetAmounts() to return COutputEntry for Sapling valueBalance.
This commit is contained in:
parent
f686388991
commit
f9816408b2
|
@ -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.
|
// Sent/received.
|
||||||
for (unsigned int i = 0; i < vout.size(); ++i)
|
for (unsigned int i = 0; i < vout.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue