Verify delegate is not null before invoking
MODIFY
WalletWasabi/Services/ConfigWatcher.cs
WalletWasabi/Services/ConfigWatcher.cs
@@ -43,7 +43,7 @@ namespace WalletWasabi.Services
try
{
// If stop was requested return.
- if (IsRunning == false) return;
+ if (!IsRunning) return;
await Task.Delay(period, Stop.Token);
@@ -51,7 +51,7 @@ namespace WalletWasabi.Services
{
await Config.LoadOrCreateDefaultFileAsync();
- await executeWhenChangedAsync();
+ await executeWhenChangedAsync?.Invoke();
}
}
catch (TaskCanceledException ex)

MODIFY
WalletWasabi/Services/UpdateChecker.cs
WalletWasabi/Services/UpdateChecker.cs
@@ -41,18 +41,18 @@ namespace WalletWasabi.Services
try
{
// If stop was requested return.
- if (IsRunning == false) return;
+ if (!IsRunning) return;
(bool backendCompatible, bool clientUpToDate) updates = await WasabiClient.CheckUpdatesAsync(Stop.Token);
if (!updates.backendCompatible)
{
- await executeIfBackendIncompatible();
+ await executeIfBackendIncompatible?.Invoke();
}
if (!updates.clientUpToDate)
{
- await executeIfClientOutOfDate();
+ await executeIfClientOutOfDate?.Invoke();
}
await Task.Delay(period, Stop.Token);

Verify delegate is not null before invoking