Fix label validation error (#1555)

This commit is contained in:
pinosu
2023-08-17 09:41:25 +02:00
committed by GitHub
parent 33df4aeaaa
commit 08c517b110

View File

@@ -104,7 +104,7 @@ func (msg MsgInstantiateContract) ValidateBasic() error {
} }
if err := ValidateLabel(msg.Label); err != nil { if err := ValidateLabel(msg.Label); err != nil {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "label is required") return errorsmod.Wrap(err, "label")
} }
if !msg.Funds.IsValid() { if !msg.Funds.IsValid() {
@@ -365,7 +365,7 @@ func (msg MsgInstantiateContract2) ValidateBasic() error {
} }
if err := ValidateLabel(msg.Label); err != nil { if err := ValidateLabel(msg.Label); err != nil {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "label is required") return errorsmod.Wrap(err, "label")
} }
if !msg.Funds.IsValid() { if !msg.Funds.IsValid() {
@@ -584,7 +584,7 @@ func (msg MsgStoreAndInstantiateContract) ValidateBasic() error {
} }
if err := ValidateLabel(msg.Label); err != nil { if err := ValidateLabel(msg.Label); err != nil {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "label is required") return errorsmod.Wrap(err, "label")
} }
if !msg.Funds.IsValid() { if !msg.Funds.IsValid() {