fix: use the gogoproto merge registry as a file resolver instead of the interface registry (#24330)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
co-authored by
Alex | Interchain Labs
parent
03009a01e0
commit
6555c98d09
@@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* (cli) [#24330](https://github.com/cosmos/cosmos-sdk/pull/24330) Use the gogoproto merge registry as a file resolver instead of the interface registry.
|
||||
|
||||
## [v2.0.0-beta.8] - 2025-01-29
|
||||
|
||||
* [#23544](https://github.com/cosmos/cosmos-sdk/pull/23544) Support map in queries for autocli.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package autocli
|
||||
|
||||
import (
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"github.com/spf13/cobra"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
@@ -61,10 +62,14 @@ type AppOptions struct {
|
||||
// rootCmd := initRootCmd()
|
||||
// err = autoCliOpts.EnhanceRootCommand(rootCmd)
|
||||
func (appOptions AppOptions) EnhanceRootCommand(rootCmd *cobra.Command) error {
|
||||
mergedFiles, err := proto.MergedRegistry()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
builder := &Builder{
|
||||
Builder: flag.Builder{
|
||||
TypeResolver: protoregistry.GlobalTypes,
|
||||
FileResolver: appOptions.ClientCtx.InterfaceRegistry,
|
||||
FileResolver: mergedFiles,
|
||||
AddressCodec: appOptions.AddressCodec,
|
||||
ValidatorAddressCodec: appOptions.ValidatorAddressCodec,
|
||||
ConsensusAddressCodec: appOptions.ConsensusAddressCodec,
|
||||
|
||||
Reference in New Issue
Block a user