no need to deal with the original transaction in suggestions
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/ChangeAvoidanceSuggestionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/ChangeAvoidanceSuggestionViewModel.cs
@@ -85,8 +85,7 @@ public partial class ChangeAvoidanceSuggestionViewModel : SuggestionViewModel
return normalized;
}
- public static async
- Task<(ChangeAvoidanceSuggestionViewModel preSelected, IEnumerable<ChangeAvoidanceSuggestionViewModel> items)> GenerateSuggestionsAsync(
+ public static async Task<IEnumerable<ChangeAvoidanceSuggestionViewModel>> GenerateSuggestionsAsync(
TransactionInfo transactionInfo, Wallet wallet, BuildTransactionResult requestedTransaction)
{
var intent = new PaymentIntent(
@@ -145,11 +144,11 @@ public partial class ChangeAvoidanceSuggestionViewModel : SuggestionViewModel
var results = new List<ChangeAvoidanceSuggestionViewModel>();
- foreach (var suggestion in NormalizeSuggestions(suggestions, defaultSelection))
+ foreach (var suggestion in NormalizeSuggestions(suggestions, defaultSelection).Where(x => x != defaultSelection))
{
results.Add(suggestion);
}
- return (defaultSelection, results);
+ return results;
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacySuggestionsFlyoutViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacySuggestionsFlyoutViewModel.cs
@@ -34,20 +34,17 @@ public partial class PrivacySuggestionsFlyoutViewModel : ViewModelBase
{
IsLoading = true;
- var (selected, suggestions) =
+ var suggestions =
await ChangeAvoidanceSuggestionViewModel.GenerateSuggestionsAsync(info, wallet, transaction);
-
Suggestions.Clear();
SelectedSuggestion = null;
- foreach (var suggestion in suggestions.Where(x => !x.IsOriginal))
+ foreach (var suggestion in suggestions)
{
Suggestions.Add(suggestion);
}
- PreviewSuggestion = selected;
-
IsLoading = false;
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -53,8 +53,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
{
if (x is { })
{
- UpdateTransaction(x.IsOriginal ? CurrentTransactionSummary : PreviewTransactionSummary,
- x.TransactionResult);
+ UpdateTransaction(PreviewTransactionSummary, x.TransactionResult);
}
else
{

no need to deal with the original transaction in suggestions