Update root command setup to respect home flag #34

Merged
ashwin merged 2 commits from pm-handle-config-resolution into main 2024-07-10 12:32:50 +00:00
Showing only changes of commit d19e833d7f - Show all commits

View File

@ -68,7 +68,7 @@ func NewRootCmd() *cobra.Command {
cmd.SetOut(cmd.OutOrStdout())
cmd.SetErr(cmd.ErrOrStderr())
clientCtx = clientCtx.WithCmdContext(cmd.Context())
clientCtx = clientCtx.WithCmdContext(cmd.Context()).WithViper(EnvPrefix)
clientCtx, err := client.ReadPersistentCommandFlags(clientCtx, cmd.Flags())
if err != nil {
return err
@ -96,10 +96,6 @@ func NewRootCmd() *cobra.Command {
return err
}
if err := client.SetCmdClientContextHandler(clientCtx, cmd); err != nil {
return err
}
// overwrite the minimum gas price from the app configuration
srvCfg := serverconfig.DefaultConfig()
srvCfg.MinGasPrices = "0photon"