From 21c45aa9d1af5aa8cd7d51352f71398b4512b223 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 15:27:40 +0000 Subject: [PATCH] chore: remove unnecessary legacy handler from qgb module (backport #2635) (#2647) This is an automatic backport of pull request #2635 done by [Mergify](https://mergify.com). ---
Mergify commands and options
More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport ` will backport this PR on `` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com
Co-authored-by: CHAMI Rachid --- x/qgb/handler.go | 24 ------------------------ x/qgb/module.go | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 x/qgb/handler.go diff --git a/x/qgb/handler.go b/x/qgb/handler.go deleted file mode 100644 index 3ea398b4fd..0000000000 --- a/x/qgb/handler.go +++ /dev/null @@ -1,24 +0,0 @@ -package qgb - -import ( - "fmt" - - "cosmossdk.io/errors" - "github.com/celestiaorg/celestia-app/x/qgb/keeper" - "github.com/celestiaorg/celestia-app/x/qgb/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -// Can be deleted after implementing the Orchestrator and Relayer as per QGB -// ADR-005. NewHandler uses the provided qgb keeper to create an sdk.Handler. -func NewHandler(_ keeper.Keeper) sdk.Handler { - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - _ = ctx.WithEventManager(sdk.NewEventManager()) - switch msg := msg.(type) { - default: - errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg) - return nil, errors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - } - } -} diff --git a/x/qgb/module.go b/x/qgb/module.go index 877d12af9b..8d2035d13e 100644 --- a/x/qgb/module.go +++ b/x/qgb/module.go @@ -114,7 +114,7 @@ func (am AppModule) Name() string { // Route returns the capability module's message routing key. func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) + return sdk.Route{} } // QuerierRoute returns the capability module's query routing key.