Skip to content

Commit

Permalink
fix: patch barberry (cosmos#16465)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Jun 8, 2023
1 parent cfc757d commit 666c345
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions x/auth/vesting/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ func (msg MsgCreatePeriodicVestingAccount) ValidateBasic() error {
}

for i, period := range msg.VestingPeriods {
if !period.Amount.IsValid() {
return sdkerrors.ErrInvalidCoins.Wrap(period.Amount.String())
}

if !period.Amount.IsAllPositive() {
return sdkerrors.ErrInvalidCoins.Wrap(period.Amount.String())
}

if period.Length < 1 {
return fmt.Errorf("invalid period length of %d in period %d, length must be greater than 0", period.Length, i)
}
Expand Down

0 comments on commit 666c345

Please sign in to comment.