Skip to content

Commit

Permalink
fix: update x/mint parameter validation (#12384) (#12395)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 30, 2022
1 parent d5fa0a7 commit 0f862da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Bug Fixes

* (x/mint) [#12384](https://github.com/cosmos/cosmos-sdk/pull/12384) Ensure `GoalBonded` must be positive when performing `x/mint` parameter validation.
* (x/auth) [#12261](https://github.com/cosmos/cosmos-sdk/pull/12261) Deprecate pagination in GetTxsEventRequest/Response in favor of page and limit to align with tendermint `SignClient.TxSearch`
* (vesting) [#12190](https://github.com/cosmos/cosmos-sdk/pull/12190) Replace https://github.com/cosmos/cosmos-sdk/pull/12190 to use `NewBaseAccountWithAddress` in all vesting account message handlers.
* (cli) [#12127](https://github.com/cosmos/cosmos-sdk/pull/12127) Fix the CLI not always taking into account `--fee-payer` and `--fee-granter` flags.
Expand Down
4 changes: 2 additions & 2 deletions x/mint/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,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 0f862da

Please sign in to comment.