add Labels section to summary
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
using System.Linq;
using NBitcoin;
using ReactiveUI;
+using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.TransactionBuilding;
-using WalletWasabi.Extensions;
using WalletWasabi.Fluent.Extensions;
using WalletWasabi.Fluent.Helpers;
-using WalletWasabi.Fluent.Models;
using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Send;
@@ -22,6 +21,8 @@ public partial class TransactionSummaryViewModel : ViewModelBase
[AutoNotify] private string _feeText = "";
[AutoNotify] private bool _maxPrivacy;
[AutoNotify] private bool _isCustomFeeUsed;
+ [AutoNotify] private bool _isOtherPocketSelectionPossible;
+ [AutoNotify] private SmartLabel _labels = SmartLabel.Empty;
public TransactionSummaryViewModel(TransactionPreviewViewModel parent, Wallet wallet, TransactionInfo info, BitcoinAddress address, bool isPreview = false)
{
@@ -72,6 +73,11 @@ public partial class TransactionSummaryViewModel : ViewModelBase
TransactionHasPockets = !info.IsPrivate;
+ Labels = SmartLabel.Merge(transactionResult.SpentCoins.Select(x => x.GetLabels(info.PrivateCoinThreshold)));
+ var exactPocketUsed = Labels.Count() == info.UserLabels.Count() && Labels.All(label => info.UserLabels.Contains(label, StringComparer.OrdinalIgnoreCase));
+ TransactionHasPockets = Labels.Any() && !exactPocketUsed;
+
IsCustomFeeUsed = info.IsCustomFeeUsed;
+ IsOtherPocketSelectionPossible = info.IsOtherPocketSelectionPossible;
}
}

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/TransactionSummary.axaml
WalletWasabi.Fluent/Views/Wallets/Send/TransactionSummary.axaml
<Separator />
+ <DockPanel IsVisible="{Binding TransactionHasPockets}">
+ <Button Classes="plain"
+ Command="{Binding Parent.ChangePocketCommand}"
+ ToolTip.Tip="Control your privacy"
+ DockPanel.Dock="Right"
+ Margin="10 0"
+ IsVisible="{Binding IsOtherPocketSelectionPossible}">
+ <Viewbox Height="20">
+ <PathIcon Data="{StaticResource entities_edit_regular}" Foreground="{DynamicResource SystemAccentColor}" />
+ </Viewbox>
+ </Button>
+ <c:PreviewItem Icon="{StaticResource incognito_pathicon}"
+ Label="some people or companies could know about this">
+ <c:LabelsListBox Items="{Binding Labels}"
+ HorizontalAlignment="Left"
+ VerticalAlignment="Center">
+ </c:LabelsListBox>
+ </c:PreviewItem>
+ </DockPanel>
+
+ <Separator IsVisible="{Binding TransactionHasPockets}" />
+
<DockPanel>
<Button Classes="plain"
Command="{Binding Parent.AdjustFeeCommand}"

add Labels section to summary