Skip to content

Commit 135d133

Browse files
committed
chore: clean up dead code for legacy REST methods
RegisterRESTRoutes has been removed from the AppModuleBasic interface.
1 parent accf269 commit 135d133

File tree

4 files changed

+2
-22
lines changed

4 files changed

+2
-22
lines changed

golang/cosmos/x/swingset/module.go

-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/json"
66
"fmt"
77

8-
"github.com/gorilla/mux"
98
"github.com/grpc-ecosystem/grpc-gateway/runtime"
109
"github.com/spf13/cobra"
1110

@@ -60,10 +59,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
6059
return ValidateGenesis(&data)
6160
}
6261

63-
// Register rest routes
64-
func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router) {
65-
}
66-
6762
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
6863
_ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx))
6964
}

golang/cosmos/x/vbank/module.go

-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/json"
66
stdlog "log"
77

8-
"github.com/gorilla/mux"
98
"github.com/grpc-ecosystem/grpc-gateway/runtime"
109
"github.com/spf13/cobra"
1110

@@ -60,10 +59,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
6059
return ValidateGenesis(&data)
6160
}
6261

63-
// Register rest routes
64-
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
65-
}
66-
6762
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
6863
_ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx))
6964
}

golang/cosmos/x/vibc/module.go

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package vibc
33
import (
44
"encoding/json"
55

6-
"github.com/gorilla/mux"
76
"github.com/grpc-ecosystem/grpc-gateway/runtime"
87
"github.com/spf13/cobra"
98

@@ -51,10 +50,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
5150
return nil
5251
}
5352

54-
// Register rest routes
55-
func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router) {
56-
}
57-
5853
func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {
5954
}
6055

@@ -70,7 +65,7 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command {
7065

7166
type AppModule struct {
7267
AppModuleBasic
73-
keeper Keeper
68+
keeper Keeper
7469
bankKeeper types.BankKeeper
7570
}
7671

@@ -79,7 +74,7 @@ func NewAppModule(k Keeper, bankKeeper types.BankKeeper) AppModule {
7974
am := AppModule{
8075
AppModuleBasic: AppModuleBasic{},
8176
keeper: k,
82-
bankKeeper: bankKeeper,
77+
bankKeeper: bankKeeper,
8378
}
8479
return am
8580
}

golang/cosmos/x/vstorage/module.go

-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"encoding/json"
66

7-
"github.com/gorilla/mux"
87
"github.com/grpc-ecosystem/grpc-gateway/runtime"
98
"github.com/spf13/cobra"
109

@@ -57,10 +56,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
5756
return ValidateGenesis(&data)
5857
}
5958

60-
// Register rest routes
61-
func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router) {
62-
}
63-
6459
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
6560
_ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx))
6661
}

0 commit comments

Comments
 (0)