wallet: fix --generate-from-json using wrong password

This commit is contained in:
moneromooo-monero 2018-10-01 11:18:50 +00:00
parent 83d8f03c23
commit 25e5890d37
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
6 changed files with 20 additions and 7 deletions

View file

@ -3275,7 +3275,9 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
{
try
{
m_wallet = tools::wallet2::make_from_json(vm, false, m_generate_from_json, password_prompter);
auto rc = tools::wallet2::make_from_json(vm, false, m_generate_from_json, password_prompter);
m_wallet = std::move(rc.first);
password = rc.second.password();
m_wallet_file = m_wallet->path();
}
catch (const std::exception &e)