Allow null, return Uknown in case
MODIFY
WalletWasabi.Fluent/Extensions/TransactionSummaryExtensions.cs
WalletWasabi.Fluent/Extensions/TransactionSummaryExtensions.cs
@@ -25,8 +25,13 @@ public static class TransactionSummaryExtensions
_ => throw new InvalidOperationException($"Invalid Fee Display Unit value: {feeDisplayUnit}")
};
- public static string ToFeeDisplayUnitString(this Money fee)
+ public static string ToFeeDisplayUnitString(this Money? fee)
{
+ if (fee is null)
+ {
+ return "Unknown";
+ }
+
var displayUnit = Services.UiConfig.FeeDisplayUnit.GetEnumValueOrDefault(FeeDisplayUnit.BTC);
var moneyUnit = displayUnit.ToMoneyUnit();

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 is null ? "Unknown" : networkFee.ToFeeDisplayUnitString();
+ FeeString = networkFee.ToFeeDisplayUnitString();
}
private async Task OnNextAsync(SmartTransaction transaction)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/Details/CoinJoinDetailsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/Details/CoinJoinDetailsViewModel.cs
@@ -58,7 +58,7 @@ public partial class CoinJoinDetailsViewModel : RoutableViewModel
Date = _coinJoin.DateString;
Status = _coinJoin.IsConfirmed ? "Confirmed" : "Pending";
CoinJoinFee = _coinJoin.OutgoingAmount;
- CoinJoinFeeString = CoinJoinFee is null ? "Unknown" : CoinJoinFee.ToFeeDisplayUnitString();
+ CoinJoinFeeString = CoinJoinFee.ToFeeDisplayUnitString();
TransactionId = _coinJoin.CoinJoinTransaction.TransactionId;
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/Details/CoinJoinsDetailsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/Details/CoinJoinsDetailsViewModel.cs
@@ -61,7 +61,7 @@ public partial class CoinJoinsDetailsViewModel : RoutableViewModel
Date = _coinJoinGroup.DateString;
Status = _coinJoinGroup.IsConfirmed ? "Confirmed" : "Pending";
CoinJoinFee = _coinJoinGroup.OutgoingAmount;
- CoinJoinFeeString = CoinJoinFee is null ? "Unknown" : CoinJoinFee.ToFeeDisplayUnitString();
+ CoinJoinFeeString = CoinJoinFee.ToFeeDisplayUnitString();
TransactionIds = new ObservableCollection<uint256>(_coinJoinGroup.CoinJoinTransactions.Select(x => x.TransactionId));
TxCount = TransactionIds.Count;

Allow null, return Uknown in case