From f03abf68318acd74d04dc4dddaf6b47e0719761c Mon Sep 17 00:00:00 2001 From: Pino' Surace Date: Mon, 14 Aug 2023 15:47:25 +0200 Subject: [PATCH] Fix label validation error --- 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 99fe2c62f7..0de1e672ec 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() {