add time and fee rate to the slider tooltip.
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendFeeViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendFeeViewModel.cs
@@ -38,6 +38,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
[AutoNotify] private string[]? _confirmationTargetLabels;
[AutoNotify] private double _currentConfirmationTarget;
[AutoNotify] private decimal _currentSatoshiPerByte;
+ [AutoNotify] private string _currentConfirmationTargetString;
[AutoNotify(SetterModifier = AccessModifier.Private)] private int _sliderMinimum;
[AutoNotify(SetterModifier = AccessModifier.Private)] private int _sliderMaximum;
[AutoNotify] private int _sliderValue;
@@ -240,6 +241,12 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
return time;
}
+ private void UpdateFeeAndEstimate(double confirmationTarget)
+ {
+ CurrentSatoshiPerByte = GetSatoshiPerByte(confirmationTarget);
+ CurrentConfirmationTargetString = FeeTargetTimeConverter.Convert((int)confirmationTarget, " minutes", " hour", " hours", " day", " days");
+ }
+
private void SetSliderValue(double confirmationTarget)
{
if (!_updatingCurrentValue)
@@ -248,7 +255,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
if (_confirmationTargetValues is not null)
{
SliderValue = GetSliderValue(confirmationTarget, _confirmationTargetValues);
- CurrentSatoshiPerByte = GetSatoshiPerByte(confirmationTarget);
+ UpdateFeeAndEstimate(confirmationTarget);
}
_updatingCurrentValue = false;
@@ -264,7 +271,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
_updatingCurrentValue = true;
var index = _confirmationTargetValues.Length - sliderValue - 1;
CurrentConfirmationTarget = _confirmationTargetValues[index];
- CurrentSatoshiPerByte = GetSatoshiPerByte(CurrentConfirmationTarget);
+ UpdateFeeAndEstimate(CurrentConfirmationTarget);
_updatingCurrentValue = false;
}
}
@@ -308,7 +315,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
SliderMaximum = confirmationTargetValues.Length - 1;
CurrentConfirmationTarget = Math.Clamp(CurrentConfirmationTarget, ConfirmationTargetValues.Min(), ConfirmationTargetValues.Max());
SliderValue = GetSliderValue(CurrentConfirmationTarget, ConfirmationTargetValues);
- CurrentSatoshiPerByte = GetSatoshiPerByte(CurrentConfirmationTarget);
+ UpdateFeeAndEstimate(CurrentConfirmationTarget);
_updatingCurrentValue = false;
}

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/SendFeeView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/SendFeeView.axaml
Value="{Binding SliderValue}">
<Slider.Styles>
<Style Selector="Slider /template/ Thumb">
- <Setter Property="ToolTip.Tip" x:CompileBindings="False" Value="{Binding $parent[Slider].DataContext.CurrentSatoshiPerByte, Mode=OneWay, StringFormat='\{0:f\} sat/vByte'}" />
+ <Setter Property="ToolTip.Tip">
+ <Template>
+ <ToolTip>
+ <StackPanel Spacing="10" x:CompileBindings="False">
+ <TextBlock Text="{Binding $parent[Slider].DataContext.CurrentSatoshiPerByte, Mode=OneWay, StringFormat='Fee Rate: \{0:f\} sat/vByte'}" />
+ <TextBlock Text="{Binding $parent[Slider].DataContext.CurrentConfirmationTargetString, Mode=OneWay, StringFormat='Estimated Time: ~\{0\}'}" />
+ </StackPanel>
+ </ToolTip>
+ </Template>
+ </Setter>
<Setter Property="ToolTip.Placement" Value="Bottom" />
<Setter Property="ToolTip.VerticalOffset" Value="10" />
<Setter Property="ToolTip.HorizontalOffset" Value="-30" />

add time and fee rate to the slider tooltip.