wallet_api: set m_password in the recovery creation paths

libwallet_api_tests: cover password retention on wallet recovery
This commit is contained in:
plowsof
2026-07-11 17:14:14 +01:00
committed by iuanv9
parent 641e5ca588
commit a4f8ef4817
2 changed files with 40 additions and 0 deletions
+3
View File
@@ -681,6 +681,7 @@ bool WalletImpl::recoverFromKeysWithPassword(const std::string &path,
setStatusError(string(tr("failed to generate new wallet: ")) + e.what());
return false;
}
m_password = password;
return true;
}
@@ -698,6 +699,7 @@ bool WalletImpl::recoverFromDevice(const std::string &path, const std::string &p
setStatusError(string(tr("failed to generate new wallet: ")) + e.what());
return false;
}
m_password = password;
return true;
}
@@ -766,6 +768,7 @@ bool WalletImpl::recover(const std::string &path, const std::string &password, c
try {
m_wallet->set_seed_language(old_language);
m_wallet->generate(path, password, recovery_key, true, false);
m_password = password;
} catch (const std::exception &e) {
setStatusCritical(e.what());