diff --git a/modules/apps/27-interchain-accounts/host/types/keys.go b/modules/apps/27-interchain-accounts/host/types/keys.go index b566a613f55..2dd87805d6d 100644 --- a/modules/apps/27-interchain-accounts/host/types/keys.go +++ b/modules/apps/27-interchain-accounts/host/types/keys.go @@ -1,6 +1,8 @@ package types import ( + "slices" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -25,11 +27,5 @@ func ContainsMsgType(allowMsgs []string, msg sdk.Msg) bool { return true } - for _, v := range allowMsgs { - if v == sdk.MsgTypeURL(msg) { - return true - } - } - - return false + return slices.Contains(allowMsgs, sdk.MsgTypeURL(msg)) }