Switch to own StateMachine
MODIFY
WalletWasabi.Fluent/State/StateMachine.cs
WalletWasabi.Fluent/State/StateMachine.cs
@@ -10,7 +10,7 @@ public class StateMachine<TState, TTrigger> where TTrigger : Enum where TState :
public delegate void OnTransitionedDelegate(TTrigger trigger, TState from, TState to);
- public TState CurrentState => _currentState.StateId;
+ public TState State => _currentState.StateId;
public StateMachine(TState initialState)
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/CoinJoinStateViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/CoinJoinStateViewModel.cs
@@ -280,7 +280,7 @@ public partial class CoinJoinStateViewModel : ViewModelBase
private void TimerOnTick()
{
- if (_stateMachine.CurrentState == State.AutoStarting)
+ if (_stateMachine.State == State.AutoStarting)
{
_stateMachine.Process();
}
@@ -310,12 +310,13 @@ public partial class CoinJoinStateViewModel : ViewModelBase
switch (e)
{
case StartingEventArgs startingEventArgs:
- if (_stateMachine.CurrentState == State.AutoCoinJoin)
+ if (_stateMachine.State == State.AutoCoinJoin)
{
_countDownStarted = DateTimeOffset.Now;
_autoStartTime = _countDownStarted + startingEventArgs.StartingIn;
_stateMachine.Fire(Trigger.AutoCoinJoinEntered);
}
+
break;
case StartedEventArgs:

MODIFY
WalletWasabi.Tests/UnitTests/StateMachineTests.cs
WalletWasabi.Tests/UnitTests/StateMachineTests.cs
using FluentAssertions;
-using Stateless;
+using WalletWasabi.Fluent.State;
using Xunit;
using Xunit.Abstractions;

Switch to own StateMachine