Better namings
MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinManager.cs
WalletWasabi/WabiSabi/Client/CoinJoinManager.cs
@@ -153,7 +153,7 @@ public class CoinJoinManager : BackgroundService
private ImmutableDictionary<string, Wallet> GetMixableWallets() =>
WalletManager.GetWallets()
.Where(x => x.State == WalletState.Started) // Only running wallets
- .Where(x => (x.KeyManager.AutoCoinJoin && (DateTimeOffset.UtcNow - x.StartedTime) > AutoCoinJoinDelayAfterWalletLoaded) || x.AllowManualCoinJoin)
+ .Where(x => (x.KeyManager.AutoCoinJoin && x.ElapsedTimeSinceStartup > AutoCoinJoinDelayAfterWalletLoaded) || x.AllowManualCoinJoin)
.Where(x => !x.KeyManager.IsWatchOnly) // that are not watch-only wallets
.Where(x => x.Kitchen.HasIngredients)
.ToImmutableDictionary(x => x.WalletName, x => x);

MODIFY
WalletWasabi/Wallets/Wallet.cs
WalletWasabi/Wallets/Wallet.cs
@@ -71,7 +71,8 @@ public class Wallet : BackgroundService
}
}
- public DateTimeOffset StartedTime { get; private set; }
+ public TimeSpan ElapsedTimeSinceStartup => DateTimeOffset.UtcNow - StartupTime;
+ public DateTimeOffset StartupTime { get; private set; }
public BitcoinStore BitcoinStore { get; private set; }
public KeyManager KeyManager { get; }
public WasabiSynchronizer Synchronizer { get; private set; }
@@ -191,7 +192,7 @@ public class Wallet : BackgroundService
await base.StartAsync(cancel).ConfigureAwait(false);
State = WalletState.Started;
- StartedTime = DateTimeOffset.UtcNow;
+ StartupTime = DateTimeOffset.UtcNow;
}
catch
{

Better namings