@@ -350,8 +350,7 @@ func NewAppKeeper(
350
350
appCodec ,
351
351
appKeepers .keys [icahosttypes .StoreKey ],
352
352
appKeepers .GetSubspace (icahosttypes .SubModuleName ),
353
- // TODO: Pass FeeKeeper as ics4Wrapper if enabled
354
- nil ,
353
+ appKeepers .IBCKeeper .ChannelKeeper , // ICS4Wrapper
355
354
appKeepers .IBCKeeper .ChannelKeeper ,
356
355
& appKeepers .IBCKeeper .PortKeeper ,
357
356
appKeepers .AccountKeeper ,
@@ -386,12 +385,9 @@ func NewAppKeeper(
386
385
// Must be called on PFMRouter AFTER TransferKeeper initialized
387
386
appKeepers .PFMRouterKeeper .SetTransferKeeper (appKeepers .TransferKeeper )
388
387
389
- // Create IBC Router
390
- ibcRouter := porttypes .NewRouter ()
391
-
392
388
// Middleware Stacks
393
- appKeepers .TransferModule = transfer .NewAppModule (appKeepers .TransferKeeper )
394
389
appKeepers .ICAModule = ica .NewAppModule (nil , & appKeepers .ICAHostKeeper )
390
+ appKeepers .TransferModule = transfer .NewAppModule (appKeepers .TransferKeeper )
395
391
appKeepers .PFMRouterModule = pfmrouter .NewAppModule (appKeepers .PFMRouterKeeper , appKeepers .GetSubspace (pfmroutertypes .ModuleName ))
396
392
397
393
// create IBC module from bottom to top of stack
@@ -406,17 +402,16 @@ func NewAppKeeper(
406
402
)
407
403
408
404
// Add transfer stack to IBC Router
409
- ibcRouter .AddRoute (ibctransfertypes .ModuleName , transferStack )
410
405
411
406
// Create Interchain Accounts Stack
412
407
var icaHostStack porttypes.IBCModule = icahost .NewIBCModule (appKeepers .ICAHostKeeper )
413
408
414
- // create static IBC router, add transfer route, then set and seal it
415
- ibcRouter .
409
+ // Create IBC Router & seal
410
+ ibcRouter := porttypes . NewRouter () .
416
411
AddRoute (icahosttypes .SubModuleName , icaHostStack ).
412
+ AddRoute (ibctransfertypes .ModuleName , transferStack ).
417
413
AddRoute (providertypes .ModuleName , appKeepers .ProviderModule )
418
414
419
- // Seal the IBC Router
420
415
appKeepers .IBCKeeper .SetRouter (ibcRouter )
421
416
422
417
return appKeepers
0 commit comments