Skip to content

Commit

Permalink
imp(ica/host): improved the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
srdtrk committed May 23, 2023
1 parent 61fee14 commit 2eb440c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/apps/27-interchain-accounts/host/types/msgs.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
package types

import sdk "github.com/cosmos/cosmos-sdk/types"
import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"

ibcerrors "github.com/cosmos/ibc-go/v7/modules/core/errors"
)

var _ sdk.Msg = (*MsgUpdateParams)(nil)

// ValidateBasic implements sdk.Msg
func (msg MsgUpdateParams) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(msg.Authority)
if err != nil {
return err
return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err)
}

return msg.Params.Validate()
Expand Down

0 comments on commit 2eb440c

Please sign in to comment.