Skip to content

Commit

Permalink
cl & deps++ (cosmos#6582)
Browse files Browse the repository at this point in the history
* cl & deps++

* Use PersistentPreRunE

* revert x/bank/client/cli/tx.go

* move to root level

* Use block mode by default

* Skip x/auth CLI tests
  • Loading branch information
alexanderbez authored Jul 2, 2020
1 parent a84c1b5 commit 2e38043
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions cmd/simcli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ var (
WithTxGenerator(encodingConfig.TxGenerator).
WithCodec(encodingConfig.Amino).
WithInput(os.Stdin).
WithAccountRetriever(types.NewAccountRetriever(encodingConfig.Marshaler))
WithAccountRetriever(types.NewAccountRetriever(encodingConfig.Marshaler)).
WithBroadcastMode(flags.BroadcastBlock)
)

func init() {
Expand All @@ -50,6 +51,9 @@ func main() {
rootCmd := &cobra.Command{
Use: "simcli",
Short: "Command line interface for interacting with simapp",
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
return client.SetCmdClientContextHandler(initClientCtx, cmd)
},
}

rootCmd.PersistentFlags().String(flags.FlagChainID, "", "network chain ID")
Expand Down Expand Up @@ -84,10 +88,7 @@ func queryCmd() *cobra.Command {
Short: "Querying subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
PreRunE: func(cmd *cobra.Command, _ []string) error {
return client.SetCmdClientContextHandler(initClientCtx, cmd)
},
RunE: client.ValidateCmd,
RunE: client.ValidateCmd,
}

queryCmd.AddCommand(
Expand All @@ -111,10 +112,7 @@ func txCmd() *cobra.Command {
Short: "Transactions subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
PreRunE: func(cmd *cobra.Command, _ []string) error {
return client.SetCmdClientContextHandler(initClientCtx, cmd)
},
RunE: client.ValidateCmd,
RunE: client.ValidateCmd,
}

txCmd.AddCommand(
Expand Down

0 comments on commit 2e38043

Please sign in to comment.