Bring out walletservice to a variable.
MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -632,17 +632,20 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
try
{
await Task.Run(async () => await Global.InitializeWalletServiceAsync(keyManager));
+
+ var walletService = Global.WalletService;
+
// Successfully initialized.
Owner.OnClose();
// Open Wallet Explorer tabs
- if (Global.WalletService.Coins.Any())
+ if (walletService.Coins.Any())
{
// If already have coins then open the last active tab first.
- IoC.Get<WalletExplorerViewModel>().OpenWallet(Global.WalletService, receiveDominant: false);
+ IoC.Get<WalletExplorerViewModel>().OpenWallet(walletService, receiveDominant: false);
}
else // Else open with Receive tab first.
{
- IoC.Get<WalletExplorerViewModel>().OpenWallet(Global.WalletService, receiveDominant: true);
+ IoC.Get<WalletExplorerViewModel>().OpenWallet(walletService, receiveDominant: true);
}
}
catch (Exception ex)

Bring out walletservice to a variable.