Skip to content

Commit

Permalink
Merge pull request #33 from notional-labs/barberry
Browse files Browse the repository at this point in the history
barberry
  • Loading branch information
jiujiteiro authored Jun 8, 2023
2 parents f487049 + 3dc6677 commit 07ae5b0
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 07ae5b0

Please sign in to comment.