From 08c517b110adc21eecde170f3ca44619f6d77281 Mon Sep 17 00:00:00 2001 From: pinosu <95283998+pinosu@users.noreply.github.com> Date: Thu, 17 Aug 2023 09:41:25 +0200 Subject: [PATCH] Fix label validation error (#1555) --- x/wasm/types/tx.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/wasm/types/tx.go b/x/wasm/types/tx.go index 99fe2c62..0de1e672 100644 --- a/x/wasm/types/tx.go +++ b/x/wasm/types/tx.go @@ -104,7 +104,7 @@ func (msg MsgInstantiateContract) ValidateBasic() error { } if err := ValidateLabel(msg.Label); err != nil { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "label is required") + return errorsmod.Wrap(err, "label") } if !msg.Funds.IsValid() { @@ -365,7 +365,7 @@ func (msg MsgInstantiateContract2) ValidateBasic() error { } if err := ValidateLabel(msg.Label); err != nil { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "label is required") + return errorsmod.Wrap(err, "label") } if !msg.Funds.IsValid() { @@ -584,7 +584,7 @@ func (msg MsgStoreAndInstantiateContract) ValidateBasic() error { } if err := ValidateLabel(msg.Label); err != nil { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "label is required") + return errorsmod.Wrap(err, "label") } if !msg.Funds.IsValid() {