Skip to content

Commit

Permalink
fix: removed unnecessary usage of error type ErrInvalidMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishal committed Apr 4, 2023
1 parent 78ff5a5 commit 7da4d9c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions x/wasm/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ var (
ErrNoSuchCodeFn = WasmVMFlavouredErrorFactory(errorsmod.Register(DefaultCodespace, 28, "no such code"),
func(id uint64) error { return wasmvmtypes.NoSuchCode{CodeID: id} },
)
// ErrSameAdmin error to show the old admin and new admin are same.
ErrSameAdmin = errorsmod.Register(DefaultCodespace, 29, "new admin is the same as the old")
)

// WasmVMErrorable mapped error type in wasmvm and are not redacted
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/types/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func (msg MsgUpdateAdmin) ValidateBasic() error {
return errorsmod.Wrap(err, "new admin")
}
if strings.EqualFold(msg.Sender, msg.NewAdmin) {
return errorsmod.Wrap(ErrSameAdmin, "new admin is the same as the old")
return errorsmod.Wrap(ErrInvalid, "new admin is the same as the old")
}
return nil
}
Expand Down

0 comments on commit 7da4d9c

Please # to comment.