Skip to content

Commit 27b4776

Browse files

File tree

5 files changed

+3
-25
lines changed

5 files changed

+3
-25
lines changed

app/consumer-democracy/app.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"github.com/cosmos/cosmos-sdk/baseapp"
1616
"github.com/cosmos/cosmos-sdk/client"
1717
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
18-
"github.com/cosmos/cosmos-sdk/client/rpc"
1918
"github.com/cosmos/cosmos-sdk/codec"
2019
"github.com/cosmos/cosmos-sdk/codec/types"
2120
"github.com/cosmos/cosmos-sdk/server/api"
@@ -574,7 +573,6 @@ func New(
574573
)
575574

576575
app.MM.RegisterInvariants(&app.CrisisKeeper)
577-
app.MM.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
578576

579577
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
580578
app.MM.RegisterServices(app.configurator)
@@ -878,14 +876,12 @@ func (app *App) GetTxConfig() client.TxConfig {
878876
// API server.
879877
func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
880878
clientCtx := apiSvr.ClientCtx
881-
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
882879
// Register new tx routes from grpc-gateway.
883880
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
884881
// Register new tendermint queries routes from grpc-gateway.
885882
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
886883

887-
// Register legacy and grpc-gateway routes for all modules.
888-
ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
884+
// Register grpc-gateway routes for all modules.
889885
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
890886

891887
// register swagger API from root so that other applications can override easily

app/consumer/app.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/cosmos/cosmos-sdk/baseapp"
1818
"github.com/cosmos/cosmos-sdk/client"
1919
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
20-
"github.com/cosmos/cosmos-sdk/client/rpc"
2120
"github.com/cosmos/cosmos-sdk/codec"
2221
"github.com/cosmos/cosmos-sdk/codec/types"
2322
"github.com/cosmos/cosmos-sdk/server/api"
@@ -460,7 +459,6 @@ func New(
460459
)
461460

462461
app.MM.RegisterInvariants(&app.CrisisKeeper)
463-
app.MM.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
464462

465463
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
466464
app.MM.RegisterServices(app.configurator)
@@ -703,14 +701,12 @@ func (app *App) GetTxConfig() client.TxConfig {
703701
// API server.
704702
func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
705703
clientCtx := apiSvr.ClientCtx
706-
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
707704
// Register new tx routes from grpc-gateway.
708705
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
709706
// Register new tendermint queries routes from grpc-gateway.
710707
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
711708

712-
// Register legacy and grpc-gateway routes for all modules.
713-
ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
709+
// Register grpc-gateway routes for all modules.
714710
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
715711

716712
// register swagger API from root so that other applications can override easily

app/provider/app.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"github.com/cosmos/cosmos-sdk/baseapp"
1515
"github.com/cosmos/cosmos-sdk/client"
1616
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
17-
"github.com/cosmos/cosmos-sdk/client/rpc"
1817
"github.com/cosmos/cosmos-sdk/codec"
1918
"github.com/cosmos/cosmos-sdk/codec/types"
2019
"github.com/cosmos/cosmos-sdk/server/api"
@@ -563,7 +562,6 @@ func New(
563562
)
564563

565564
app.MM.RegisterInvariants(&app.CrisisKeeper)
566-
app.MM.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
567565

568566
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
569567
app.MM.RegisterServices(app.configurator)
@@ -809,14 +807,12 @@ func (app *App) GetTxConfig() client.TxConfig {
809807
// API server.
810808
func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
811809
clientCtx := apiSvr.ClientCtx
812-
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
813810
// Register new tx routes from grpc-gateway.
814811
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
815812
// Register new tendermint queries routes from grpc-gateway.
816813
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
817814

818-
// Register legacy and grpc-gateway routes for all modules.
819-
ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
815+
// Register grpc-gateway routes for all modules.
820816
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
821817

822818
// register swagger API from root so that other applications can override easily

x/ccv/consumer/module.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"fmt"
77

88
abci "github.com/cometbft/cometbft/abci/types"
9-
"github.com/gorilla/mux"
109
"github.com/grpc-ecosystem/grpc-gateway/runtime"
1110
"github.com/spf13/cobra"
1211

@@ -64,10 +63,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
6463
return data.Validate()
6564
}
6665

67-
// RegisterRESTRoutes implements AppModuleBasic interface
68-
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
69-
}
70-
7166
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc-consumer module.
7267
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
7368
err := consumertypes.RegisterQueryHandlerClient(context.Background(), mux, consumertypes.NewQueryClient(clientCtx))

x/ccv/provider/module.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/cosmos/interchain-security/x/ccv/provider/client/cli"
1717
"github.com/cosmos/interchain-security/x/ccv/provider/keeper"
1818
providertypes "github.com/cosmos/interchain-security/x/ccv/provider/types"
19-
"github.com/gorilla/mux"
2019
"github.com/grpc-ecosystem/grpc-gateway/runtime"
2120
"github.com/spf13/cobra"
2221
)
@@ -61,10 +60,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
6160
return data.Validate()
6261
}
6362

64-
// RegisterRESTRoutes implements AppModuleBasic interface
65-
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
66-
}
67-
6863
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc-provider module.
6964
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
7065
err := providertypes.RegisterQueryHandlerClient(context.Background(), mux, providertypes.NewQueryClient(clientCtx))

0 commit comments

Comments
 (0)