Prefer Oaph Over Properties
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/SendTabView.xaml
MinWidth="124"
MinHeight="46" />
<StackPanel>
- <StackPanel IsVisible="{Binding !MinFeesAvailable}" Orientation="Horizontal" Spacing="10">
+ <StackPanel IsVisible="{Binding !MinMaxFeeTargetsEqual}" Orientation="Horizontal" Spacing="10">
<TextBlock Text="Fee:" />
<Grid Height="10" Width="10">
</DrawingPresenter>
</Grid>
</StackPanel>
- <StackPanel IsVisible="{Binding MinFeesAvailable}" Orientation="Horizontal" Spacing="10">
+ <StackPanel IsVisible="{Binding MinMaxFeeTargetsEqual}" Orientation="Horizontal" Spacing="10">
<TextBlock Text="Fees are super low!" VerticalAlignment="Center" />
<Grid Height="16" Width="16">
<DrawingPresenter VerticalAlignment="Center" HorizontalAlignment="Center">

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -39,6 +39,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private int _feeTarget;
private int _minimumFeeTarget;
private int _maximumFeeTarget;
+ private ObservableAsPropertyHelper<bool> _minMaxFeeTargetsEqual;
private string _confirmationExpectedText;
private string _feeText;
private decimal _usdFee;
@@ -107,6 +108,9 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(_ => OnCoinsListDequeueCoinsPressedAsync());
+ _minMaxFeeTargetsEqual = this.WhenAnyValue(x => x.MinimumFeeTarget, x => x.MaximumFeeTarget, (x, y) => x == y)
+ .ToProperty(this, x => x.MinMaxFeeTargetsEqual, scheduler: RxApp.MainThreadScheduler);
+
SetFeeTargetLimits();
FeeTarget = Global.UiConfig.FeeTarget ?? MinimumFeeTarget;
FeeDisplayFormat = (FeeDisplayFormat)(Enum.ToObject(typeof(FeeDisplayFormat), Global.UiConfig.FeeDisplayFormat) ?? FeeDisplayFormat.SatoshiPerByte);
@@ -833,10 +837,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set => this.RaiseAndSetIfChanged(ref _maximumFeeTarget, value);
}
- public bool MinFeesAvailable
- {
- get => _minimumFeeTarget == _maximumFeeTarget;
- }
+ public bool MinMaxFeeTargetsEqual => _minMaxFeeTargetsEqual?.Value ?? false;
public string ConfirmationExpectedText
{

Prefer Oaph Over Properties