Skip to content

Commit

Permalink
chore: change error message.
Browse files Browse the repository at this point in the history
Signed-off-by: zemyblue <[email protected]>
  • Loading branch information
zemyblue committed May 8, 2024
1 parent 2c147bc commit 0a92b50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/wasm_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 0a92b50

Please sign in to comment.