diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-01 11:18:50 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-01 12:32:26 +0000 |
commit | 25e5890d37a1b243d4b8aadb45743d715bd4d0f9 (patch) | |
tree | 2cb9f5543d11a7f7e18145cb0dcf15f209c38c73 /src/simplewallet | |
parent | Merge pull request #4333 (diff) | |
download | monero-25e5890d37a1b243d4b8aadb45743d715bd4d0f9.tar.xz |
wallet: fix --generate-from-json using wrong password
Diffstat (limited to 'src/simplewallet')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 7c68de3f3..90f8535d7 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -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) |