add method and rename
MODIFY
WalletWasabi.Fluent/Extensions/TransactionSummaryExtensions.cs
WalletWasabi.Fluent/Extensions/TransactionSummaryExtensions.cs
@@ -25,7 +25,23 @@ public static class TransactionSummaryExtensions
_ => throw new InvalidOperationException($"Invalid Fee Display Unit value: {feeDisplayUnit}")
};
- public static string ToFeeDisplayUnitString(this Money? fee)
+ public static string ToFeeDisplayUnitRawString(this Money? fee)
+ {
+ if (fee is null)
+ {
+ return "Unknown";
+ }
+
+ var displayUnit = Services.UiConfig.FeeDisplayUnit.GetEnumValueOrDefault(FeeDisplayUnit.BTC);
+
+ return displayUnit switch
+ {
+ FeeDisplayUnit.Satoshis => fee.Satoshi.ToString(),
+ _ => fee.ToString()
+ };
+ }
+
+ public static string ToFeeDisplayUnitFormattedString(this Money? fee)
{
if (fee is null)
{

MODIFY
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/BroadcastTransactionViewModel.cs
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/BroadcastTransactionViewModel.cs
@@ -80,7 +80,7 @@ public partial class BroadcastTransactionViewModel : RoutableViewModel
? null
: totalInputValue - totalOutputValue;
- FeeString = networkFee.ToFeeDisplayUnitString();
+ FeeString = networkFee.ToFeeDisplayUnitFormattedString();
}
private async Task OnNextAsync(SmartTransaction transaction)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
@@ -57,7 +57,7 @@ public partial class TransactionSummaryViewModel : ViewModelBase
AmountText = $"{destinationAmount.ToFormattedString()} BTC";
var fee = _transaction.Fee;
- FeeText = fee.ToFeeDisplayUnitString();
+ FeeText = fee.ToFeeDisplayUnitFormattedString();
var exchangeRate = _wallet.Synchronizer.UsdExchangeRate;
if (exchangeRate != 0)

add method and rename