SendFeeView Advanced fixes
MODIFY
WalletWasabi.Fluent/Controls/CurrencyEntryBox.axaml.cs
WalletWasabi.Fluent/Controls/CurrencyEntryBox.axaml.cs
@@ -31,6 +31,9 @@ public class CurrencyEntryBox : TextBox
public static readonly StyledProperty<bool> IsRightSideProperty =
AvaloniaProperty.Register<CurrencyEntryBox, bool>(nameof(IsRightSide));
+ public static readonly StyledProperty<int> MaxDecimalsProperty =
+ AvaloniaProperty.Register<CurrencyEntryBox, int>(nameof(MaxDecimals), 8);
+
private readonly CultureInfo _customCultureInfo;
private readonly char _decimalSeparator = '.';
private readonly char _groupSeparator = ' ';
@@ -112,6 +115,12 @@ public class CurrencyEntryBox : TextBox
set => SetValue(IsRightSideProperty, value);
}
+ public int MaxDecimals
+ {
+ get => GetValue(MaxDecimalsProperty);
+ set => SetValue(MaxDecimalsProperty, value);
+ }
+
private decimal FiatToBitcoin(decimal fiatValue)
{
if (ConversionRate == 0m)
@@ -254,7 +263,7 @@ public class CurrencyEntryBox : TextBox
{
// Bitcoin input restriction is to only allow 8 decimal places max
// and also 8 whole number places.
- if ((whole > 8 && !trailingDecimal) || frac > 8)
+ if ((whole > 8 && !trailingDecimal) || frac > MaxDecimals)
{
return false;
}

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/SendFeeAdvancedOptionsView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/SendFeeAdvancedOptionsView.axaml
<StackPanel Orientation="Horizontal" Spacing="20" VerticalAlignment="Top">
<Label Content="_Transaction fee rate:" Target="CustomFee" />
<c:CurrencyEntryBox Text="{Binding CustomFee}" CurrencyCode="sat/vbyte"
- Width="220" MaxLength="10" Classes="standalone"
+ Width="220" MaxDecimals="3" Classes="standalone"
Watermark="0 sat/vbyte" x:Name="CustomFee">
<i:Interaction.Behaviors>
<behaviors:FocusOnAttachedBehavior />

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/SendFeeView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/SendFeeView.axaml
DockPanel.Dock="Bottom"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
- Content="Advanced options" />
+ Content="Advanced" />
<DockPanel MinHeight="80" DataContext="{Binding FeeChart}">
<DockPanel.Resources>
<Thickness x:Key="SliderTopHeaderMargin">0,0,0,4</Thickness>

SendFeeView Advanced fixes