avoid `Unknown People` if possible
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
@@ -31,7 +31,7 @@ public partial class LabelSelectionViewModel : ViewModelBase
public IEnumerable<LabelViewModel> LabelsBlackList => AllLabelViewModel.Where(x => x.IsBlackListed);
- public Pocket[] GetAllPockets()
+ public Pocket[] GetSafeToUsePockets()
{
var pockets = AllPocket.ToList();
@@ -40,6 +40,14 @@ public partial class LabelSelectionViewModel : ViewModelBase
pockets.Add(privatePocket);
}
+ var unlabelledPocket = pockets.FirstOrDefault(x => x.Labels == CoinPocketHelper.UnlabelledFundsText);
+
+ if (unlabelledPocket is { } && pockets.Where(x => x != unlabelledPocket).Sum(x => x.Amount) >= _targetAmount)
+ {
+ var copyPocketArray = pockets.Where(x => x != unlabelledPocket).ToArray();
+ return copyPocketArray;
+ }
+
return pockets.ToArray();
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
@@ -66,20 +66,20 @@ public partial class PrivacyControlViewModel : DialogViewModelBase<IEnumerable<S
if (_isSilent)
{
- var usedPockets = LabelSelection.GetAllPockets();
+ var safeToUsePockets = LabelSelection.GetSafeToUsePockets();
- if (usedPockets.FirstOrDefault(x => x.Labels == CoinPocketHelper.PrivateFundsText) is { } privatePocket &&
+ if (safeToUsePockets.FirstOrDefault(x => x.Labels == CoinPocketHelper.PrivateFundsText) is { } privatePocket &&
privatePocket.Amount >= _transactionInfo.Amount)
{
- Complete(usedPockets.Where(x => x.Labels == CoinPocketHelper.PrivateFundsText));
+ Complete(safeToUsePockets.Where(x => x.Labels == CoinPocketHelper.PrivateFundsText));
}
- else if (usedPockets.Where(x => x.Labels != CoinPocketHelper.PrivateFundsText).Sum(x => x.Amount) >= _transactionInfo.Amount)
+ else if (safeToUsePockets.Where(x => x.Labels != CoinPocketHelper.PrivateFundsText).Sum(x => x.Amount) >= _transactionInfo.Amount)
{
- Complete(usedPockets.Where(x => x.Labels != CoinPocketHelper.PrivateFundsText));
+ Complete(safeToUsePockets.Where(x => x.Labels != CoinPocketHelper.PrivateFundsText));
}
else
{
- Complete(usedPockets);
+ Complete(safeToUsePockets);
}
}
}

avoid `Unknown People` if possible