fix code warnings.
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/ChangeAvoidanceSuggestionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/ChangeAvoidanceSuggestionViewModel.cs
@@ -22,10 +22,8 @@ public partial class ChangeAvoidanceSuggestionViewModel : SuggestionViewModel
PrivacyOptimisationLevel optimisationLevel,
decimal fiatExchangeRate,
bool isOriginal,
- params PrivacySuggestionBenefit[] benefits)
+ params PrivacySuggestionBenefit[] benefits) : base(transactionResult, isOriginal)
{
- IsOriginal = isOriginal;
- TransactionResult = transactionResult;
_optimisationLevel = optimisationLevel;
_benefits = benefits.ToList();
@@ -88,8 +86,7 @@ public partial class ChangeAvoidanceSuggestionViewModel : SuggestionViewModel
}
public static async
- Task<(ChangeAvoidanceSuggestionViewModel preSelected, IEnumerable<ChangeAvoidanceSuggestionViewModel> items
- )> GenerateSuggestions(
+ Task<(ChangeAvoidanceSuggestionViewModel preSelected, IEnumerable<ChangeAvoidanceSuggestionViewModel> items)> GenerateSuggestionsAsync(
TransactionInfo transactionInfo, Wallet wallet, BuildTransactionResult requestedTransaction)
{
var intent = new PaymentIntent(

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SuggestionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SuggestionViewModel.cs
@@ -4,9 +4,13 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send;
public class SuggestionViewModel : ViewModelBase
{
- public bool IsOriginal { get; protected set; }
+ public SuggestionViewModel(BuildTransactionResult transactionResult, bool isOriginal = false)
+ {
+ IsOriginal = isOriginal;
+ TransactionResult = transactionResult;
+ }
- public string Suggestion { get; set; }
+ public bool IsOriginal { get; protected set; }
public BuildTransactionResult TransactionResult { get; protected set; }
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -345,7 +345,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
IsLoading = true;
var (selected, suggestions) =
- await ChangeAvoidanceSuggestionViewModel.GenerateSuggestions(_info, _wallet,
+ await ChangeAvoidanceSuggestionViewModel.GenerateSuggestionsAsync(_info, _wallet,
_transaction);
IsLoading = false;

fix code warnings.