From fa84037291701e28a6bc79c443bcd191aa1338be Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 15:11:08 +0200 Subject: [PATCH] fix : removed the unnecessary usage of ErrInvalidMsg (backport #1311) (#1317) * fix : removed the unnecessary usage of ErrInvalidMsg (#1311) * feat:added a new error type * feat:added a new error type * fix: removed unnecessary usage of error type ErrInvalidMsg --------- Co-authored-by: Vishal (cherry picked from commit 4c906d5a53a255c551d6ed981a548cffe47ae9f0) # Conflicts: # x/wasm/types/tx.go * fix conflicts --------- Co-authored-by: vishal-kanna <71565171+vishal-kanna@users.noreply.github.com> Co-authored-by: Pino' Surace --- x/wasm/types/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/wasm/types/tx.go b/x/wasm/types/tx.go index 045f5341e7..2c6f15ae48 100644 --- a/x/wasm/types/tx.go +++ b/x/wasm/types/tx.go @@ -261,7 +261,7 @@ func (msg MsgUpdateAdmin) ValidateBasic() error { return sdkerrors.Wrap(err, "new admin") } if strings.EqualFold(msg.Sender, msg.NewAdmin) { - return sdkerrors.Wrap(ErrInvalidMsg, "new admin is the same as the old") + return sdkerrors.Wrap(ErrInvalid, "new admin is the same as the old") } return nil }