Skip to content

Commit

Permalink
feat(client/v2): add keyring flags in query commands (backport cosmos…
Browse files Browse the repository at this point in the history
…#22443) (cosmos#22445)

Co-authored-by: Julien Robert <[email protected]>
  • Loading branch information
mergify[bot] and julienrbrt authored Nov 6, 2024
1 parent 6be4b79 commit 3b72e77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/v2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Improvements

* [#22443](https://github.com/cosmos/cosmos-sdk/pull/22443) Add keyring flags in query commands.
* [#21936](https://github.com/cosmos/cosmos-sdk/pull/21936) Print possible enum values in error message after an invalid input was provided.

### Bug Fixes
Expand Down
7 changes: 5 additions & 2 deletions client/v2/autocli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ func (appOptions AppOptions) EnhanceRootCommand(rootCmd *cobra.Command) error {
GetClientConn: func(cmd *cobra.Command) (grpc.ClientConnInterface, error) {
return client.GetClientQueryContext(cmd)
},
AddQueryConnFlags: sdkflags.AddQueryFlagsToCmd,
AddTxConnFlags: sdkflags.AddTxFlagsToCmd,
AddQueryConnFlags: func(c *cobra.Command) {
sdkflags.AddQueryFlagsToCmd(c)
sdkflags.AddKeyringFlags(c.Flags())
},
AddTxConnFlags: sdkflags.AddTxFlagsToCmd,
}

return appOptions.EnhanceRootCommandWithBuilder(rootCmd, builder)
Expand Down

0 comments on commit 3b72e77

Please sign in to comment.