Skip to content

Commit

Permalink
init map
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir-code committed Aug 14, 2024
1 parent c2c93f7 commit fbf3797
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions simapp/simd/cmd/root_di.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package cmd
import (
"os"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
"github.com/spf13/cobra"

Expand Down Expand Up @@ -85,6 +86,7 @@ func NewRootCmd() *cobra.Command {
initRootCmd(rootCmd, moduleManager)

nodeCmds := nodeservice.NewNodeCommands()
autoCliOpts.ModuleOptions = make(map[string]*autocliv1.ModuleOptions)
autoCliOpts.ModuleOptions[nodeCmds.Name()] = nodeCmds.AutoCLIOptions()

if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil {
Expand Down
2 changes: 2 additions & 0 deletions simapp/v2/simdv2/cmd/root_di.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"os"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
"github.com/spf13/cobra"

"cosmossdk.io/client/v2/autocli"
Expand Down Expand Up @@ -84,6 +85,7 @@ func NewRootCmd[T transaction.Tx]() *cobra.Command {
initRootCmd[T](rootCmd, clientCtx.TxConfig, moduleManager)

nodeCmds := nodeservice.NewNodeCommands()
autoCliOpts.ModuleOptions = make(map[string]*autocliv1.ModuleOptions)
autoCliOpts.ModuleOptions[nodeCmds.Name()] = nodeCmds.AutoCLIOptions()

if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil {
Expand Down

0 comments on commit fbf3797

Please sign in to comment.