exterminate receiveDominant forever
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerViewModel.cs
@@ -94,19 +94,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
_walletDictionary.Add(walletVM.Wallet, walletVM);
}
- internal WalletViewModelBase OpenWallet(Wallet wallet)
- {
- if (wallet.Coins.Any())
- {
- // If already have coins then open the last active tab first.
- return OpenWallet(wallet, receiveDominant: false);
- }
- else // Else open with Receive tab first.
- {
- return OpenWallet(wallet, receiveDominant: true);
- }
- }
-
private void OpenClosedWallet(ClosedWalletViewModel closedWalletViewModel)
{
var select = SelectedItem == closedWalletViewModel;
@@ -121,7 +108,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
}
- private WalletViewModelBase OpenWallet(Wallet wallet, bool receiveDominant)
+ internal WalletViewModelBase OpenWallet(Wallet wallet)
{
if (_wallets.OfType<WalletViewModel>().Any(x => x.Title == wallet.WalletName))
{
@@ -132,7 +119,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
InsertWallet(walletViewModel);
- walletViewModel.OpenWallet(receiveDominant);
+ walletViewModel.OpenWallet();
return walletViewModel;
}

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
@@ -116,7 +116,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private CompositeDisposable Disposables { get; set; }
- public void OpenWallet(bool receiveDominant)
+ public void OpenWallet()
{
IsExpanded = true;
@@ -137,11 +137,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
shell.AddOrSelectDocument(HistoryTab);
// Select tab
- if (receiveDominant)
- {
- shell.AddOrSelectDocument(ReceiveTab);
- }
- else
+ if (Wallet.Coins.Any())
{
WasabiDocumentTabViewModel tabToOpen = UiConfig.LastActiveTab switch
{
@@ -157,6 +153,10 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
shell.AddOrSelectDocument(tabToOpen);
}
}
+ else
+ {
+ shell.AddOrSelectDocument(ReceiveTab);
+ }
}
}
}

exterminate receiveDominant forever