Remove IsHardwareWallet
MODIFY
WalletWasabi.Gui/Tabs/WalletManager/HardwareWallets/ConnectHardwareWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/HardwareWallets/ConnectHardwareWalletViewModel.cs
@@ -47,7 +47,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.HardwareWallets
{
Global = Locator.Current.GetService<Global>();
Owner = owner;
- LoadWalletType = LoadWalletType.Hardware;
Wallets = new ObservableCollection<LoadWalletEntry>();
IsHwWalletSearchTextVisible = false;
@@ -135,10 +134,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.HardwareWallets
});
}
- public LoadWalletType LoadWalletType { get; }
- public bool IsHardwareWallet => LoadWalletType == LoadWalletType.Hardware;
- public bool IsDesktopWallet => LoadWalletType == LoadWalletType.Desktop;
-
public bool IsHwWalletSearchTextVisible
{
get => _isHwWalletSearchTextVisible;
@@ -247,32 +242,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.HardwareWallets
LoadButtonText = text;
}
- public override void OnCategorySelected()
- {
- if (IsHardwareWallet)
- {
- return;
- }
-
- Wallets.Clear();
-
- foreach (var wallet in Global.WalletManager
- .GetKeyManagers()
- .Where(x => !x.IsWatchOnly) // If password isn't required then add the wallet, otherwise add only not watchonly wallets.
- .OrderByDescending(x => x.GetLastAccessTime())
- .Select(x => new LoadWalletEntry(x.WalletName)))
- {
- Wallets.Add(wallet);
- }
-
- TrySetWalletStates();
-
- if (!CanLoadWallet && Wallets.Count > 0)
- {
- NotificationHelpers.Warning("There is already an open wallet. Restart the application in order to open a different one.");
- }
- }
-
public async Task<KeyManager> LoadKeyManagerAsync()
{
try
@@ -285,8 +254,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.HardwareWallets
}
var walletName = selectedWallet.WalletName;
- if (IsHardwareWallet)
- {
+
var client = new HwiClient(Global.Network);
if (selectedWallet.HardwareWalletInfo is null)
@@ -397,7 +365,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.HardwareWallets
}
KeyManager.CreateNewHardwareWalletWatchOnly(selectedWallet.HardwareWalletInfo.Fingerprint.Value, extPubKey, path);
}
- }
KeyManager keyManager = Global.WalletManager.GetWalletByName(walletName).KeyManager;
@@ -503,10 +470,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.HardwareWallets
protected async Task EnumerateIfHardwareWalletsAsync()
{
- if (!IsHardwareWallet)
- {
- return;
- }
var cts = new CancellationTokenSource(TimeSpan.FromMinutes(3));
IsHwWalletSearchTextVisible = true;
try

Remove IsHardwareWallet