From 2c76927c022db9ba22b02a47f982689839464545 Mon Sep 17 00:00:00 2001 From: MogamboPuri Date: Fri, 29 Mar 2024 14:31:17 +0530 Subject: [PATCH] Fix empty lines in print_locked_stakes output --- src/simplewallet/simplewallet.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 1c7fb0db9c..8940533bc2 100755 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -6329,11 +6329,6 @@ bool simple_wallet::query_locked_stakes(bool print_result, bool print_key_images crypto::key_image key_image; for (const auto& entry : response) { - if (first) - first = false; - else - msg_buf += "\n"; - if (!tools::hex_to_type(entry.key_image, key_image)) { fail_msg_writer() << tr("Failed to parse hex representation of key image: ") << entry.key_image; @@ -6343,6 +6338,11 @@ bool simple_wallet::query_locked_stakes(bool print_result, bool print_key_images if (!m_wallet->contains_key_image(key_image)) continue; + if (first) + first = false; + else + msg_buf += "\n"; + has_locked_stakes = true; if (!print_result) continue;