add switch to hide CJ transactions
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/History/HistoryItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/History/HistoryItemViewModel.cs
@@ -26,6 +26,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.History
}
Labels = transactionSummary.Label;
+
+ IsCoinJoin = transactionSummary.IsLikelyCoinJoinOutput;
}
public bool IsConfirmed { get; }
@@ -37,5 +39,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.History
public string? IncomingAmount { get; }
public string? OutgoingAmount { get; }
+
+ public bool IsCoinJoin { get; }
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/History/HistoryViewModel.cs
using System;
using System.Collections.ObjectModel;
using System.Linq;
+using System.Reactive.Linq;
using System.Threading.Tasks;
using DynamicData;
+using ReactiveUI;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Logging;
using WalletWasabi.Stores;
@@ -16,12 +18,17 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.History
private readonly BitcoinStore _bitcoinStore;
[AutoNotify] private ObservableCollection<HistoryItemViewModel> _histories;
+ [AutoNotify] private bool _hideCoinJoin;
public HistoryViewModel(Wallet wallet, BitcoinStore bitcoinStore)
{
_wallet = wallet;
_bitcoinStore = bitcoinStore;
_histories = new ObservableCollection<HistoryItemViewModel>();
+
+ this.WhenAnyValue(x => x.HideCoinJoin)
+ .ObserveOn(RxApp.MainThreadScheduler)
+ .Subscribe(async _ => await UpdateHistoryAsync());
}
public async Task UpdateHistoryAsync()
@@ -33,6 +40,12 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.History
Histories.Clear();
var trs = txRecordList.Select(transactionSummary => new HistoryItemViewModel(transactionSummary, _bitcoinStore));
+
+ if (HideCoinJoin)
+ {
+ trs = trs.Where(x => !x.IsCoinJoin);
+ }
+
Histories.AddRange(trs.Reverse());
}
catch (Exception ex)

MODIFY
WalletWasabi.Fluent/Views/Wallets/History/HistoryTable.axaml
WalletWasabi.Fluent/Views/Wallets/History/HistoryTable.axaml
x:DataType="history:HistoryViewModel"
x:CompileBindings="True"
x:Class="WalletWasabi.Fluent.Views.Wallets.History.HistoryTable">
- <DataGrid Items="{Binding Histories}">
+ <DockPanel LastChildFill="True">
+ <DockPanel DockPanel.Dock="Top" HorizontalAlignment="Stretch">
+ <StackPanel Orientation="Horizontal" Spacing="10" DockPanel.Dock="Right">
+ <TextBlock Text="Hide CoinJoin transactions" VerticalAlignment="Center" Opacity="0.6"/>
+ <ToggleSwitch IsChecked="{Binding HideCoinJoin}" OnContent="{x:Null}" OffContent="{x:Null}" VerticalAlignment="Center"/>
+ </StackPanel>
+ <Label Content="Transaction History" DockPanel.Dock="Left" FontWeight="Bold" FontSize="16"/>
+ </DockPanel>
+ <DataGrid Items="{Binding Histories}" DockPanel.Dock="Bottom">
<DataGrid.Styles>
<Style Selector="PathIcon">
<Setter Property="Width" Value="20"/>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
+ </DockPanel>
</UserControl>

add switch to hide CJ transactions