Move SetLastAccessTimeForNow
MODIFY
WalletWasabi/Blockchain/Keys/KeyManager.cs
WalletWasabi/Blockchain/Keys/KeyManager.cs
@@ -153,18 +153,6 @@ namespace WalletWasabi.Blockchain.Keys
return new KeyManager(encryptedSecret, extKey.ChainCode, masterFingerprint, extPubKey, false, AbsoluteMinGapLimit, new BlockchainState(), filePath, keyPath);
}
- public void SetLastAccessTimeForNow()
- {
- if (FilePath is { })
- {
- // Set the LastAccessTime.
- new FileInfo(FilePath)
- {
- LastAccessTime = DateTime.Now
- };
- }
- }
-
public static KeyManager CreateNewWatchOnly(ExtPubKey extPubKey, string filePath = null)
{
return new KeyManager(null, null, null, extPubKey, null, AbsoluteMinGapLimit, new BlockchainState(), filePath);

MODIFY
WalletWasabi/Wallets/Wallet.cs
WalletWasabi/Wallets/Wallet.cs
@@ -159,8 +159,6 @@ namespace WalletWasabi.Wallets
State = WalletState.Starting;
InitializingChanged?.Invoke(this, true);
- KeyManager.SetLastAccessTimeForNow();
-
if (!Synchronizer.IsRunning)
{
throw new NotSupportedException($"{nameof(Synchronizer)} is not running.");
@@ -184,6 +182,15 @@ namespace WalletWasabi.Wallets
await LoadWalletStateAsync(cancel).ConfigureAwait(false);
await LoadDummyMempoolAsync().ConfigureAwait(false);
}
+
+ if (KeyManager.FilePath is { })
+ {
+ // Set the LastAccessTime.
+ new FileInfo(KeyManager.FilePath)
+ {
+ LastAccessTime = DateTime.Now
+ };
+ }
}
await base.StartAsync(cancel).ConfigureAwait(false);
@@ -319,10 +326,10 @@ namespace WalletWasabi.Wallets
ChaumianClient.OnDequeue -= ChaumianClient_OnDequeue;
await ChaumianClient.StopAsync(cancel).ConfigureAwait(false);
- Logger.LogInfo($"{nameof(ChaumianClient)} is stopped.");
}
DisconnectDisposeNullLocalBitcoinCoreNode();
+ Logger.LogInfo($"{nameof(ChaumianClient)} is stopped.");
}
finally
{

Move SetLastAccessTimeForNow