Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Jun 12, 2024
1 parent c89b079 commit 1dbfdb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
8 changes: 0 additions & 8 deletions testutil/keeper/crosschain.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,8 @@ func CrosschainKeeperWithMocks(
lightclientKeeper,
)

cctxGateways := map[chains.CCTXGateway]keeper.CCTXGateway{
chains.CCTXGateway_observers: keeper.NewCCTXGatewayObservers(*k),
chains.CCTXGateway_zevm: keeper.NewCCTXGatewayZEVM(*k),
}

k.SetCCTXGateways(cctxGateways)

// initialize ibccrosschain keeper and set it to the crosschain keeper
// there is a circular dependency between the two keepers, crosschain keeper must be initialized first

var ibcCrosschainKeeperTmp types.IBCCrosschainKeeper = initIBCCrosschainKeeper(
cdc,
db,
Expand Down
12 changes: 3 additions & 9 deletions x/crosschain/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/zeta-chain/zetacore/pkg/chains"
"github.com/zeta-chain/zetacore/x/crosschain/types"
)

type (
Keeper struct {
cdc codec.Codec
storeKey storetypes.StoreKey
memKey storetypes.StoreKey
cctxGateways map[chains.CCTXGateway]CCTXGateway
cdc codec.Codec
storeKey storetypes.StoreKey
memKey storetypes.StoreKey

stakingKeeper types.StakingKeeper
authKeeper types.AccountKeeper
Expand Down Expand Up @@ -102,10 +100,6 @@ func (k *Keeper) SetIBCCrosschainKeeper(ibcCrosschainKeeper types.IBCCrosschainK
k.ibcCrosschainKeeper = ibcCrosschainKeeper
}

func (k *Keeper) SetCCTXGateways(cctxGateways map[chains.CCTXGateway]CCTXGateway) {
k.cctxGateways = cctxGateways
}

func (k Keeper) GetStoreKey() storetypes.StoreKey {
return k.storeKey
}
Expand Down

0 comments on commit 1dbfdb9

Please sign in to comment.