feat(client/v2): add keyring flags in query commands (backport #22443) (#22444)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot] 2024-11-06 16:20:11 +01:00 committed by GitHub
parent 3021efde01
commit e018ac1c1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -48,6 +48,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.
### API Breaking Changes

View File

@ -65,8 +65,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)