fix(client/v2): correctly handle enhanced sub commands (backport #21809) (#21930)

Co-authored-by: John Letey <john@noble.xyz>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2024-09-26 15:28:07 +02:00
committed by GitHub
co-authored by John Letey Julien Robert
parent bcd31a16ab
commit 412f4e719e
3 changed files with 10 additions and 2 deletions
+4
View File
@@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]
### Bug Fixes
* [#21809](https://github.com/cosmos/cosmos-sdk/pull/21809) Correctly handle enhanced sub commands.
## [v2.0.0-beta.5] - 2024-09-18
### Improvements
+3 -1
View File
@@ -49,7 +49,9 @@ func (b *Builder) AddMsgServiceCommands(cmd *cobra.Command, cmdDescriptor *autoc
return err
}
cmd.AddCommand(subCmd)
if !subCmdDescriptor.EnhanceCustomCommand {
cmd.AddCommand(subCmd)
}
}
if cmdDescriptor.Service == "" {
+3 -1
View File
@@ -52,7 +52,9 @@ func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *aut
return err
}
cmd.AddCommand(subCmd)
if !subCmdDesc.EnhanceCustomCommand {
cmd.AddCommand(subCmd)
}
}
// skip empty command descriptors