fix adjust fees and adjust pockets.
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -38,8 +38,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
_info = info;
PrivacySuggestions = new PrivacySuggestionsFlyoutViewModel();
- CurrentTransactionSummary = new TransactionSummaryViewModel(_wallet, _info);
- PreviewTransactionSummary = new TransactionSummaryViewModel(_wallet, _info);
+ CurrentTransactionSummary = new TransactionSummaryViewModel(this, _wallet, _info);
+ PreviewTransactionSummary = new TransactionSummaryViewModel(this, _wallet, _info, true);
TransactionSummaries = new List<TransactionSummaryViewModel>
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
@@ -22,10 +22,12 @@ public partial class TransactionSummaryViewModel : ViewModelBase
[AutoNotify] private bool _maxPrivacy;
[AutoNotify] private bool _isCustomFeeUsed;
- public TransactionSummaryViewModel(Wallet wallet, TransactionInfo info)
+ public TransactionSummaryViewModel(TransactionPreviewViewModel parent, Wallet wallet, TransactionInfo info, bool isPreview = false)
{
+ Parent = parent;
_wallet = wallet;
_info = info;
+ IsPreview = isPreview;
_labels = SmartLabel.Empty;
@@ -37,6 +39,10 @@ public partial class TransactionSummaryViewModel : ViewModelBase
IsPayJoin = PayJoinUrl is not null;
}
+ public TransactionPreviewViewModel Parent { get; }
+
+ public bool IsPreview { get; }
+
public string AddressText { get; }
public string? PayJoinUrl { get; }

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/TransactionSummary.axaml
WalletWasabi.Fluent/Views/Wallets/Send/TransactionSummary.axaml
xmlns:c="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="False"
+ x:CompileBindings="True"
x:DataType="send:TransactionSummaryViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Send.TransactionSummary">
<StackPanel Spacing="15">
<DockPanel>
<Button Classes="plain"
- Command="{Binding ChangePocketsCommand}"
- IsVisible="{Binding TransactionHasPockets}"
+ Command="{Binding Parent.ChangePocketsCommand}"
ToolTip.Tip="Change who could know about this transaction"
DockPanel.Dock="Right"
Margin="10 0">
+ <Button.IsVisible>
+ <MultiBinding Converter="{x:Static BoolConverters.And}">
+ <Binding Path="TransactionHasPockets" />
+ <Binding Path="!IsPreview" />
+ </MultiBinding>
+ </Button.IsVisible>
<Viewbox Height="20">
<PathIcon Data="{StaticResource entities_edit_regular}" Foreground="{DynamicResource SystemAccentColor}" />
</Viewbox>
<DockPanel>
<Button Classes="plain"
- Command="{Binding AdjustFeeCommand}"
+ Command="{Binding Parent.AdjustFeeCommand}"
ToolTip.Tip="Change transaction fee or confirmation time"
DockPanel.Dock="Right"
Margin="10 0">
<Button.IsVisible>
+ <MultiBinding Converter="{x:Static BoolConverters.And}">
<MultiBinding Converter="{x:Static BoolConverters.Or}">
- <Binding Path="AdjustFeeAvailable" />
+ <Binding Path="Parent.AdjustFeeAvailable" />
<Binding Path="IsCustomFeeUsed" />
</MultiBinding>
+ <Binding Path="!IsPreview" />
+ </MultiBinding>
</Button.IsVisible>
<Viewbox Height="20">
<PathIcon Data="{StaticResource adjust_fee_regular}" Foreground="{DynamicResource SystemAccentColor}" />

fix adjust fees and adjust pockets.