Skip to content

Commit

Permalink
add bank keeper into custom pfm module
Browse files Browse the repository at this point in the history
  • Loading branch information
RustNinja committed May 22, 2024
1 parent 3b6cacb commit 017fbfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
routerkeeper.DefaultForwardTransferPacketTimeoutTimestamp,
routerkeeper.DefaultRefundTransferPacketTimeoutTimestamp,
appKeepers.TransferMiddlewareKeeper,
&appKeepers.BankKeeper,
)
ratelimitMiddlewareStack := ratelimitmodule.NewIBCMiddleware(appKeepers.RatelimitKeeper, ibcMiddlewareStack)
hooksTransferMiddleware := ibc_hooks.NewIBCMiddleware(ratelimitMiddlewareStack, &appKeepers.HooksICS4Wrapper)
Expand Down
4 changes: 4 additions & 0 deletions custom/custompfm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"
porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
custombankkeeper "github.com/notional-labs/composable/v6/custom/bank/keeper"
ibctransfermiddlewarekeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"
)

Expand All @@ -33,6 +34,7 @@ type IBCMiddleware struct {
retriesOnTimeout1 uint8
forwardTimeout1 time.Duration
refundTimeout1 time.Duration
bank *custombankkeeper.Keeper
}

func NewIBCMiddleware(
Expand All @@ -42,6 +44,7 @@ func NewIBCMiddleware(
forwardTimeout time.Duration,
refundTimeout time.Duration,
ibcfeekeeper ibctransfermiddlewarekeeper.Keeper,
bankkeeper *custombankkeeper.Keeper,
) IBCMiddleware {
return IBCMiddleware{
IBCMiddleware: router.NewIBCMiddleware(app, k, retriesOnTimeout, forwardTimeout, refundTimeout),
Expand All @@ -53,6 +56,7 @@ func NewIBCMiddleware(
retriesOnTimeout1: retriesOnTimeout,
forwardTimeout1: forwardTimeout,
refundTimeout1: refundTimeout,
bank: bankkeeper,
}
}

Expand Down

0 comments on commit 017fbfa

Please sign in to comment.