Implement friendly messages.
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -504,7 +504,7 @@ namespace WalletWasabi.Gui
if (reason != DequeueReason.Spent)
{
var type = reason == DequeueReason.UserRequested ? NotificationType.Information : NotificationType.Warning;
- var message = reason == DequeueReason.UserRequested ? "" : reason.ToString();
+ var message = reason == DequeueReason.UserRequested ? "" : reason.ToFriendlyString();
var title = success.Value.Count() == 1 ? $"Coin ({success.Value.First().Amount.ToString(false, true)}) Dequeued" : $"{success.Value.Count()} Coins Dequeued";
NotificationHelpers.Notify(message, title, type);
}
@@ -514,7 +514,7 @@ namespace WalletWasabi.Gui
{
DequeueReason reason = failure.Key;
var type = NotificationType.Warning;
- var message = reason.ToString();
+ var message = reason.ToFriendlyString();
var title = failure.Value.Count() == 1 ? $"Couldn't Dequeue Coin ({failure.Value.First().Amount.ToString(false, true)})" : $"Couldn't Dequeue {failure.Value.Count()} Coins";
NotificationHelpers.Notify(message, title, type);
}

MODIFY
WalletWasabi/CoinJoin/Client/Clients/Queuing/DequeueReason.cs
WalletWasabi/CoinJoin/Client/Clients/Queuing/DequeueReason.cs
@@ -7,7 +7,7 @@ namespace WalletWasabi.CoinJoin.Client.Clients.Queuing
public enum DequeueReason
{
UserRequested, // Success, user requested the dequeue.
- TransactionBuilding, // Success, transaction is being build with the coins.
+ TransactionBuilding, // Success, transaction is being built with the coins.
Banned, // Success
NotEnoughFundsEnqueued, // Success
CoordinatorFeeChanged, // Success
@@ -15,4 +15,23 @@ namespace WalletWasabi.CoinJoin.Client.Clients.Queuing
Spent, // Success, coin is spent.
Mixing // Failure, the coin's mixing status is > registration.
}
+
+ public static class DequeueReasonExtensions
+ {
+ public static string ToFriendlyString(this DequeueReason me)
+ {
+ return me switch
+ {
+ DequeueReason.UserRequested => "User requested.",
+ DequeueReason.TransactionBuilding => "Using coin for transaction building.",
+ DequeueReason.Banned => "Coin is banned.",
+ DequeueReason.NotEnoughFundsEnqueued => "Not enough funds enqueued.",
+ DequeueReason.CoordinatorFeeChanged => "Coordinator fee changed.",
+ DequeueReason.ApplicationExit => "Application is exiting.",
+ DequeueReason.Spent => "Coin is spent.",
+ DequeueReason.Mixing => "Coin is being mixed.",
+ _ => me.ToString()
+ };
+ }
+ }
}

Implement friendly messages.