aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-10-25 18:59:54 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-10-25 18:59:54 -0500
commite5710b1898ffa0716a36553147e715d544689e72 (patch)
tree27ecb054a97e5a319571e498b17216e329d2088e
parentMerge pull request #8003 (diff)
parentsimplewallet: fix incoming_transfers index error (diff)
downloadmonero-e5710b1898ffa0716a36553147e715d544689e72.tar.xz
Merge pull request #8004
ace4669 simplewallet: fix incoming_transfers index error (selsta)
-rw-r--r--src/simplewallet/simplewallet.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index dc031b36c..fd784c5ae 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -6061,6 +6061,7 @@ bool simple_wallet::show_incoming_transfers(const std::vector<std::string>& args
auto local_args = args;
LOCK_IDLE_SCOPE();
+ std::set<uint32_t> subaddr_indices;
bool filter = false;
bool available = false;
bool verbose = false;
@@ -6086,6 +6087,11 @@ bool simple_wallet::show_incoming_transfers(const std::vector<std::string>& args
verbose = true;
else if (local_args[0] == "uses")
uses = true;
+ else if (local_args[0].substr(0, 6) == "index=")
+ {
+ if (!parse_subaddress_indices(local_args[0], subaddr_indices))
+ return true;
+ }
else
{
fail_msg_writer() << tr("Invalid keyword: ") << local_args.front();
@@ -6098,14 +6104,6 @@ bool simple_wallet::show_incoming_transfers(const std::vector<std::string>& args
PAUSE_READLINE();
- std::set<uint32_t> subaddr_indices;
- if (local_args.size() > 0 && local_args[0].substr(0, 6) == "index=")
- {
- if (!parse_subaddress_indices(local_args[0], subaddr_indices))
- return true;
- local_args.erase(local_args.begin());
- }
-
if (local_args.size() > 0)
{
PRINT_USAGE(USAGE_INCOMING_TRANSFERS);