diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-11-14 15:49:15 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-11-14 15:49:15 +0200 |
commit | 95c34e17cd55c61d90017386d73db7dff0719146 (patch) | |
tree | 38748324a3d9bd1ca63f94582a964a5b3ce87778 /src | |
parent | Merge pull request #2749 (diff) | |
parent | Fix 'sweep_all' command when called with no args (diff) | |
download | monero-95c34e17cd55c61d90017386d73db7dff0719146.tar.xz |
Merge pull request #2750
424852a6 Fix 'sweep_all' command when called with no args (Leon Klingele)
Diffstat (limited to 'src')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index b335c2218..3d8d395db 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -3173,6 +3173,12 @@ bool simple_wallet::sweep_unmixable(const std::vector<std::string> &args_) bool simple_wallet::sweep_main(uint64_t below, const std::vector<std::string> &args_) { // sweep_all [index=<N1>[,<N2>,...]] [<ring_size>] <address> [<payment_id>] + if (args_.size() == 0) + { + fail_msg_writer() << tr("No address given"); + return true; + } + if (m_wallet->ask_password() && !get_and_verify_password()) { return true; } if (!try_connect_to_daemon()) return true; @@ -3255,12 +3261,6 @@ bool simple_wallet::sweep_main(uint64_t below, const std::vector<std::string> &a local_args.pop_back(); } - if (local_args.size() == 0) - { - fail_msg_writer() << tr("No address given"); - return true; - } - cryptonote::address_parse_info info; if (!cryptonote::get_account_address_from_str_or_url(info, m_wallet->testnet(), local_args[0], oa_prompter)) { |