Make sure it can start when autocoinjoin is on
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletSettingsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletSettingsViewModel.cs
@@ -2,6 +2,7 @@ using System.Reactive.Linq;
using System.Windows.Input;
using ReactiveUI;
using WalletWasabi.Fluent.ViewModels.Navigation;
+using WalletWasabi.WabiSabi.Client;
namespace WalletWasabi.Fluent.ViewModels.Wallets;
@@ -43,6 +44,11 @@ public partial class WalletSettingsViewModel : RoutableViewModel
{
wallet.KeyManager.AutoCoinJoin = x;
wallet.KeyManager.ToFile();
+ if (x)
+ {
+ var coinJoinManager = Services.HostedServices.Get<CoinJoinManager>();
+ coinJoinManager.AutoStart(wallet);
+ }
});
_minAnonScoreTarget = wallet.KeyManager.MinAnonScoreTarget;

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinManager.cs
WalletWasabi/WabiSabi/Client/CoinJoinManager.cs
@@ -48,6 +48,9 @@ public class CoinJoinManager : BackgroundService
public void Stop(Wallet wallet) =>
WalletManualState.AddOrUpdate(wallet, CoinJoinCommand.Stop, (_,_) => CoinJoinCommand.Stop);
+ public void AutoStart(Wallet wallet) =>
+ WalletManualState.Remove(wallet, out _);
+
public event EventHandler<StatusChangedEventArgs>? StatusChanged;
public CoinJoinClientState HighestCoinJoinClientState

Make sure it can start when autocoinjoin is on