From 5f4dfc0b2470022a07c1b187f6311bfeeab07be4 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 1 Mar 2024 12:44:35 +0100 Subject: [PATCH] fix(templates): fix interface check for ibc modules (#3995) Closes: https://github.com/ignite/cli/issues/3994 --- changelog.md | 1 + ignite/templates/app/files/app/ibc.go.plush | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 628a3e64a2..55a9ff8c28 100644 --- a/changelog.md +++ b/changelog.md @@ -18,6 +18,7 @@ ### Fixes +- [#3995](https://github.com/ignite/cli/pull/3995) Fix interface check for ibc modules - [#3953](https://github.com/ignite/cli/pull/3953) Fix apps `Stdout` is redirected to `Stderr` - [#3863](https://github.com/ignite/cli/pull/3963) Fix breaking issue for app client API when reading app chain info - [#3969](https://github.com/ignite/cli/pull/3969) Get first config validator using a getter to avoid index errors diff --git a/ignite/templates/app/files/app/ibc.go.plush b/ignite/templates/app/files/app/ibc.go.plush index 472a6c3870..cd3e156664 100644 --- a/ignite/templates/app/files/app/ibc.go.plush +++ b/ignite/templates/app/files/app/ibc.go.plush @@ -4,6 +4,7 @@ import ( "cosmossdk.io/core/appmodule" storetypes "cosmossdk.io/store/types" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -196,12 +197,8 @@ func RegisterIBC(registry cdctypes.InterfaceRegistry) map[string]appmodule.AppMo solomachine.ModuleName: solomachine.AppModule{}, } - for _, module := range modules { - if mod, ok := module.(interface { - RegisterInterfaces(registry cdctypes.InterfaceRegistry) - }); ok { - mod.RegisterInterfaces(registry) - } + for name, m := range modules { + module.CoreAppModuleBasicAdaptor(name, m).RegisterInterfaces(registry) } return modules