Hide fiat amounts when exchange rate is zero
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
@@ -55,15 +55,20 @@ public partial class TransactionSummaryViewModel : ViewModelBase
ConfirmationTimeText = $"Approximately {TextHelpers.TimeSpanToFriendlyString(info.ConfirmationTimeSpan)} ";
var destinationAmount = _transaction.CalculateDestinationAmount();
- var btcAmountText = $"{destinationAmount.ToFormattedString()} BTC";
+ AmountText = $"{destinationAmount.ToFormattedString()} BTC";
+
+ var fee = _transaction.Fee;
+ FeeText = fee.ToFeeDisplayUnitString();
+
var exchangeRate = _wallet.Synchronizer.UsdExchangeRate;
+ if (exchangeRate != 0)
+ {
var fiatAmountText = destinationAmount.BtcToUsd(exchangeRate).ToUsdAproxBetweenParens();
- AmountText = $"{btcAmountText} {fiatAmountText}";
+ AmountText += $" {fiatAmountText}";
- var fee = _transaction.Fee;
- var feeText = fee.ToFeeDisplayUnitString();
var fiatFeeText = fee.BtcToUsd(exchangeRate).ToUsdAproxBetweenParens();
- FeeText = $"{feeText} {fiatFeeText}";
+ FeeText += $" {fiatFeeText}";
+ }
TransactionHasChange =
_transaction.InnerWalletOutputs.Any(x => x.ScriptPubKey != info.Destination.ScriptPubKey);

Hide fiat amounts when exchange rate is zero