Skip to content

Commit

Permalink
Fix empty lines in print_locked_stakes output
Browse files Browse the repository at this point in the history
  • Loading branch information
MogamboPuri committed Mar 29, 2024
1 parent 557c336 commit 2c76927
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/simplewallet/simplewallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 2c76927

Please sign in to comment.