Skip to content

Commit 04b4011

Browse files

File tree

5 files changed

+3
-25
lines changed

5 files changed

+3
-25
lines changed

app/consumer-democracy/app.go

+1-5
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"
@@ -575,7 +574,6 @@ func New(
575574
)
576575

577576
app.MM.RegisterInvariants(&app.CrisisKeeper)
578-
app.MM.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
579577

580578
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
581579
app.MM.RegisterServices(app.configurator)
@@ -873,14 +871,12 @@ func (app *App) GetTxConfig() client.TxConfig {
873871
// API server.
874872
func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
875873
clientCtx := apiSvr.ClientCtx
876-
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
877874
// Register new tx routes from grpc-gateway.
878875
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
879876
// Register new tendermint queries routes from grpc-gateway.
880877
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
881878

882-
// Register legacy and grpc-gateway routes for all modules.
883-
ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
879+
// Register grpc-gateway routes for all modules.
884880
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
885881

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

app/consumer/app.go

+1-5
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"
@@ -461,7 +460,6 @@ func New(
461460
)
462461

463462
app.MM.RegisterInvariants(&app.CrisisKeeper)
464-
app.MM.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
465463

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

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

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

app/provider/app.go

+1-5
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"
@@ -565,7 +564,6 @@ func New(
565564
)
566565

567566
app.MM.RegisterInvariants(&app.CrisisKeeper)
568-
app.MM.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
569567

570568
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
571569
app.MM.RegisterServices(app.configurator)
@@ -811,14 +809,12 @@ func (app *App) GetTxConfig() client.TxConfig {
811809
// API server.
812810
func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
813811
clientCtx := apiSvr.ClientCtx
814-
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
815812
// Register new tx routes from grpc-gateway.
816813
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
817814
// Register new tendermint queries routes from grpc-gateway.
818815
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
819816

820-
// Register legacy and grpc-gateway routes for all modules.
821-
ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
817+
// Register grpc-gateway routes for all modules.
822818
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
823819

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

x/ccv/consumer/module.go

-5
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

-5
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)