rename PhaseState to RoundPhaseState.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -31,7 +31,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private CompositeDisposable Disposables { get; set; }
private long _roundId;
- private PhaseState _phase;
+ private RoundPhaseState _phase;
private DateTimeOffset _roundTimesout;
private TimeSpan _timeLeftTillRoundTimeout;
private Money _requiredBTC;
@@ -159,7 +159,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
if (mostAdvancedRound != default)
{
RoundId = mostAdvancedRound.State.RoundId;
- PhaseState = new PhaseState(mostAdvancedRound.State.Phase, Global.WalletService.ChaumianClient?.State.IsInErrorState ?? false);
+ PhaseState = new RoundPhaseState(mostAdvancedRound.State.Phase, Global.WalletService.ChaumianClient?.State.IsInErrorState ?? false);
RoundTimesout = mostAdvancedRound.State.Phase == RoundPhase.InputRegistration ? mostAdvancedRound.State.InputRegistrationTimesout : DateTimeOffset.UtcNow;
PeersRegistered = mostAdvancedRound.State.RegisteredPeerCount;
PeersNeeded = mostAdvancedRound.State.RequiredPeerCount;
@@ -167,7 +167,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
else
{
RoundId = -1;
- PhaseState = new PhaseState(RoundPhase.InputRegistration, false);
+ PhaseState = new RoundPhaseState(RoundPhase.InputRegistration, false);
RoundTimesout = DateTimeOffset.UtcNow;
PeersRegistered = 0;
PeersNeeded = 100;
@@ -300,12 +300,12 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
RoundId = mostAdvancedRound.State.RoundId;
if (!chaumianClient.State.IsInErrorState)
{
- PhaseState = new PhaseState(mostAdvancedRound.State.Phase, false);
+ PhaseState = new RoundPhaseState(mostAdvancedRound.State.Phase, false);
RoundTimesout = mostAdvancedRound.State.Phase == RoundPhase.InputRegistration ? mostAdvancedRound.State.InputRegistrationTimesout : DateTimeOffset.UtcNow;
}
else
{
- PhaseState = new PhaseState(PhaseState.Phase, true);
+ PhaseState = new RoundPhaseState(PhaseState.Phase, true);
}
this.RaisePropertyChanged(nameof(PhaseState));
@@ -380,7 +380,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set => this.RaiseAndSetIfChanged(ref _roundId, value);
}
- public PhaseState PhaseState
+ public RoundPhaseState PhaseState
{
get => _phase;
set => this.RaiseAndSetIfChanged(ref _phase, value);

RENAME
WalletWasabi.Gui/Controls/WalletExplorer/PhaseState.cs
WalletWasabi.Gui/Controls/WalletExplorer/RoundPhaseState.cs
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
- public struct PhaseState
+ public struct RoundPhaseState
{
- public PhaseState(RoundPhase phase, bool error)
+ public RoundPhaseState(RoundPhase phase, bool error)
{
Phase = phase;
Error = error;

MODIFY
WalletWasabi.Gui/Converters/PhaseColorConverter.cs
WalletWasabi.Gui/Converters/PhaseColorConverter.cs
@@ -16,7 +16,7 @@ namespace WalletWasabi.Gui.Converters
throw new ArgumentException($"Unknown '{parameter}' value");
}
- var phaseState = (PhaseState)value;
+ var phaseState = (RoundPhaseState)value;
return (RoundPhase)p <= phaseState.Phase
? phaseState.Error

MODIFY
WalletWasabi.Gui/Converters/PhaseStringConverter.cs
WalletWasabi.Gui/Converters/PhaseStringConverter.cs
@@ -13,7 +13,7 @@ namespace WalletWasabi.Gui.Converters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- if (value is PhaseState phase)
+ if (value is RoundPhaseState phase)
{
return phase.Phase switch
{
@@ -36,19 +36,19 @@ namespace WalletWasabi.Gui.Converters
if (s.Equals("Registration", StringComparison.OrdinalIgnoreCase) || s.Equals(RoundPhase.InputRegistration.ToString(), StringComparison.OrdinalIgnoreCase))
{
- return new PhaseState(RoundPhase.InputRegistration, false);
+ return new RoundPhaseState(RoundPhase.InputRegistration, false);
}
else if (s.Equals("Connection Confirmation", StringComparison.OrdinalIgnoreCase) || s.Equals(RoundPhase.ConnectionConfirmation.ToString(), StringComparison.OrdinalIgnoreCase))
{
- return new PhaseState(RoundPhase.ConnectionConfirmation, false);
+ return new RoundPhaseState(RoundPhase.ConnectionConfirmation, false);
}
else if (s.Equals("Output Registration", StringComparison.OrdinalIgnoreCase) || s.Equals(RoundPhase.OutputRegistration.ToString(), StringComparison.OrdinalIgnoreCase))
{
- return new PhaseState(RoundPhase.OutputRegistration, false);
+ return new RoundPhaseState(RoundPhase.OutputRegistration, false);
}
else if (s.Equals("Signing", StringComparison.OrdinalIgnoreCase) || s.Equals(RoundPhase.Signing.ToString(), StringComparison.OrdinalIgnoreCase))
{
- return new PhaseState(RoundPhase.Signing, false);
+ return new RoundPhaseState(RoundPhase.Signing, false);
}
throw new InvalidOperationException();

rename PhaseState to RoundPhaseState.