Add check for duplicated suggestions
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/ChangeAvoidanceSuggestionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/ChangeAvoidanceSuggestionViewModel.cs
@@ -53,7 +53,7 @@ public partial class ChangeAvoidanceSuggestionViewModel : SuggestionViewModel
transactionInfo.FeeRate,
new TxOut(transactionInfo.Amount, destination),
cancellationToken).ConfigureAwait(false);
-
+ List<Money> amounts = new();
await foreach (var selection in selections)
{
if (selection.Any())
@@ -66,6 +66,11 @@ public partial class ChangeAvoidanceSuggestionViewModel : SuggestionViewModel
selection,
tryToSign: false);
+ var destinationAmount = transaction.CalculateDestinationAmount();
+
+ if (!amounts.Contains(destinationAmount))
+ {
+ amounts.Add(destinationAmount);
yield return new ChangeAvoidanceSuggestionViewModel(
transactionInfo.Amount.ToDecimal(MoneyUnit.BTC),
transaction,
@@ -74,3 +79,4 @@ public partial class ChangeAvoidanceSuggestionViewModel : SuggestionViewModel
}
}
}
+}

Add check for duplicated suggestions