Update WalletWasabi.Gui/Tabs/WalletManager/RecoverWallets/RecoverWalletViewModel.cs
MODIFY
WalletWasabi.Gui/Tabs/WalletManager/RecoverWallets/RecoverWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/RecoverWallets/RecoverWalletViewModel.cs
@@ -226,11 +226,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.RecoverWallets
{
errors.Add(ErrorSeverity.Error, "Path is not valid.");
}
- else if (!KeyPath.TryParse(AccountKeyPath, out var keyPath))
- {
- errors.Add(ErrorSeverity.Error, "Path is not a valid derivation path.");
- }
- else
+ else if (KeyPath.TryParse(AccountKeyPath, out var keyPath))
{
var accountKeyPath = keyPath.GetAccountKeyPath();
if (keyPath.Length != accountKeyPath.Length || accountKeyPath.Length != KeyManager.DefaultAccountKeyPath.Length)
@@ -238,6 +234,10 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.RecoverWallets
errors.Add(ErrorSeverity.Error, "Path is not a compatible account derivation path.");
}
}
+ else
+ {
+ errors.Add(ErrorSeverity.Error, "Path is not a valid derivation path.");
+ }
}
}
}

Update WalletWasabi.Gui/Tabs/WalletManager/RecoverWallets/RecoverWalletViewModel.cs

Co-authored-by: yahiheb <52379387+yahiheb@users.noreply.github.com>