make api compliant with stateless library.
MODIFY
WalletWasabi.Fluent/State/StateMachine.cs
WalletWasabi.Fluent/State/StateMachine.cs
@@ -104,7 +104,7 @@ public class StateMachine<TState, TTrigger> where TTrigger : Enum where TState :
{
_currentState.Enter();
- if (_currentState.WillTransitionTo is { } state)
+ if (_currentState.InitialTransitionTo is { } state)
{
Goto(state);
}
@@ -144,7 +144,7 @@ public class StateMachine<TState, TTrigger> where TTrigger : Enum where TState :
public StateContext? Parent { get; private set; }
- internal TState? WillTransitionTo { get; private set; }
+ internal TState? InitialTransitionTo { get; private set; }
public StateContext(StateMachine<TState, TTrigger> owner, TState state)
{
@@ -157,9 +157,9 @@ public class StateMachine<TState, TTrigger> where TTrigger : Enum where TState :
_permittedTransitions = new();
}
- public StateContext TransitionOnEntryTo(TState? state)
+ public StateContext InitialTransition(TState? state)
{
- WillTransitionTo = state;
+ InitialTransitionTo = state;
return this;
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/CoinJoinStateViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/CoinJoinStateViewModel.cs
@@ -196,7 +196,7 @@ public partial class CoinJoinStateViewModel : ViewModelBase
// Manual Cj State
_stateMachine.Configure(State.ManualCoinJoin)
.Permit(Trigger.AutoCoinJoinOn, State.AutoCoinJoin)
- .TransitionOnEntryTo(State.Stopped)
+ .InitialTransition(State.Stopped)
.OnEntry(() =>
{
IsAuto = false;
@@ -300,7 +300,7 @@ public partial class CoinJoinStateViewModel : ViewModelBase
// AutoCj State
_stateMachine.Configure(State.AutoCoinJoin)
- .TransitionOnEntryTo(State.AutoStarting)
+ .InitialTransition(State.AutoStarting)
.Permit(Trigger.AutoCoinJoinOff, State.ManualCoinJoin)
.OnEntry(async () =>
{

make api compliant with stateless library.