Skip to content

Commit

Permalink
fix: add hack to handle group v2 messages in baseapp
Browse files Browse the repository at this point in the history
  • Loading branch information
daeMOn63 committed Nov 12, 2021
1 parent 378a1bb commit 5467a1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,14 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (*s
return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized message service method: %s; message index: %d", msgFqName, i)
}
msgResult, err = handler(ctx, svcMsg.Request)
} else if strings.Contains(msg.Type(), "fetchai.group.v1alpha1.Msg") {
// TODO: remove once cosmos-sdk is upgraded to v0.44
msgRoute := strings.Replace(msg.Type(), "fetchai.group.v1alpha1.Msg", "fetchai.group.v1alpha1.Msg/", 1)
handler := app.msgServiceRouter.Handler(msgRoute)
if handler == nil {
return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized message route: %s; message index: %d", msgRoute, i)
}
msgResult, err = handler(ctx, msg)
} else {
// legacy sdk.Msg routing
msgRoute := msg.Route()
Expand Down

0 comments on commit 5467a1e

Please sign in to comment.