Prepare phase execution
MODIFY
HiddenWallet/ChaumianCoinJoin/TumblerPhase.cs
HiddenWallet/ChaumianCoinJoin/TumblerPhase.cs
@@ -11,4 +11,22 @@ namespace HiddenWallet.ChaumianCoinJoin
OutputRegistration,
Signing,
}
+
+ public static class TumblerPhaseHelpers
+ {
+ public static TumblerPhase GetTumblerPhase(string phase)
+ {
+ if (phase == null) throw new ArgumentNullException(nameof(phase));
+
+ foreach (TumblerPhase p in Enum.GetValues(typeof(TumblerPhase)))
+ {
+ if (phase.Equals(p.ToString(), StringComparison.OrdinalIgnoreCase))
+ {
+ return p;
+ }
+ }
+
+ throw new NotSupportedException($"Phase does not exist: {phase}");
+ }
+ }
}

Prepare phase execution