Merge pull request #4621

0cdd4b07 wallet2_api: fix generating new wallet in the GUI (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-10-16 17:13:39 +02:00
commit e0a1d45d76
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

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());