diff --git a/x/rollapp/types/app.go b/x/rollapp/types/app.go index 68930d93b..62e219027 100644 --- a/x/rollapp/types/app.go +++ b/x/rollapp/types/app.go @@ -1,7 +1,7 @@ package types import ( - errorsmod "cosmossdk.io/errors" + "errors" ) func NewApp(id uint64, name, rollappId, description, image, url string, order int32) App { @@ -52,11 +52,11 @@ func (r App) ValidateBasic() error { } if err := validateURL(r.ImageUrl); err != nil { - return errorsmod.Wrap(ErrInvalidAppImage, err.Error()) + return errors.Join(ErrInvalidAppImage, err) } if err := validateURL(r.Url); err != nil { - return errorsmod.Wrap(ErrInvalidURL, err.Error()) + return errors.Join(ErrInvalidURL, err) } return nil diff --git a/x/rollapp/types/message_add_app.go b/x/rollapp/types/message_add_app.go index 2d05a8342..3d4620904 100644 --- a/x/rollapp/types/message_add_app.go +++ b/x/rollapp/types/message_add_app.go @@ -1,7 +1,8 @@ package types import ( - errorsmod "cosmossdk.io/errors" + "errors" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -57,7 +58,7 @@ func (msg *MsgAddApp) GetApp() App { func (msg *MsgAddApp) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { - return errorsmod.Wrap(ErrInvalidCreatorAddress, err.Error()) + return errors.Join(ErrInvalidCreatorAddress, err) } app := msg.GetApp() diff --git a/x/rollapp/types/message_remove_app.go b/x/rollapp/types/message_remove_app.go index 1d9bc8207..4a51968c2 100644 --- a/x/rollapp/types/message_remove_app.go +++ b/x/rollapp/types/message_remove_app.go @@ -1,6 +1,8 @@ package types import ( + "errors" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -53,7 +55,7 @@ func (msg *MsgRemoveApp) GetApp() App { func (msg *MsgRemoveApp) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { - return errorsmod.Wrap(ErrInvalidCreatorAddress, err.Error()) + return errors.Join(ErrInvalidCreatorAddress, err) } if msg.Id == 0 { diff --git a/x/rollapp/types/message_update_app.go b/x/rollapp/types/message_update_app.go index a98d36bbe..0198919fc 100644 --- a/x/rollapp/types/message_update_app.go +++ b/x/rollapp/types/message_update_app.go @@ -1,6 +1,8 @@ package types import ( + "errors" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -58,7 +60,7 @@ func (msg *MsgUpdateApp) GetApp() App { func (msg *MsgUpdateApp) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { - return errorsmod.Wrap(ErrInvalidCreatorAddress, err.Error()) + return errors.Join(ErrInvalidCreatorAddress, err) } if msg.Id == 0 { diff --git a/x/rollapp/types/message_update_rollapp.go b/x/rollapp/types/message_update_rollapp.go index 92c80cf20..8e927cfad 100644 --- a/x/rollapp/types/message_update_rollapp.go +++ b/x/rollapp/types/message_update_rollapp.go @@ -52,7 +52,7 @@ func (msg *MsgUpdateRollappInformation) GetSignBytes() []byte { func (msg *MsgUpdateRollappInformation) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Owner) if err != nil { - return errorsmod.Wrap(ErrInvalidCreatorAddress, err.Error()) + return errors.Join(ErrInvalidCreatorAddress, err) } if msg.InitialSequencer != "" && msg.InitialSequencer != "*" { diff --git a/x/rollapp/types/rollapp.go b/x/rollapp/types/rollapp.go index c720bc288..047d3e1cb 100644 --- a/x/rollapp/types/rollapp.go +++ b/x/rollapp/types/rollapp.go @@ -56,7 +56,7 @@ func (r Rollapp) LastStateUpdateHeightIsSet() bool { func (r Rollapp) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(r.Owner) if err != nil { - return errorsmod.Wrap(ErrInvalidCreatorAddress, err.Error()) + return errors.Join(ErrInvalidCreatorAddress, err) } // validate rollappId @@ -66,7 +66,7 @@ func (r Rollapp) ValidateBasic() error { } if err = validateInitialSequencer(r.InitialSequencer); err != nil { - return errorsmod.Wrap(ErrInvalidInitialSequencer, err.Error()) + return errors.Join(ErrInvalidInitialSequencer, err) } if err = r.GenesisInfo.Validate(); err != nil { diff --git a/x/sequencer/types/msg_create_sequencer.go b/x/sequencer/types/msg_create_sequencer.go index a739a18ad..8448fd84c 100644 --- a/x/sequencer/types/msg_create_sequencer.go +++ b/x/sequencer/types/msg_create_sequencer.go @@ -1,6 +1,8 @@ package types import ( + "errors" + errorsmod "cosmossdk.io/errors" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -97,7 +99,7 @@ func (msg *MsgCreateSequencer) ValidateBasic() error { } if err = msg.Metadata.Validate(); err != nil { - return errorsmod.Wrap(ErrInvalidMetadata, err.Error()) + return errors.Join(ErrInvalidMetadata, err) } if !msg.Bond.IsValid() { diff --git a/x/sequencer/types/msg_update_sequencer.go b/x/sequencer/types/msg_update_sequencer.go index 7e5c2b0f1..a0908c381 100644 --- a/x/sequencer/types/msg_update_sequencer.go +++ b/x/sequencer/types/msg_update_sequencer.go @@ -1,6 +1,8 @@ package types import ( + "errors" + errorsmod "cosmossdk.io/errors" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -42,7 +44,7 @@ func (msg *MsgUpdateSequencerInformation) GetSignBytes() []byte { func (msg *MsgUpdateSequencerInformation) ValidateBasic() error { if err := msg.Metadata.Validate(); err != nil { - return errorsmod.Wrap(ErrInvalidMetadata, err.Error()) + return errors.Join(ErrInvalidMetadata, err) } return nil