always force the user to acknowledge label selection when non-private funds are used.
MODIFY
WalletWasabi.Fluent/Controls/QuestionControl.axaml
WalletWasabi.Fluent/Controls/QuestionControl.axaml
<Style Selector="Button.yesNo">
<Setter Property="Width" Value="150" />
<Setter Property="Height" Value="40" />
+ <Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{StaticResource FontSizeH6}" />

ADD
WalletWasabi.Fluent/ViewModels/Wallets/Send/ConfirmLabelsDialogViewModel.cs
+using System.Reactive;
+using System.Windows.Input;
+using ReactiveUI;
+using WalletWasabi.Fluent.ViewModels.Dialogs.Base;
+
+namespace WalletWasabi.Fluent.ViewModels.Wallets.Send;
+
+public class ConfirmLabelsDialogViewModel : DialogViewModelBase<bool>
+{
+ public ConfirmLabelsDialogViewModel(PocketSuggestionViewModel suggestion)
+ {
+ SetupCancel(true, false, false);
+
+ NextCommand = ReactiveCommand.Create(() => Close());
+ CancelCommand = ReactiveCommand.Create(() => Close(DialogResultKind.Normal, true));
+
+ Suggestion = suggestion;
+ }
+
+ public PocketSuggestionViewModel Suggestion { get; }
+
+ public override string Title { get; protected set; }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using System.Windows.Input;
using NBitcoin;
using ReactiveUI;
+using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.TransactionBuilding;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Exceptions;
@@ -401,7 +402,21 @@ public partial class TransactionPreviewViewModel : RoutableViewModel
{
UpdateTransaction(CurrentTransactionSummary, initialTransaction);
- await PrivacySuggestions.BuildPrivacySuggestionsAsync(_wallet, _info, _destination, initialTransaction, _isFixedAmount, _cancellationTokenSource.Token);
+ var showDialogTask = CurrentTransactionSummary.TransactionHasPockets
+ ? NavigateDialogAsync(
+ new ConfirmLabelsDialogViewModel(
+ new PocketSuggestionViewModel(SmartLabel.Merge(initialTransaction.SpentCoins.Select(x => x.GetLabels(_wallet.KeyManager.MinAnonScoreTarget)))))
+ , NavigationTarget.CompactDialogScreen)
+ : Task.FromResult(new DialogResult<bool>(true, DialogResultKind.Normal));
+
+ var buildSuggestionsTask = PrivacySuggestions.BuildPrivacySuggestionsAsync(_wallet, _info, _destination, initialTransaction, _isFixedAmount, _cancellationTokenSource.Token);
+
+ await Task.WhenAll(showDialogTask, buildSuggestionsTask);
+
+ if(!(await showDialogTask).Result)
+ {
+ await OnChangePocketsAsync();
+ }
}
else
{

ADD
WalletWasabi.Fluent/Views/Wallets/Send/ConfirmLabelsDialogView.axaml
+<UserControl xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:controls="clr-namespace:WalletWasabi.Fluent.Controls"
+ xmlns:send="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Send"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:CompileBindings="True"
+ x:DataType="send:ConfirmLabelsDialogViewModel"
+ x:Class="WalletWasabi.Fluent.Views.Wallets.Send.ConfirmLabelsDialogView">
+ <controls:ContentArea>
+ <controls:QuestionControl HighlightButton="YesButton"
+ YesCommand="{Binding NextCommand}"
+ NoCommand="{Binding CancelCommand}">
+ <StackPanel Spacing="20" DataContext="{Binding Suggestion}">
+ <PathIcon DockPanel.Dock="Top" Data="{StaticResource incognito_filled}" Height="25" Width="25"
+ Foreground="{DynamicResource SystemAccentColor}" />
+
+ <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap"
+ Text="Some people or companies could know about this:" />
+
+ <DockPanel LastChildFill="False" HorizontalAlignment="Center">
+ <controls:TagsBox Padding="0"
+ Margin="0"
+ MinWidth="0"
+ BorderThickness="0"
+ DockPanel.Dock="Left"
+ IsReadOnly="True"
+ Items="{Binding Labels}"
+ HorizontalAlignment="Stretch"
+ VerticalAlignment="Center" />
+ <Button Classes="labelFlyout"
+ DockPanel.Dock="Left"
+ IsVisible="{Binding !!FilteredLabels.Count}"
+ Content="..."
+ Margin="0 4 0 0">
+ <Button.Flyout>
+ <Flyout Placement="BottomEdgeAlignedLeft" ShowMode="TransientWithDismissOnPointerMoveAway">
+ <controls:TagsBox IsReadOnly="True"
+ Items="{Binding FilteredLabels}" />
+ </Flyout>
+ </Button.Flyout>
+ <ToolTip.Tip>
+ <Panel>
+ <controls:TagsBox IsReadOnly="True"
+ Margin="4,6,0,0"
+ Items="{Binding FilteredLabels}" />
+ </Panel>
+ </ToolTip.Tip>
+ </Button>
+ </DockPanel>
+
+ <TextBlock Text="Control your privacy?" TextWrapping="Wrap" HorizontalAlignment="Center" />
+
+ </StackPanel>
+ </controls:QuestionControl>
+ </controls:ContentArea>
+</UserControl>
\ No newline at end of file

ADD
WalletWasabi.Fluent/Views/Wallets/Send/ConfirmLabelsDialogView.axaml.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Wallets.Send;
+
+public class ConfirmLabelsDialogView : UserControl
+{
+ public ConfirmLabelsDialogView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+}
\ No newline at end of file

always force the user to acknowledge label selection when non-private funds are used.