move logic outside method.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerViewModel.cs
@@ -119,7 +119,12 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
InsertWallet(walletViewModel);
- walletViewModel.OpenWallet();
+ if (!WalletManager.AnyWallet(x => x.State >= WalletState.Starting && x != walletViewModel.Wallet))
+ {
+ walletViewModel.OpenWalletTabs();
+ }
+
+ walletViewModel.IsExpanded = true;
return walletViewModel;
}

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
@@ -115,15 +115,8 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private CompositeDisposable Disposables { get; set; }
- public void OpenWallet()
+ public void OpenWalletTabs()
{
- IsExpanded = true;
-
- if (WalletManager.AnyWallet(x=>x.State >= WalletState.Starting && x != Wallet))
- {
- return;
- }
-
var shell = IoC.Get<IShell>();
if (SendTab is { })

move logic outside method.