From c4b80d0af08cfdf235360cae94ad39f02ef81574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=E1=BA=B7c?= Date: Tue, 12 Sep 2023 15:52:20 +0700 Subject: [PATCH] add pfm to ibc stack --- app/app.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/app.go b/app/app.go index bf747994..ffa1c46d 100644 --- a/app/app.go +++ b/app/app.go @@ -534,7 +534,8 @@ func NewMigalooApp( keys[ibchookstypes.StoreKey], ) app.IBCHooksKeeper = &hooksKeeper - wasmHooks := ibchooks.NewWasmHooks(&hooksKeeper, nil, "whale") // The contract keeper needs to be set later + migalooPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() + wasmHooks := ibchooks.NewWasmHooks(&hooksKeeper, nil, migalooPrefix) // The contract keeper needs to be set later app.Ics20WasmHooks = &wasmHooks app.HooksICS4Wrapper = ibchooks.NewICS4Middleware( app.IBCKeeper.ChannelKeeper, @@ -632,7 +633,13 @@ func NewMigalooApp( var transferStack porttypes.IBCModule transferStack = transfer.NewIBCModule(app.TransferKeeper) transferStack = ibcfee.NewIBCMiddleware(transferStack, app.IBCFeeKeeper) - + transferStack = router.NewIBCMiddleware( + transferStack, + &app.RouterKeeper, + 0, + routerkeeper.DefaultForwardTransferPacketTimeoutTimestamp, + routerkeeper.DefaultRefundTransferPacketTimeoutTimestamp, + ) // Hooks Middleware hooksTransferStack := ibchooks.NewIBCMiddleware(transferStack, &app.HooksICS4Wrapper) app.TransferStack = &hooksTransferStack