diff --git a/x/machine/types/message_update_params.go b/x/machine/types/message_update_params.go index 9a4e800..d0b4b55 100644 --- a/x/machine/types/message_update_params.go +++ b/x/machine/types/message_update_params.go @@ -1,6 +1,7 @@ package types import ( + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -40,7 +41,7 @@ func (msg *MsgUpdateParams) GetSignBytes() []byte { func (msg *MsgUpdateParams) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Authority) if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid authority address (%s)", err) + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid authority address (%s)", err) } return nil } diff --git a/x/machine/types/message_update_params_test.go b/x/machine/types/message_update_params_test.go index 061631a..49dc88a 100644 --- a/x/machine/types/message_update_params_test.go +++ b/x/machine/types/message_update_params_test.go @@ -4,11 +4,11 @@ import ( "testing" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/planetmint/planetmint-go/testutil/sample" "github.com/stretchr/testify/require" ) func TestMsgUpdateParams_ValidateBasic(t *testing.T) { + t.Parallel() tests := []struct { name string msg MsgUpdateParams @@ -20,15 +20,12 @@ func TestMsgUpdateParams_ValidateBasic(t *testing.T) { Authority: "invalid_address", }, err: sdkerrors.ErrInvalidAddress, - }, { - name: "valid address", - msg: MsgUpdateParams{ - Authority: sample.AccAddress(), - }, }, } for _, tt := range tests { + tt := tt t.Run(tt.name, func(t *testing.T) { + t.Parallel() err := tt.msg.ValidateBasic() if tt.err != nil { require.ErrorIs(t, err, tt.err)