Skip to content

Commit

Permalink
register grpc gateway routes
Browse files Browse the repository at this point in the history
  • Loading branch information
neitdung committed Feb 22, 2024
1 parent 31a762b commit 8afdb04
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion x/multi-staking/module.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package multistaking

import (
"context"
"encoding/json"
"fmt"

Expand Down Expand Up @@ -64,7 +65,11 @@ func (am AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEn
}

// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the staking module.
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) {}
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) {
if err := multistakingtypes.RegisterQueryHandlerClient(context.Background(), mux, multistakingtypes.NewQueryClient(clientCtx)); err != nil {
panic(err)
}
}

// GetTxCmd returns the staking module's root tx command.
func (AppModuleBasic) GetTxCmd() *cobra.Command {
Expand Down

0 comments on commit 8afdb04

Please sign in to comment.