Skip to content

Commit

Permalink
Tune rewards output
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jan 3, 2021
1 parent c63e14d commit 560ed90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli-output/src/cli_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,21 +649,21 @@ fn show_epoch_rewards(
writeln!(f, "Epoch Rewards:")?;
writeln!(
f,
" {:<8} {:<11} {:<15} {:<15} {:>14} {:>14}",
" {:<6} {:<11} {:<16} {:<16} {:>14} {:>14}",
"Epoch", "Reward Slot", "Amount", "New Balance", "Percent Change", "APR"
)?;
for reward in epoch_rewards {
writeln!(
f,
" {:<8} {:<11} ◎{:<14.9} ◎{:<14.9} {:>13.9}% {}",
" {:<6} {:<11} ◎{:<16.9} ◎{:<14.9} {:>13.2}% {}",
reward.epoch,
reward.effective_slot,
lamports_to_sol(reward.amount),
lamports_to_sol(reward.post_balance),
reward.percent_change,
reward
.apr
.map(|apr| format!("{:>13.9}%", apr))
.map(|apr| format!("{:>13.2}%", apr))
.unwrap_or_default(),
)?;
}
Expand Down

0 comments on commit 560ed90

Please sign in to comment.