Don't close recovery wallet page when the user closes the pwdbox
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/RecoverWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/RecoverWalletViewModel.cs
@@ -15,6 +15,7 @@ using WalletWasabi.Logging;
using WalletWasabi.Models;
using WalletWasabi.Wallets;
+
namespace WalletWasabi.Fluent.ViewModels.AddWallet
{
public class RecoverWalletViewModel : RoutableViewModel
@@ -77,9 +78,11 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
{
try
{
- var password = await PasswordInteraction
- .Handle("Type the password of the wallet to be to recover and click Continue.").ToTask() ?? "";
+ var result = await PasswordInteraction
+ .Handle("Type the password of the wallet to be to recover and click Continue.").ToTask();
+ if (result is { } password)
+ {
var walletFilePath = walletManager.WalletDirectories.GetWalletFilePaths(walletName)
.walletFilePath;
@@ -89,10 +92,13 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
walletFilePath,
AccountKeyPath!,
(int) MinGapLimit!);
+
keyManager.SetNetwork(network);
+
walletManager.AddWallet(keyManager);
- navigationState.DialogScreen?.Invoke().Router.NavigationStack.Clear();
+ navigationState.DialogScreen.Invoke().Router.NavigationStack.Clear();
+ }
}
catch (Exception ex)
{

Don't close recovery wallet page when the user closes the pwdbox