From 49e6f2b85cead43191f64c8094bc9e0ac5558779 Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Tue, 10 Oct 2023 14:24:43 +0200 Subject: [PATCH] chore: remove unnecessary legacy handler from qgb module (#2635) ## Overview ## Checklist - [ ] New and updated code has appropriate documentation - [ ] New and updated code has new and/or updated testing - [ ] Required CI checks are passing - [ ] Visual proof for any user facing features like CLI or documentation updates - [ ] Linked issues closed with keywords (cherry picked from commit 3914153fc3523da062f76e35e606023e62f54412) --- 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.