Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
make wasm work
Browse files Browse the repository at this point in the history
  • Loading branch information
nghuyenthevinh2000 committed Jan 23, 2022
1 parent 9391ad9 commit 48922d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,12 @@ func New(
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))

// register wasm gov proposal types
enabledProposals := GetEnabledProposals()
if len(enabledProposals) != 0 {
govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.wasmKeeper, enabledProposals))
}

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
Expand Down Expand Up @@ -436,12 +442,6 @@ func New(
supportedFeatures,
wasmOpts...,
)
// register wasm gov proposal types
// problem here because govRouter is sealed, cannot add route handler
enabledProposals := GetEnabledProposals()
if len(enabledProposals) != 0 {
govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.wasmKeeper, enabledProposals))
}

// this line is used by starport scaffolding # stargate/app/keeperDefinition

Expand Down

0 comments on commit 48922d3

Please sign in to comment.