Skip to content

Commit

Permalink
fix: imports + remove scoped keeper
Browse files Browse the repository at this point in the history
  • Loading branch information
seantking committed Nov 23, 2021
1 parent 6ba0387 commit 7581a7c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
1 change: 1 addition & 0 deletions modules/apps/29-fee/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper

import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/modules/apps/29-fee/types"
)

Expand Down
1 change: 0 additions & 1 deletion modules/apps/29-fee/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package keeper_test

import (
"github.com/cosmos/ibc-go/modules/apps/29-fee/types"

transfertypes "github.com/cosmos/ibc-go/modules/apps/transfer/types"
channeltypes "github.com/cosmos/ibc-go/modules/core/04-channel/types"
ibctesting "github.com/cosmos/ibc-go/testing"
Expand Down
6 changes: 1 addition & 5 deletions modules/apps/29-fee/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import (

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"

"github.com/tendermint/tendermint/libs/log"

"github.com/cosmos/ibc-go/modules/apps/29-fee/types"
Expand All @@ -33,13 +31,12 @@ type Keeper struct {
channelKeeper types.ChannelKeeper
portKeeper types.PortKeeper
bankKeeper types.BankKeeper
scopedKeeper capabilitykeeper.ScopedKeeper
}

// NewKeeper creates a new 29-fee Keeper instance
func NewKeeper(
cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace,
channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, scopedKeeper capabilitykeeper.ScopedKeeper,
channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper,
) Keeper {

return Keeper{
Expand All @@ -49,7 +46,6 @@ func NewKeeper(
portKeeper: portKeeper,
authKeeper: authKeeper,
bankKeeper: bankKeeper,
scopedKeeper: scopedKeeper,
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const (
// StoreKey is the store key string for IBC fee module
StoreKey = ModuleName

// PortKey is the port id that is wrapped by fee middleware
// PortID is the port id that is wrapped by fee middleware
PortID = "feetransfer"

// RouterKey is the message route for IBC fee module
Expand Down
5 changes: 1 addition & 4 deletions testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ func NewSimApp(
app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey])
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName)
scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)
scopedIBCFeeKeeper := app.CapabilityKeeper.ScopeToModule(ibcfeetypes.ModuleName)

// NOTE: the IBC mock keeper and application module is used only for testing core IBC. Do
// note replicate if you do not need to test core IBC or light clients.
scopedIBCMockKeeper := app.CapabilityKeeper.ScopeToModule(ibcmock.ModuleName)
Expand Down Expand Up @@ -325,7 +323,7 @@ func NewSimApp(
)

app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(appCodec, keys[ibcfeetypes.StoreKey], app.GetSubspace(ibcfeetypes.ModuleName),
app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, scopedIBCFeeKeeper,
app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper,
)

// Create Transfer Keeper and pass IBCFeeKeeper as expected Channel and PortKeeper
Expand Down Expand Up @@ -483,7 +481,6 @@ func NewSimApp(

app.ScopedIBCKeeper = scopedIBCKeeper
app.ScopedTransferKeeper = scopedTransferKeeper
app.ScopedIBCFeeKeeper = scopedIBCFeeKeeper

// NOTE: the IBC mock keeper and application module is used only for testing core IBC. Do
// note replicate if you do not need to test core IBC or light clients.
Expand Down

0 comments on commit 7581a7c

Please sign in to comment.