Skip to content

Commit

Permalink
Preparation for WASM ignite/cli#3956
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulBernal committed Feb 9, 2024
1 parent 954bcb7 commit 4a73bad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@ func New(

app.App = appBuilder.Build(db, traceStore, baseAppOptions...)

// Register legacy modules
app.registerIBCModules()
// Register legacy modules: https://github.com/ignite/cli/pull/3956
if err := app.registerIBCModules(appOpts); err != nil {
return nil, err
}

// register streaming services
if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil {
Expand Down
9 changes: 6 additions & 3 deletions app/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"cosmossdk.io/core/appmodule"
storetypes "cosmossdk.io/store/types"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
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"
Expand Down Expand Up @@ -37,7 +38,7 @@ import (
)

// registerIBCModules register IBC keepers and non dependency inject modules.
func (app *App) registerIBCModules() {
func (app *App) registerIBCModules(_ servertypes.AppOptions) error {
// set up non depinject support modules store keys
if err := app.RegisterStores(
storetypes.NewKVStoreKey(capabilitytypes.StoreKey),
Expand All @@ -49,7 +50,7 @@ func (app *App) registerIBCModules() {
storetypes.NewMemoryStoreKey(capabilitytypes.MemStoreKey),
storetypes.NewTransientStoreKey(paramstypes.TStoreKey),
); err != nil {
panic(err)
return err
}

// register the key tables for legacy param subspaces
Expand Down Expand Up @@ -175,8 +176,10 @@ func (app *App) registerIBCModules() {
ibctm.AppModule{},
solomachine.AppModule{},
); err != nil {
panic(err)
return err
}

return nil
}

// Since the IBC modules don't support dependency injection, we need to
Expand Down

0 comments on commit 4a73bad

Please sign in to comment.