fix for multiple overlap
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
@@ -42,7 +42,9 @@ public class LabelSelectionViewModel : ViewModelBase
{
var associatedPockets = AllPocket.Where(x => x.Labels.Contains(labelViewModel.Value)).OrderBy(x => x.Labels.Count());
var smallestAssociatedPocket = associatedPockets.First();
- var allAssociatedLabels = smallestAssociatedPocket.Labels;
+ var smallestAssociatedPocketLabels = smallestAssociatedPocket.Labels;
+ var allAssociatedPockets = AllPocket.Where(x => x.Labels.Any(y => smallestAssociatedPocketLabels.Contains(y)));
+ var allAssociatedLabels = SmartLabel.Merge(allAssociatedPockets.Select(x => x.Labels));
var affectedLabelViewModels = AllLabelViewModel.Where(x => x.IsBlackListed == labelViewModel.IsBlackListed && allAssociatedLabels.Contains(x.Value));
return affectedLabelViewModels.ToArray();
}

MODIFY
WalletWasabi.Tests/UnitTests/UserInterfaceTest/PocketSelectionTests.cs
WalletWasabi.Tests/UnitTests/UserInterfaceTest/PocketSelectionTests.cs
@@ -206,7 +206,7 @@ public class PocketSelectionTests
Assert.Contains(selection.GetLabel("Roland"), selection.LabelsBlackList);
Assert.Contains(selection.GetLabel("Dan"), selection.LabelsBlackList);
- selection.GetLabel("Dan").IsHighlighted = true;
+ selection.GetLabel("Dan").IsPointerOver = true;
Assert.True(selection.GetLabel("Dan").IsHighlighted);
Assert.False(selection.GetLabel("Roland").IsHighlighted);
@@ -231,10 +231,10 @@ public class PocketSelectionTests
Assert.Contains(selection.GetLabel("Roland"), selection.LabelsBlackList);
Assert.Contains(selection.GetLabel("Dan"), selection.LabelsBlackList);
- selection.GetLabel("Dan").IsHighlighted = true;
+ selection.GetLabel("Dan").IsPointerOver = true;
Assert.True(selection.GetLabel("Dan").IsHighlighted);
- Assert.False(selection.GetLabel("Roland").IsHighlighted);
+ Assert.True(selection.GetLabel("Roland").IsHighlighted);
Assert.True(selection.GetLabel("Target").IsHighlighted);
}
@@ -309,8 +309,6 @@ public class PocketSelectionTests
Assert.Contains(selection.GetLabel("Lucas"), selection.LabelsWhiteList);
Assert.Contains(selection.GetLabel("Jumar"), selection.LabelsWhiteList);
}
-
-
}
internal static class LabelTestExtensions
@@ -325,4 +323,3 @@ internal static class LabelTestExtensions
pockets.Add(new Pocket(new(new SmartLabel(labels), new TestCoinsView(Money.FromUnit(amount, MoneyUnit.BTC)))));
}
}
-

fix for multiple overlap