diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 255213d64..e93525ff5 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1856,9 +1856,8 @@ void CWalletTx::GetAmounts(list& listReceived, // Compute fee if we sent this transaction. if (isFromMyTaddr) { - CAmount nValueOut = GetValueOut(); // transparent outputs plus all vpub_old - CAmount nValueIn = 0; - nValueIn += GetShieldedValueIn(); + CAmount nValueOut = GetValueOut(); // transparent outputs plus all Sprout vpub_old and negative Sapling valueBalance + CAmount nValueIn = GetShieldedValueIn(); nFee = nDebit - nValueOut + nValueIn; }