Update version immediately
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -142,7 +142,7 @@ namespace WalletWasabi.Gui
Synchronizer = new WasabiSynchronizer(Network, BitcoinStore, Config.GetFallbackBackendUri(), null);
}
- HostedServices.Register(new UpdateChecker(TimeSpan.FromMinutes(7), Synchronizer.WasabiClient), "Software Update Checker");
+ HostedServices.Register(new UpdateChecker(TimeSpan.FromMinutes(7), Synchronizer), "Software Update Checker");
#region ProcessKillSubscription

MODIFY
WalletWasabi/Services/UpdateChecker.cs
WalletWasabi/Services/UpdateChecker.cs
@@ -15,16 +15,30 @@ namespace WalletWasabi.Services
{
private UpdateStatus _updateStatus;
- public UpdateChecker(TimeSpan period, WasabiClient client) : base(period)
+ public UpdateChecker(TimeSpan period, WasabiSynchronizer synchronizer) : base(period)
{
- WasabiClient = Guard.NotNull(nameof(client), client);
+ Synchronizer = Guard.NotNull(nameof(synchronizer), synchronizer);
+ WasabiClient = synchronizer.WasabiClient;
UpdateStatus = new UpdateStatus(true, true, new Version());
+
+ Synchronizer.PropertyChanged += Synchronizer_PropertyChanged;
+ }
+
+ private void Synchronizer_PropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == nameof(WasabiSynchronizer.BackendStatus) &&
+ Synchronizer.BackendStatus == BackendStatus.Connected)
+ {
+ TriggerRound();
+ }
}
public event EventHandler<UpdateStatus> UpdateStatusChanged;
public WasabiClient WasabiClient { get; }
+ public WasabiSynchronizer Synchronizer { get; }
+
public UpdateStatus UpdateStatus
{
get => _updateStatus;
@@ -42,5 +56,11 @@ namespace WalletWasabi.Services
{
UpdateStatus = await WasabiClient.CheckUpdatesAsync(cancel).ConfigureAwait(false);
}
+
+ public override void Dispose()
+ {
+ Synchronizer.PropertyChanged -= Synchronizer_PropertyChanged;
+ base.Dispose();
+ }
}
}

Update version immediately