Skip to content

Commit

Permalink
fix: update x/mint parameter validation (backport cosmos#12384)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored and mattverse committed Oct 13, 2022
1 parent 4b35574 commit 0c20524
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/mint/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ func validateGoalBonded(i interface{}) error {
return fmt.Errorf("invalid parameter type: %T", i)
}

if v.IsNegative() {
return fmt.Errorf("goal bonded cannot be negative: %s", v)
if v.IsNegative() || v.IsZero() {
return fmt.Errorf("goal bonded must be positive: %s", v)
}
if v.GT(sdk.OneDec()) {
return fmt.Errorf("goal bonded too large: %s", v)
Expand Down

0 comments on commit 0c20524

Please sign in to comment.