change order, remove window close call
MODIFY
WalletWasabi.Fluent.Desktop/Program.cs
WalletWasabi.Fluent.Desktop/Program.cs
@@ -163,16 +163,16 @@ namespace WalletWasabi.Fluent.Desktop
/// </summary>
private static async Task TerminateApplicationAsync()
{
- if (Global is { } global)
- {
- await global.DisposeAsync().ConfigureAwait(false);
- }
-
if (MainViewModel.Instance is { } mainViewModel)
{
mainViewModel.ClearStacks();
Logger.LogSoftwareStopped("Wasabi GUI");
}
+
+ if (Global is { } global)
+ {
+ await global.DisposeAsync().ConfigureAwait(false);
+ }
}
private static void TaskScheduler_UnobservedTaskException(object? sender, UnobservedTaskExceptionEventArgs? e)

MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -617,14 +617,6 @@ namespace WalletWasabi.Gui
Logger.LogError($"Error during {nameof(WalletManager.RemoveAndStopAllAsync)}: {ex}");
}
- Logger.LogDebug($"Step: Application's MainWindow.", nameof(Global));
-
- Dispatcher.UIThread.PostLogException(() =>
- {
- var window = ((IClassicDesktopStyleApplicationLifetime)Application.Current.ApplicationLifetime).MainWindow;
- window?.Close();
- });
-
WalletManager.OnDequeue -= WalletManager_OnDequeue;
WalletManager.WalletRelevantTransactionProcessed -= WalletManager_WalletRelevantTransactionProcessed;

change order, remove window close call