Fee Display Format fix in General Settings / Transaction Summary / Broadcast Transaction
MODIFY
WalletWasabi.Fluent/Models/FeeDisplayFormat.cs
WalletWasabi.Fluent/Models/FeeDisplayFormat.cs
+using NBitcoin;
using WalletWasabi.Models;
namespace WalletWasabi.Fluent.Models;
@@ -6,6 +7,17 @@ public enum FeeDisplayFormat
{
BTC,
- [FriendlyName("sat/vByte")]
- SatoshiPerByte,
+ [FriendlyName("sats")]
+ Satoshis,
+}
+
+public static class FeeDisplayFormatExtensions
+{
+ public static MoneyUnit ToMoneyUnit(this FeeDisplayFormat feeDisplayFormat) =>
+ feeDisplayFormat switch
+ {
+ FeeDisplayFormat.BTC => MoneyUnit.BTC,
+ FeeDisplayFormat.Satoshis => MoneyUnit.Satoshi,
+ _ => MoneyUnit.BTC
+ };
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/GeneralSettingsTabViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/GeneralSettingsTabViewModel.cs
@@ -41,7 +41,7 @@ public partial class GeneralSettingsTabViewModel : SettingsTabViewModelBase
_hideOnClose = Services.UiConfig.HideOnClose;
_selectedFeeDisplayFormat = Enum.IsDefined(typeof(FeeDisplayFormat), Services.UiConfig.FeeDisplayFormat)
? (FeeDisplayFormat)Services.UiConfig.FeeDisplayFormat
- : FeeDisplayFormat.SatoshiPerByte;
+ : FeeDisplayFormat.Satoshis;
this.WhenAnyValue(x => x.DarkModeEnabled)
.Skip(1)

MODIFY
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/BroadcastTransactionViewModel.cs
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/BroadcastTransactionViewModel.cs
@@ -3,7 +3,9 @@ using System.Threading.Tasks;
using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.Transactions;
+using WalletWasabi.Extensions;
using WalletWasabi.Fluent.Helpers;
+using WalletWasabi.Fluent.Models;
using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Logging;
@@ -85,7 +87,14 @@ public partial class BroadcastTransactionViewModel : RoutableViewModel
var networkFee = totalInputValue is null || totalOutputValue is null
? null
: totalInputValue - totalOutputValue;
- FeeString = networkFee is null ? "Unknown" : $"{networkFee.ToFormattedString()} BTC";
+
+ var feeDisplayFormat = (FeeDisplayFormat?)Services.UiConfig.FeeDisplayFormat ?? FeeDisplayFormat.BTC;
+ var feeMoneyUnit = feeDisplayFormat.ToMoneyUnit();
+
+ FeeString =
+ networkFee is null
+ ? "Unknown"
+ : $"{networkFee.ToDecimal(feeMoneyUnit)} {feeDisplayFormat.FriendlyName()}";
}
private async Task OnNextAsync(SmartTransaction transaction)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
@@ -2,7 +2,9 @@ using System.Linq;
using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.TransactionBuilding;
+using WalletWasabi.Extensions;
using WalletWasabi.Fluent.Helpers;
+using WalletWasabi.Fluent.Models;
using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Send;
@@ -59,8 +61,11 @@ public partial class TransactionSummaryViewModel : ViewModelBase
destinationAmount.GenerateFiatText(_wallet.Synchronizer.UsdExchangeRate, "USD");
AmountText = $"{btcAmountText}{fiatAmountText}";
+ var feeDisplayFormat = (FeeDisplayFormat?)Services.UiConfig.FeeDisplayFormat ?? FeeDisplayFormat.BTC;
+ var btcFeeMoneyUnit = feeDisplayFormat.ToMoneyUnit();
+
var fee = _transaction.Fee;
- var btcFeeText = $"{fee.ToDecimal(MoneyUnit.BTC)} bitcoin ";
+ var btcFeeText = $"{fee.ToDecimal(btcFeeMoneyUnit)} {feeDisplayFormat.FriendlyName() } ";
var fiatFeeText = fee.ToDecimal(MoneyUnit.BTC)
.GenerateFiatText(_wallet.Synchronizer.UsdExchangeRate, "USD");
@@ -73,4 +78,6 @@ public partial class TransactionSummaryViewModel : ViewModelBase
IsCustomFeeUsed = _info.IsCustomFeeUsed;
}
+
+
}

Fee Display Format fix in General Settings / Transaction Summary / Broadcast Transaction