mirror of
https://github.com/wownero/wownero.git
synced 2026-11-20 15:45:05 +01:00
wallet_api: set m_password in the recovery creation paths
libwallet_api_tests: cover password retention on wallet recovery
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user