use TextTimeHelpers on the broadcaster text
MODIFY
WalletWasabi.Fluent/Helpers/TextTimeHelpers.cs
WalletWasabi.Fluent/Helpers/TextTimeHelpers.cs
@@ -14,15 +14,12 @@ namespace WalletWasabi.Fluent.Helpers
public static string TimeSpanToFriendlyString(TimeSpan time)
{
string result = "";
- var d = time.Days;
- var h = time.Hours;
- var m = time.Minutes;
- result += ConcatNumberAndUnit(d, "day", ' ');
- result += ConcatNumberAndUnit(h, "hour", ' ');
- result += ConcatNumberAndUnit(m, "minute", ' ');
+ result += ConcatNumberAndUnit(time.Days, "day", ' ');
+ result += ConcatNumberAndUnit(time.Hours, "hour", ' ');
+ result += ConcatNumberAndUnit(time.Minutes, "minute", ' ');
- return result;
+ return result.TrimEnd();
}
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/BroadcastTransactionViewModel.cs
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/BroadcastTransactionViewModel.cs
@@ -5,6 +5,7 @@ using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.TransactionBroadcasting;
using WalletWasabi.Blockchain.Transactions;
+using WalletWasabi.Fluent.Helpers;
using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Logging;
using WalletWasabi.Stores;
@@ -62,9 +63,9 @@ namespace WalletWasabi.Fluent.ViewModels.TransactionBroadcasting
_transactionId = psbtTxn.GetHash().ToString();
_inputCount = inputAddressAmount.Length;
- _inputCountString = $" input{(_inputCount > 1 ? 's' : "")} and ";
+ _inputCountString = $" input{TextTimeHelpers.AddSIfPlural(_inputCount)} and ";
_outputCount = outputAddressAmount.Length;
- _outputCountString = $" output{(_outputCount > 1 ? 's' : "")}.";
+ _outputCountString = $" output{TextTimeHelpers.AddSIfPlural(_outputCount)}.";
_totalInputValue = inputAddressAmount.Any(x => x.Value == nullMoney)
? null
: inputAddressAmount.Select(x => x.Value).Sum();

use TextTimeHelpers on the broadcaster text