Skip to content

Commit 08c517b

Browse files
authored
Fix label validation error (#1555)
1 parent 33df4ae commit 08c517b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

x/wasm/types/tx.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (msg MsgInstantiateContract) ValidateBasic() error {
104104
}
105105

106106
if err := ValidateLabel(msg.Label); err != nil {
107-
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "label is required")
107+
return errorsmod.Wrap(err, "label")
108108
}
109109

110110
if !msg.Funds.IsValid() {
@@ -365,7 +365,7 @@ func (msg MsgInstantiateContract2) ValidateBasic() error {
365365
}
366366

367367
if err := ValidateLabel(msg.Label); err != nil {
368-
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "label is required")
368+
return errorsmod.Wrap(err, "label")
369369
}
370370

371371
if !msg.Funds.IsValid() {
@@ -584,7 +584,7 @@ func (msg MsgStoreAndInstantiateContract) ValidateBasic() error {
584584
}
585585

586586
if err := ValidateLabel(msg.Label); err != nil {
587-
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "label is required")
587+
return errorsmod.Wrap(err, "label")
588588
}
589589

590590
if !msg.Funds.IsValid() {

0 commit comments

Comments
 (0)