force navigation to privacy control.
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
using System.Collections.ObjectModel;
+using System.Linq;
+using System.Reactive.Disposables;
+using NBitcoin;
+using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.Fluent.ViewModels.Navigation;
+using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
{
[NavigationMetaData(Title = "Privacy Control")]
public partial class PrivacyControlViewModel : RoutableViewModel
{
+ private readonly Wallet _wallet;
+ private readonly TransactionInfo _transactionInfo;
+
[AutoNotify] private ObservableCollection<PocketViewModel> _pockets;
- public PrivacyControlViewModel()
+ public PrivacyControlViewModel(Wallet wallet, TransactionInfo transactionInfoInfo)
{
+ _wallet = wallet;
+ _transactionInfo = transactionInfoInfo;
_pockets = new ObservableCollection<PocketViewModel>();
+ }
- _pockets.Add(new PocketViewModel
+ protected override void OnNavigatedTo(bool isInHistory, CompositeDisposable disposables)
{
- TotalBtc = 1.3m,
- Labels = "Adam, Max, Dan"
- });
+ base.OnNavigatedTo(isInHistory, disposables);
- _pockets.Add(new PocketViewModel
- {
- TotalBtc = 2.4m,
- Labels = "Bob, Alice"
- });
+ var clusters = _wallet.Coins.OfType<SmartCoin>().GroupBy(x=>x.HdPubKey.Cluster);
- _pockets.Add(new PocketViewModel
+ foreach (var cluster in clusters)
{
- TotalBtc = 0.3m,
- Labels = "Coinbase"
- });
+ var labels = cluster.Key.Labels;
- _pockets.Add(new PocketViewModel
- {
- TotalBtc = 0.1m,
- Labels = "David"
- });
-
- _pockets.Add(new PocketViewModel
- {
- TotalBtc = 0.1m,
- Labels = "Unlabelled"
- });
+ var amount = cluster.Select(x => x.Amount).Sum(x => x.ToDecimal(MoneyUnit.BTC));
_pockets.Add(new PocketViewModel
{
- TotalBtc = 0.3m,
- Labels = "Private"
+ Labels = string.Join(", ", labels.Labels),
+ TotalBtc = amount
});
}
}
}
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -105,7 +105,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
var targetAnonymitySet = wallet.ServiceConfiguration.GetMixUntilAnonymitySetValue();
var mixedCoins = wallet.Coins.Where(x => x.HdPubKey.AnonymitySet >= targetAnonymitySet).ToList();
- if (mixedCoins.Any())
+ if (false)//(mixedCoins.Any())
{
var intent = new PaymentIntent(
destination: transactionInfo.Address,
@@ -132,7 +132,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
}
}
- Navigate().To(new PrivacyControlViewModel());
+ Navigate().To(new PrivacyControlViewModel(wallet, transactionInfo));
});
}

force navigation to privacy control.