Do nothing by default
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/CoinJoinStateViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/CoinJoinStateViewModel.cs
@@ -210,7 +210,6 @@ public partial class CoinJoinStateViewModel : ViewModelBase
CurrentStatus = _initialisingMessage;
coinJoinManager.Stop(_wallet);
- coinJoinManager.AutoStart(_wallet);
_stateMachine.Fire(Trigger.AutoCoinJoinEntered);
});
@@ -302,7 +301,7 @@ public partial class CoinJoinStateViewModel : ViewModelBase
private TimeSpan GetRemainingTime() => (_countDownStarted + _autoStartTime) - DateTimeOffset.Now;
- private TimeSpan GetTotalTime() => _autoStartTime - _countDownStarted;
+ private TimeSpan GetTotalTime() => _autoStartTime;
private double GetPercentage() => GetElapsedTime().TotalSeconds / GetTotalTime().TotalSeconds * 100;

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinManager.cs
WalletWasabi/WabiSabi/Client/CoinJoinManager.cs
@@ -49,9 +49,6 @@ 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
@@ -98,11 +95,11 @@ public class CoinJoinManager : BackgroundService
if (!MustStart(openedWallet))
{
- if (!openedWallet.KeyManager.AutoCoinJoin)
- {
- NotifyCoinJoinStartError(openedWallet, CoinjoinError.AutoConjoinDisabled);
continue;
}
+
+ if (openedWallet.KeyManager.AutoCoinJoin)
+ {
if (IsUserInSendWorkflow)
{
NotifyCoinJoinStartError(openedWallet, CoinjoinError.UserInSendWorkflow);
@@ -114,6 +111,7 @@ public class CoinJoinManager : BackgroundService
continue;
}
}
+
var coinCandidates = SelectCandidateCoins(openedWallet).ToArray();
if (coinCandidates.Length == 0)
{

Do nothing by default