Improve `PrivacyControlViewModel` to be able handle custom target amount
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
+using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.Fluent.Helpers;
@@ -15,18 +16,16 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send;
public partial class PrivacyControlViewModel : DialogViewModelBase<IEnumerable<SmartCoin>>
{
private readonly Wallet _wallet;
- private readonly TransactionInfo _transactionInfo;
private readonly bool _isSilent;
private readonly IEnumerable<SmartCoin>? _usedCoins;
- public PrivacyControlViewModel(Wallet wallet, TransactionInfo transactionInfo, IEnumerable<SmartCoin>? usedCoins, bool isSilent)
+ public PrivacyControlViewModel(Wallet wallet, TransactionInfo transactionInfo, IEnumerable<SmartCoin>? usedCoins, bool isSilent, Money? targetAmount = null)
{
_wallet = wallet;
- _transactionInfo = transactionInfo;
_isSilent = isSilent;
_usedCoins = usedCoins;
- LabelSelection = new LabelSelectionViewModel(_transactionInfo.Amount);
+ LabelSelection = new LabelSelectionViewModel(targetAmount ?? transactionInfo.Amount);
SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: false);
EnableBack = true;

Improve `PrivacyControlViewModel` to be able handle custom target amount