diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e93525ff5..2aa589dae 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1906,6 +1906,18 @@ void CWalletTx::GetAmounts(list& 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) {