Skip to content

Commit

Permalink
fix: update x/mint parameter validation (backport cosmos#12384) (cosm…
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored and JeancarloBarrios committed Sep 28, 2024
1 parent 4c4f657 commit cd06727
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

### Bug Fixes

* (x/mint) [#12384](https://github.com/cosmos/cosmos-sdk/pull/12384) Ensure `GoalBonded` must be positive when performing `x/mint` parameter validation.

## [v0.45.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.6) - 2022-06-28

### Improvements
Expand Down
1 change: 1 addition & 0 deletions x/mint/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func validateGoalBonded(v math.LegacyDec) error {
if v.IsNil() {
return fmt.Errorf("goal bonded cannot be nil: %s", v)
}

if v.IsNegative() || v.IsZero() {
return fmt.Errorf("goal bonded must be positive: %s", v)
}
Expand Down

0 comments on commit cd06727

Please sign in to comment.