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 438845d commit df6f012
Showing 1 changed file with 9 additions and 9 deletions.
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,7 +41,7 @@ public partial class TransactionPreviewViewModel : RoutableViewModel
[AutoNotify] private bool _canUndo;
[AutoNotify] private bool _isCoinControlVisible;

public TransactionPreviewViewModel(UiContext uiContext, Wallet wallet, IWalletModel walletModel, TransactionInfo info)
public TransactionPreviewViewModel(UiContext uiContext, Wallet wallet, IWalletModel walletModel, SendParameters parameters)
{
_undoHistory = new();
_wallet = wallet;
Expand All @@ -51,15 +51,15 @@ public TransactionPreviewViewModel(UiContext uiContext, Wallet wallet, IWalletMo
_currentTransactionInfo = info.Clone();
_cancellationTokenSource = new CancellationTokenSource();

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

TransactionSummaries = new List<TransactionSummaryViewModel>
{
TransactionSummaries =
[
CurrentTransactionSummary,
PreviewTransactionSummary
};
];

DisplayedTransactionSummary = CurrentTransactionSummary;

Expand Down Expand Up @@ -104,7 +104,7 @@ public TransactionPreviewViewModel(UiContext uiContext, Wallet wallet, IWalletMo

public PrivacySuggestionsFlyoutViewModel PrivacySuggestions { get; }

public bool PreferPsbtWorkflow => _wallet.KeyManager.PreferPsbtWorkflow;
public bool PreferPsbtWorkflow => _walletModel.Settings.PreferPsbtWorkflow;

public ICommand AdjustFeeCommand { get; }

Expand Down

0 comments on commit df6f012

Please sign in to comment.