wallet2_api: fix generating new wallet in the GUI

It was creating a new wallet without a password first (this should
be fixed), then not changing the password correctly
This commit is contained in:
moneromooo-monero 2018-10-16 14:46:17 +00:00 committed by wowario
parent 01a67e96b1
commit 4fccdaea6a
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111
1 changed files with 1 additions and 1 deletions

View File

@ -776,7 +776,7 @@ bool WalletImpl::setPassword(const std::string &password)
{ {
clearStatus(); clearStatus();
try { try {
m_wallet->rewrite(m_wallet->get_wallet_file(), password); m_wallet->change_password(m_wallet->get_wallet_file(), m_password, password);
m_password = password; m_password = password;
} catch (const std::exception &e) { } catch (const std::exception &e) {
setStatusError(e.what()); setStatusError(e.what());