Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplewallet: add header to show_transfers command #9592

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/simplewallet/simplewallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8688,6 +8688,22 @@ bool simple_wallet::show_transfers(const std::vector<std::string> &args_)

PAUSE_READLINE();

auto formatter = boost::format("%8.8s %6.6s %8.8s %25.25s %20.20s %64.64s %15.15s %14.14s %s %s - %s");
message_writer(console_color_default, false) << formatter
% "Block"
% "In/Out"
% "Locked?"
% "Timestamp"
% "Amount"
% "Tx Hash"
% "Tx Payment ID"
% "Tx Fee"
% "Destination(s)"
% "Index"
% "Tx Note";

formatter = boost::format("%8.8llu %6.6s %8.8s %25.25s %20.20s %64.64s %15.15s %14.14s %s %s - %s");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line needed? formatter is not used after it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, it is used below.


for (const auto& transfer : all_transfers)
{
const auto color = transfer.type == "failed" ? console_color_red : transfer.confirmed ? ((transfer.direction == "in" || transfer.direction == "block") ? console_color_green : console_color_magenta) : console_color_default;
Expand All @@ -8704,8 +8720,6 @@ bool simple_wallet::show_transfers(const std::vector<std::string> &args_)
}
}

auto formatter = boost::format("%8.8llu %6.6s %8.8s %25.25s %20.20s %s %s %14.14s %s %s - %s");

message_writer(color, false) << formatter
% transfer.block
% transfer.direction
Expand Down
Loading