From 0a92b50064d15fa09648047dfbf7a895c2deb857 Mon Sep 17 00:00:00 2001 From: zemyblue Date: Wed, 8 May 2024 13:22:13 +0900 Subject: [PATCH] chore: change error message. Signed-off-by: zemyblue --- app/wasm_filter.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/wasm_filter.go b/app/wasm_filter.go index 82c5b292..4adab0c4 100644 --- a/app/wasm_filter.go +++ b/app/wasm_filter.go @@ -20,12 +20,12 @@ func filteredStargateMsgEncoders(cdc codec.Codec) *wasmkeeper.MessageEncoders { func wasmFilteredEncodeStargateMsg(unpakcer codectypes.AnyUnpacker) wasmkeeper.StargateEncoder { // deny list in StargateMsg of wasm - deniedModulesInStargateMsg := []string{"/lbm.fswap.v1", "/lbm.fbridge.v1"} + deniedMsgInStargateMsg := []string{"/lbm.fswap.v1", "/lbm.fbridge.v1"} stargateMsgEncoder := wasmkeeper.EncodeStargateMsg(unpakcer) return func(sender sdk.AccAddress, msg *wasmvmtypes.StargateMsg) ([]sdk.Msg, error) { - for _, moduleName := range deniedModulesInStargateMsg { - if strings.HasPrefix(msg.TypeURL, moduleName) { - return nil, sdkerrors.Wrap(wasmtypes.ErrUnsupportedForContract, moduleName+" not supported by Stargate") + for _, msgName := range deniedMsgInStargateMsg { + if strings.HasPrefix(msg.TypeURL, msgName) { + return nil, sdkerrors.Wrapf(wasmtypes.ErrUnsupportedForContract, "messages of the type in %s are not supported by Stargate", msgName) } }