add semi private pocket
MODIFY
WalletWasabi.Fluent/Helpers/CoinPocketHelper.cs
WalletWasabi.Fluent/Helpers/CoinPocketHelper.cs
@@ -11,13 +11,14 @@ public static class CoinPocketHelper
{
public static readonly SmartLabel UnlabelledFundsText = new("Unknown People");
public static readonly SmartLabel PrivateFundsText = new("Private Funds");
+ public static readonly SmartLabel SemiPrivateFundsText = new("Semi-Private Funds");
public static IEnumerable<(SmartLabel SmartLabel, ICoinsView Coins)> GetPockets(this ICoinsView allCoins, int privateAnonSetThreshold)
{
List<(SmartLabel SmartLabel, ICoinsView Coins)> pockets = new();
var clusters = new Dictionary<SmartLabel, List<SmartCoin>>();
- foreach (SmartCoin coin in allCoins.Where(x => x.HdPubKey.AnonymitySet < privateAnonSetThreshold))
+ foreach (SmartCoin coin in allCoins.Where(x => x.HdPubKey.AnonymitySet < 2))
{
var cluster = coin.HdPubKey.Cluster.Labels;
@@ -60,6 +61,12 @@ public static class CoinPocketHelper
pockets.Add(new(PrivateFundsText, privateCoins));
}
+ var semiPrivateCoins = new CoinsView(allCoins.Where(x => x.HdPubKey.AnonymitySet >= 2 && x.HdPubKey.AnonymitySet < privateAnonSetThreshold));
+ if (semiPrivateCoins.Any())
+ {
+ pockets.Add(new(SemiPrivateFundsText, semiPrivateCoins));
+ }
+
return pockets;
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
@@ -18,6 +18,7 @@ public partial class LabelSelectionViewModel : ViewModelBase
[AutoNotify] private bool _enoughSelected;
private Pocket _privatePocket = Pocket.Empty;
+ private Pocket _semiPrivatePocket = Pocket.Empty;
private bool _includePrivatePocket;
private Pocket[] _allPockets = Array.Empty<Pocket>();
@@ -160,7 +161,12 @@ public partial class LabelSelectionViewModel : ViewModelBase
_privatePocket = privatePocket;
}
- NonPrivatePockets = pockets.Where(x => x != _privatePocket).ToArray();
+ if (pockets.FirstOrDefault(x => x.Labels == CoinPocketHelper.SemiPrivateFundsText) is { } semiPrivatePocket)
+ {
+ _semiPrivatePocket = semiPrivatePocket;
+ }
+
+ NonPrivatePockets = pockets.Where(x => x != _privatePocket && x != _semiPrivatePocket).ToArray();
var allLabels = SmartLabel.Merge(NonPrivatePockets.Select(x => x.Labels));
AllLabelsViewModel = allLabels.Select(x => new LabelViewModel(this, x)).ToArray();

add semi private pocket