Skip to content

Commit

Permalink
fix: Fix bug with cmd query (#112)
Browse files Browse the repository at this point in the history
* change cmd query

* add query server
  • Loading branch information
GNaD13 authored Jan 23, 2024
1 parent 01b2eee commit 67029d4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions x/multi-staking/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,11 @@ func (AppModuleBasic) GetTxCmd() *cobra.Command {
}

// GetQueryCmd returns the multi-staking and staking module's root query command.
func (AppModuleBasic) GetQueryCmd() (queryCmd *cobra.Command) {
queryCmd.AddCommand(
stakingcli.GetQueryCmd(),
cli.GetQueryCmd(),
)
func (AppModuleBasic) GetQueryCmd() *cobra.Command {
cmd := stakingcli.GetQueryCmd()
cmd.AddCommand(cli.GetQueryCmd())

return queryCmd
return cmd
}

// AppModule embeds the Cosmos SDK's x/staking AppModule where we only override
Expand Down Expand Up @@ -138,6 +136,9 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd
func (am AppModule) RegisterServices(cfg module.Configurator) {
stakingtypes.RegisterMsgServer(cfg.MsgServer(), multistakingkeeper.NewMsgServerImpl(am.keeper))
multistakingtypes.RegisterQueryServer(cfg.QueryServer(), multistakingkeeper.NewQueryServerImpl(am.keeper))

querier := stakingkeeper.Querier{Keeper: am.sk}
stakingtypes.RegisterQueryServer(cfg.QueryServer(), querier)
}

// InitGenesis initial genesis state for feeabs module
Expand Down

0 comments on commit 67029d4

Please sign in to comment.