Makes CoinList neutral
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -59,7 +59,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Password = "";
TimeLeftTillRoundTimeout = TimeSpan.Zero;
- CoinsList = new CoinListViewModel(CoinListContainerType.CoinJoinTabViewModel);
+ CoinsList = new CoinListViewModel();
Observable
.FromEventPattern<SmartCoin>(CoinsList, nameof(CoinsList.DequeueCoinsPressed))

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
@@ -57,7 +57,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private object SelectionChangedLock { get; } = new object();
private object StateChangedLock { get; } = new object();
private Global Global { get; }
- public CoinListContainerType CoinListContainerType { get; }
public ReactiveCommand<Unit, Unit> SelectAllCheckBoxCommand { get; }
public ReactiveCommand<Unit, Unit> SelectPrivateCheckBoxCommand { get; }
public ReactiveCommand<Unit, Unit> SelectNonPrivateCheckBoxCommand { get; }
@@ -72,6 +71,8 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public ReadOnlyObservableCollection<CoinViewModel> Coins => _coinViewModels;
+ public bool DisplayWarningAboutCommonOwnership { get; set; } = false;
+
private SortExpressionComparer<CoinViewModel> MyComparer
{
get => _myComparer;
@@ -246,11 +247,10 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
}
- public CoinListViewModel(CoinListContainerType coinListContainerType)
+ public CoinListViewModel()
{
Global = Locator.Current.GetService<Global>();
- CoinListContainerType = coinListContainerType;
AmountSortDirection = SortOrder.Decreasing;
CoinJoinStatusWidth = new GridLength(0);
@@ -499,7 +499,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
SelectedAmount = selectedCoins.Sum(x => x.Amount);
IsAnyCoinSelected = selectedCoins.Any();
- LabelExposeCommonOwnershipWarning = CoinListContainerType == CoinListContainerType.CoinJoinTabViewModel
+ LabelExposeCommonOwnershipWarning = !DisplayWarningAboutCommonOwnership
? false
: selectedCoins
.Where(c => c.AnonymitySet == 1)

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -34,7 +34,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public CoinListViewModel Owner { get; }
private Global Global { get; }
- public bool InCoinJoinContainer { get; }
public ReactiveCommand<Unit, Unit> DequeueCoin { get; }
@@ -44,7 +43,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Model = model;
Owner = owner;
- InCoinJoinContainer = owner.CoinListContainerType == CoinListContainerType.CoinJoinTabViewModel;
RefreshSmartCoinStatus();

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -111,7 +111,9 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
ResetUi();
SetAmountWatermark(Money.Zero);
- CoinList = new CoinListViewModel(CoinListContainerType.SendTabViewModel);
+ CoinList = new CoinListViewModel(){
+ DisplayWarningAboutCommonOwnership = true
+ };
Observable.FromEventPattern(CoinList, nameof(CoinList.SelectionChanged))
.ObserveOn(RxApp.MainThreadScheduler)

Makes CoinList neutral