Skip to content

Commit

Permalink
export inject field
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-zq committed Jul 26, 2024
1 parent 5ebf9ca commit f246f2c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
17 changes: 8 additions & 9 deletions modules/tibc/apps/mt_transfer/depinject.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ type Inputs struct {
Cdc codec.Codec
Key *store.KVStoreKey

ak types.AccountKeeper
mk types.MtKeeper
pk types.PacketKeeper
ck types.ClientKeeper
AccountKeeper types.AccountKeeper
MtKeeper types.MtKeeper
PacketKeeper types.PacketKeeper
ClientKeeper types.ClientKeeper
}

// Outputs define the module outputs for the depinject.
Expand All @@ -49,7 +49,6 @@ type Outputs struct {
Module appmodule.AppModule
}


// ProvideModule creates and returns the farm module with the specified inputs.
//
// It takes Inputs as the parameter, which includes the configuration, codec, key, account keeper, bank keeper, governance keeper, coinswap keeper, and legacy subspace.
Expand All @@ -58,10 +57,10 @@ func ProvideModule(in Inputs) Outputs {
keeper := keeper.NewKeeper(
in.Cdc,
in.Key,
in.ak,
in.mk,
in.pk,
in.ck,
in.AccountKeeper,
in.MtKeeper,
in.PacketKeeper,
in.ClientKeeper,
)
return Outputs{
MtTransferKeeper: keeper,
Expand Down
21 changes: 10 additions & 11 deletions modules/tibc/apps/nft_transfer/depinject.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,20 @@ type Inputs struct {
Cdc codec.Codec
Key *store.KVStoreKey

ak types.AccountKeeper
mk types.NftKeeper
pk types.PacketKeeper
ck types.ClientKeeper
AccountKeeper types.AccountKeeper
NftKeeper types.NftKeeper
PacketKeeper types.PacketKeeper
ClientKeeper types.ClientKeeper
}

// Outputs define the module outputs for the depinject.
type Outputs struct {
depinject.Out

NftTransferKeeper keeper.Keeper
Module appmodule.AppModule
Module appmodule.AppModule
}


// ProvideModule creates and returns the module outputs for the depinject.
//
// It takes Inputs as the parameter, which includes the configuration, codec, key, account keeper, NFT keeper, packet keeper, and client keeper.
Expand All @@ -58,13 +57,13 @@ func ProvideModule(in Inputs) Outputs {
keeper := keeper.NewKeeper(
in.Cdc,
in.Key,
in.ak,
in.mk,
in.pk,
in.ck,
in.AccountKeeper,
in.NftKeeper,
in.PacketKeeper,
in.ClientKeeper,
)
return Outputs{
NftTransferKeeper: keeper,
Module: NewAppModule(keeper),
Module: NewAppModule(keeper),
}
}

0 comments on commit f246f2c

Please sign in to comment.