This repository was archived by the owner on Jan 6, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import (
1616
1717 "github.com/cosmos/cosmos-sdk/baseapp"
1818 "github.com/cosmos/cosmos-sdk/client"
19+ "github.com/cosmos/cosmos-sdk/client/config"
1920 "github.com/cosmos/cosmos-sdk/client/debug"
2021 "github.com/cosmos/cosmos-sdk/client/flags"
2122 "github.com/cosmos/cosmos-sdk/client/keys"
@@ -131,12 +132,18 @@ func NewRootCmd(
131132 WithInput (os .Stdin ).
132133 WithAccountRetriever (types.AccountRetriever {}).
133134 WithBroadcastMode (flags .BroadcastBlock ).
134- WithHomeDir (defaultNodeHome )
135+ WithHomeDir (defaultNodeHome ).
136+ WithViper ("" )
135137
136138 rootCmd := & cobra.Command {
137139 Use : appName + "d" ,
138140 Short : "Stargate CosmosHub App" ,
139141 PersistentPreRunE : func (cmd * cobra.Command , _ []string ) error {
142+ initClientCtx , err := config .ReadFromClientConfig (initClientCtx )
143+ if err != nil {
144+ return err
145+ }
146+
140147 if err := client .SetCmdClientContextHandler (initClientCtx , cmd ); err != nil {
141148 return err
142149 }
@@ -185,6 +192,7 @@ func initRootCmd(
185192 AddGenesisAccountCmd (defaultNodeHome ),
186193 tmcli .NewCompletionCmd (rootCmd , true ),
187194 debug .Cmd (),
195+ config .Cmd (),
188196 )
189197
190198 a := appCreator {
You can’t perform that action at this time.
0 commit comments