do not take into account the pending CJs
ADD
WalletWasabi.Fluent/Extensions/TransactionSummaryExtension.cs
+using WalletWasabi.Blockchain.Transactions;
+using WalletWasabi.Models;
+
+namespace WalletWasabi.Fluent.Extensions
+{
+ public static class TransactionSummaryExtension
+ {
+ public static bool IsConfirmed(this TransactionSummary model)
+ {
+ var confirmations = model.Height.Type == HeightType.Chain ? (int)Services.BitcoinStore.SmartHeaderChain.TipHeight - model.Height.Value + 1 : 0;
+ return confirmations > 0;
+ }
+ }
+}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItemViewModel.cs
@@ -8,6 +8,7 @@ using System.Windows.Input;
using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.Transactions;
+using WalletWasabi.Fluent.Extensions;
using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Models;
@@ -75,8 +76,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
{
OrderIndex = item.OrderIndex;
Date = item.TransactionSummary.DateTime.ToLocalTime();
- var confirmations = item.TransactionSummary.Height.Type == HeightType.Chain ? (int) Services.BitcoinStore.SmartHeaderChain.TipHeight - item.TransactionSummary.Height.Value + 1 : 0;
- IsConfirmed = confirmations > 0;
+ IsConfirmed = item.TransactionSummary.IsConfirmed();
}
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
@@ -13,6 +13,7 @@ using DynamicData.Binding;
using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.Transactions;
+using WalletWasabi.Fluent.Extensions;
using WalletWasabi.Logging;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
@@ -143,16 +144,19 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
{
var nextItem = txRecordList[j];
- if (nextItem.IsLikelyCoinJoinOutput)
- {
- item.Amount += nextItem.Amount;
- }
- else
+ if (!nextItem.IsLikelyCoinJoinOutput)
{
i = j - 1;
yield return item;
break;
}
+
+ if (!nextItem.IsConfirmed())
+ {
+ continue;
+ }
+
+ item.Amount += nextItem.Amount;
}
}
else

do not take into account the pending CJs