Skip to content

Commit

Permalink
Only print Foundation inflation rate if it is greater than 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jun 26, 2021
1 parent 8fc4c2f commit b44af11
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cli-output/src/cli_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1513,11 +1513,15 @@ impl fmt::Display for CliInflation {
"Staking rate: {:>5.2}%",
self.current_rate.validator * 100.
)?;
writeln!(
f,
"Foundation rate: {:>5.2}%",
self.current_rate.foundation * 100.
)

if self.current_rate.foundation > 0. {
writeln!(
f,
"Foundation rate: {:>5.2}%",
self.current_rate.foundation * 100.
)?;
}
Ok(())
}
}

Expand Down

0 comments on commit b44af11

Please sign in to comment.