Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ichthus1604 committed Apr 18, 2024
1 parent df6f012 commit af6f0fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public partial class PrivacySuggestionsFlyoutViewModel : ViewModelBase
[AutoNotify] private bool _goodPrivacy;
[AutoNotify] private bool _maxPrivacy;

public PrivacySuggestionsFlyoutViewModel(IWalletModel wallet)
public PrivacySuggestionsFlyoutViewModel(IWalletModel wallet, SendParameters sendParameters)
{
_privacySuggestionsModel = wallet.GetPrivacySuggestionsModel();
_privacySuggestionsModel = wallet.GetPrivacySuggestionsModel(sendParameters);
}

public ObservableCollection<PrivacyWarning> Warnings { get; } = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send;
public partial class TransactionPreviewViewModel : RoutableViewModel
{
private readonly Stack<(BuildTransactionResult, TransactionInfo)> _undoHistory;
//private readonly Wallet _wallet;
private readonly Wallet _wallet;
private readonly IWalletModel _walletModel;
private TransactionInfo _info;
private TransactionInfo _currentTransactionInfo;
Expand All @@ -41,17 +41,17 @@ public partial class TransactionPreviewViewModel : RoutableViewModel
[AutoNotify] private bool _canUndo;
[AutoNotify] private bool _isCoinControlVisible;

public TransactionPreviewViewModel(UiContext uiContext, Wallet wallet, IWalletModel walletModel, SendParameters parameters)
public TransactionPreviewViewModel(UiContext uiContext, IWalletModel walletModel, SendParameters parameters)
{
_undoHistory = new();
_wallet = wallet;
_wallet = parameters.Wallet;
_walletModel = walletModel;

_info = info;
_currentTransactionInfo = info.Clone();
_info = parameters.TransactionInfo ?? throw new InvalidOperationException($"Missing required TransactionInfo.");
_currentTransactionInfo = _info.Clone();
_cancellationTokenSource = new CancellationTokenSource();

PrivacySuggestions = new PrivacySuggestionsFlyoutViewModel(walletModel);
PrivacySuggestions = new PrivacySuggestionsFlyoutViewModel(walletModel, parameters);
CurrentTransactionSummary = new TransactionSummaryViewModel(uiContext, this, walletModel, _info);
PreviewTransactionSummary = new TransactionSummaryViewModel(uiContext, this, walletModel, _info, true);

Expand Down

0 comments on commit af6f0fd

Please sign in to comment.