Select open wallet
MODIFY
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
@@ -98,11 +98,24 @@ namespace WalletWasabi.Fluent.ViewModels
private void OpenClosedWallet(WalletManager walletManager, UiConfig uiConfig, ClosedWalletViewModel closedWalletViewModel)
{
+ var select = SelectedWallet == closedWalletViewModel;
+
RemoveWallet(closedWalletViewModel);
- var walletViewModel = OpenWallet(walletManager, uiConfig, closedWalletViewModel.Wallet);
+ var walletViewModelItem = OpenWallet(walletManager, uiConfig, closedWalletViewModel.Wallet);
+
+ if (select)
+ {
+ if (!_walletActionsDictionary.TryGetValue(walletViewModelItem, out var actions))
+ {
+ actions = GetWalletActions(walletViewModelItem);
+ _walletActionsDictionary[walletViewModelItem] = actions;
+ }
+
+ InsertActions(walletViewModelItem, actions);
- // TODO: Handle opened walletViewModel.
+ SelectedWallet = walletViewModelItem;
+ }
}
private WalletViewModelBase OpenWallet(WalletManager walletManager, UiConfig uiConfig, Wallet wallet)

Select open wallet