wallet: fix memory only wallets

at least when using restore_deterministic_wallet
This commit is contained in:
moneromooo-monero
2019-03-25 12:49:25 +00:00
parent ea07a9bc61
commit a8b98a0bd7
2 changed files with 9 additions and 18 deletions
+4 -2
View File
@@ -3460,7 +3460,8 @@ void wallet2::change_password(const std::string &filename, const epee::wipeable_
decrypt_keys(original_password);
setup_keys(new_password);
rewrite(filename, new_password);
store();
if (!filename.empty())
store();
}
//----------------------------------------------------------------------------------------------------
/*!
@@ -5142,7 +5143,8 @@ std::string wallet2::path() const
//----------------------------------------------------------------------------------------------------
void wallet2::store()
{
store_to("", epee::wipeable_string());
if (!m_wallet_file.empty())
store_to("", epee::wipeable_string());
}
//----------------------------------------------------------------------------------------------------
void wallet2::store_to(const std::string &path, const epee::wipeable_string &password)