mirror of https://github.com/oxen-io/oxen-core.git
Fix empty lines in `print_locked_stakes` output
Fixes #1575 We were appending a newline for every locked stake rather than just this wallet's locked stakes.
This commit is contained in:
parent
7145cdae6e
commit
efebe83225
|
@ -6356,11 +6356,6 @@ bool simple_wallet::query_locked_stakes(bool print_result)
|
|||
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;
|
||||
|
@ -6370,6 +6365,11 @@ bool simple_wallet::query_locked_stakes(bool print_result)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue