Removed AdvancedSendOptionsView
DELETE
WalletWasabi.Fluent/ViewModels/Wallets/Send/AdvancedSendOptionsViewModel.cs
-using System;
-using System.Globalization;
-using System.Linq;
-using System.Reactive;
-using System.Reactive.Linq;
-using NBitcoin;
-using ReactiveUI;
-using WalletWasabi.Fluent.Validation;
-using WalletWasabi.Fluent.ViewModels.Dialogs.Base;
-using WalletWasabi.Models;
-
-namespace WalletWasabi.Fluent.ViewModels.Wallets.Send;
-
-[NavigationMetaData(Title = "Advanced")]
-public partial class AdvancedSendOptionsViewModel : DialogViewModelBase<Unit>
-{
- private readonly TransactionInfo _transactionInfo;
-
- [AutoNotify] private string _customFee;
-
- public AdvancedSendOptionsViewModel(TransactionInfo transactionInfo)
- {
- _transactionInfo = transactionInfo;
-
- _customFee = transactionInfo.IsCustomFeeUsed
- ? transactionInfo.FeeRate.SatoshiPerByte.ToString(CultureInfo.InvariantCulture)
- : "";
-
- EnableBack = false;
- SetupCancel(enableCancel: true, enableCancelOnEscape: true, enableCancelOnPressed: true);
-
- this.ValidateProperty(x => x.CustomFee, ValidateCustomFee);
-
- var nextCommandCanExecute =
- this.WhenAnyValue(x => x.CustomFee)
- .Select(_ =>
- {
- var noError = !Validations.Any;
- var somethingFilled = CustomFee is not null or "";
-
- return noError && somethingFilled;
- });
-
- NextCommand = ReactiveCommand.Create(OnNext, nextCommandCanExecute);
- }
-
- private void OnNext()
- {
- if (decimal.TryParse(CustomFee, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var feeRate))
- {
- _transactionInfo.FeeRate = new FeeRate(feeRate);
- _transactionInfo.IsCustomFeeUsed = true;
- }
- else if (_transactionInfo.IsCustomFeeUsed)
- {
- _transactionInfo.FeeRate = FeeRate.Zero;
- _transactionInfo.IsCustomFeeUsed = false;
- }
-
- Close(DialogResultKind.Normal, Unit.Default);
- }
-
- private void ValidateCustomFee(IValidationErrors errors)
- {
- var customFeeString = CustomFee;
-
- if (customFeeString is null or "")
- {
- return;
- }
-
- if (customFeeString.Any(c => !char.IsDigit(c) && c != '.'))
- {
- errors.Add(ErrorSeverity.Error, "The field only accepts numbers.");
- return;
- }
-
- if (!decimal.TryParse(customFeeString, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var value))
- {
- errors.Add(ErrorSeverity.Error, "The entered fee is not valid.");
- return;
- }
-
- if (value < decimal.One)
- {
- errors.Add(ErrorSeverity.Error, "Cannot be less than 1 sat/vByte.");
- return;
- }
-
- try
- {
- _ = new FeeRate(value);
- }
- catch (OverflowException)
- {
- errors.Add(ErrorSeverity.Error, "The entered fee is too high.");
- return;
- }
- }
-}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -103,9 +103,6 @@ public partial class SendViewModel : RoutableViewModel
}
});
- AdvancedOptionsCommand = ReactiveCommand.CreateFromTask(async () =>
- await NavigateDialogAsync(new AdvancedSendOptionsViewModel(_transactionInfo), NavigationTarget.CompactDialogScreen));
-
var nextCommandCanExecute =
this.WhenAnyValue(x => x.AmountBtc, x => x.To)
.Select(tup =>
@@ -149,8 +146,6 @@ public partial class SendViewModel : RoutableViewModel
public ICommand QrCommand { get; }
- public ICommand AdvancedOptionsCommand { get; }
-
public WalletBalanceTileViewModel Balance { get; }
private async Task OnAutoPasteAsync()

DELETE
WalletWasabi.Fluent/Views/Wallets/Send/AdvancedSendOptionsView.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:c="using:WalletWasabi.Fluent.Controls"
- xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
- xmlns:behaviors="using:WalletWasabi.Fluent.Behaviors"
- xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Wallets.Send"
- mc:Ignorable="d"
- x:DataType="vm:AdvancedSendOptionsViewModel"
- x:CompileBindings="True"
- x:Class="WalletWasabi.Fluent.Views.Wallets.Send.AdvancedSendOptionsView">
- <c:ContentArea Title="{Binding Title}" Caption=""
- EnableBack="{Binding EnableBack}"
- EnableNext="True"
- NextContent="Done"
- EnableCancel="{Binding EnableCancel}"
- IsBusy="{Binding IsBusy}"
- Height="300" Width="550"
- ScrollViewer.VerticalScrollBarVisibility="Auto">
- <DockPanel>
-
- <!-- Custom Fee -->
- <DockPanel DockPanel.Dock="Top" Margin="0,0,0,10" VerticalAlignment="Top">
- <Label DockPanel.Dock="Top" Content="_Transaction fee rate:" Target="transactionFeeTb" />
- <TextBox x:Name="transactionFeeTb" MaxLength="250" Text="{Binding CustomFee}" Watermark="Enter a custom fee rate (sat/vByte)">
- <i:Interaction.Behaviors>
- <behaviors:FocusOnAttachedBehavior />
- </i:Interaction.Behaviors>
- </TextBox>
- </DockPanel>
-
- </DockPanel>
- </c:ContentArea>
-</UserControl>

DELETE
WalletWasabi.Fluent/Views/Wallets/Send/AdvancedSendOptionsView.axaml.cs
-using Avalonia.Controls;
-using Avalonia.Markup.Xaml;
-
-namespace WalletWasabi.Fluent.Views.Wallets.Send;
-
-public class AdvancedSendOptionsView : UserControl
-{
- public AdvancedSendOptionsView()
- {
- InitializeComponent();
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
-}

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/SendView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/SendView.axaml
IsConversionReversed="{Binding ConversionReversed, Mode=TwoWay}" />
</DockPanel>
</DockPanel>
-
- <!-- Advanced -->
- <Button Classes="h8 plain activeHyperLink" Margin="0 10 0 0"
- Command="{Binding AdvancedOptionsCommand}"
- DockPanel.Dock="Bottom"
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- Content="Advanced options" />
</DockPanel>
</c:ContentArea>
</UserControl>

Removed AdvancedSendOptionsView