Skip to content

Commit

Permalink
Merge pull request #5566 from oasisprotocol/amela/fix/parameters-prop…
Browse files Browse the repository at this point in the history
…osal-output
  • Loading branch information
amela authored Feb 23, 2024
2 parents 45e0425 + e25ea47 commit c95d5e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .changelog/5566.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
governance/ChangeParametersProposal: Display only changed parameters

Omit the unchanged parameter values when pretty-printing the
`ChangeParameterProposal`.
3 changes: 3 additions & 0 deletions go/governance/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ func (p *ChangeParametersProposal) PrettyPrint(_ context.Context, prefix string,
fmt.Fprintf(w, "%sModule: %s\n", prefix, p.Module)
fmt.Fprintf(w, "%sChanges: \n", prefix)
for param, value := range changes {
if value == nil {
continue
}
fmt.Fprintf(w, "%s - Parameter: %s\n", prefix, param)
fmt.Fprintf(w, "%s Value: %v\n", prefix, value)
}
Expand Down

0 comments on commit c95d5e0

Please sign in to comment.