Undo load wallet disappearence
MODIFY
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletSuccessViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletSuccessViewModel.cs
@@ -14,7 +14,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
ConfirmCommand = ReactiveCommand.Create(() =>
{
- owner.SelectLoadWallet();
+ owner.SelectedCategory = owner.LoadWalletCategory;
});
}

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -17,11 +17,9 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
private ObservableCollection<string> _wallets;
private string _selectedWallet;
private bool _isSelectedWallet;
- private WalletManagerViewModel _owner;
- public LoadWalletViewModel(WalletManagerViewModel owner) : base("Load Wallet")
+ public LoadWalletViewModel() : base("Load Wallet")
{
- _owner = owner;
_wallets = new ObservableCollection<string>();
this.WhenAnyValue(x => x.SelectedWallet).Subscribe(SelectedWallet => IsSelectedWallet = !string.IsNullOrEmpty(SelectedWallet));
LoadCommand = ReactiveCommand.Create(
@@ -73,8 +71,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
}
// Implement the logic here
-
- _owner.RemoveLoadWalletOption();
}
}
}

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/RecoverWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/RecoverWalletViewModel.cs
@@ -52,7 +52,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
var mnemonic = new Mnemonic(MnemonicWords);
KeyManager.Recover(mnemonic, Password, walletFilePath);
- owner.SelectLoadWallet();
+ owner.SelectedCategory = owner.LoadWalletCategory;
}
catch (Exception ex)
{

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/WalletManagerViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/WalletManagerViewModel.cs
@@ -14,11 +14,13 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
public WalletManagerViewModel() : base("Wallet Manager")
{
+ LoadWalletCategory = new LoadWalletViewModel();
+
Categories = new ObservableCollection<CategoryViewModel>
{
new GenerateWalletViewModel(this),
new RecoverWalletViewModel(this),
- new LoadWalletViewModel(this)
+ LoadWalletCategory
};
SelectedCategory = Categories.FirstOrDefault();
@@ -31,6 +33,8 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
});
}
+ public LoadWalletViewModel LoadWalletCategory { get; }
+
public ObservableCollection<CategoryViewModel> Categories
{
get { return _categories; }
@@ -63,11 +67,5 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
get { return _currentView; }
set { this.RaiseAndSetIfChanged(ref _currentView, value); }
}
-
- internal void RemoveLoadWalletOption()
- {
- SelectGenerateWallet();
- Categories.Remove(Categories.First(x=>x is LoadWalletViewModel));
- }
}
}

Undo load wallet disappearence