Skip to content

Commit

Permalink
fix wrapf
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyaoy committed Dec 13, 2024
1 parent adf28e5 commit ae5812b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion protocol/x/delaymsg/keeper/delayed_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func validateSigners(signers [][]byte) error {
)
}
if !bytes.Equal(signers[0], types.ModuleAddress) {
return errorsmod.Wrapf(
return errorsmod.Wrap(
types.ErrInvalidSigner,
"message signer must be delaymsg module address",
)
Expand Down
2 changes: 1 addition & 1 deletion protocol/x/prices/keeper/market_param_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func TestModifyMarketParam_Errors(t *testing.T) {
minExchanges: uint32(1),
minPriceChangePpm: uint32(50),
exchangeConfigJson: validExchangeConfigJson,
expectedErr: errorsmod.Wrapf(
expectedErr: errorsmod.Wrap(
types.ErrMarketParamPairAlreadyExists,
"1-1",
).Error(),
Expand Down
8 changes: 4 additions & 4 deletions protocol/x/vest/types/vest_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (

func (entry VestEntry) Validate() error {
if entry.VesterAccount == "" {
return errorsmod.Wrapf(ErrInvalidVesterAccount, "vester account cannot be empty")
return errorsmod.Wrap(ErrInvalidVesterAccount, "vester account cannot be empty")
}

if entry.TreasuryAccount == "" {
return errorsmod.Wrapf(ErrInvalidTreasuryAccount, "treasury account cannot be empty")
return errorsmod.Wrap(ErrInvalidTreasuryAccount, "treasury account cannot be empty")
}

if err := sdk.ValidateDenom(entry.Denom); err != nil {
Expand All @@ -23,11 +23,11 @@ func (entry VestEntry) Validate() error {
}

if entry.StartTime.Location().String() != "UTC" {
return errorsmod.Wrapf(ErrInvalidTimeZone, "start_time must be in UTC")
return errorsmod.Wrap(ErrInvalidTimeZone, "start_time must be in UTC")
}

if entry.EndTime.Location().String() != "UTC" {
return errorsmod.Wrapf(ErrInvalidTimeZone, "end_time must be in UTC")
return errorsmod.Wrap(ErrInvalidTimeZone, "end_time must be in UTC")
}
return nil
}

0 comments on commit ae5812b

Please sign in to comment.