Skip to content

Commit

Permalink
fix test to set the counterparty channel
Browse files Browse the repository at this point in the history
  • Loading branch information
ajansari95 committed Jul 11, 2023
1 parent 6244d4a commit 519bca6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion x/interchainstaking/keeper/ibc_packet_handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,19 @@ func (suite *KeeperTestSuite) TestHandleMsgTransferGood() {
quicksilver := suite.GetQuicksilverApp(suite.chainA)
ctx := suite.chainA.GetContext()

ibcDenom := utils.DeriveIbcDenom("transfer", "channel-0", tc.amount.Denom)
counterparty := channeltypes.NewCounterparty("transfer", "channel-4")
channel := channeltypes.Channel{
State: channeltypes.OPEN,
Ordering: channeltypes.UNORDERED,
Counterparty: counterparty,
ConnectionHops: []string{"connection-2"},
}

quicksilver.InterchainstakingKeeper.IBCKeeper.ChannelKeeper.SetChannel(ctx, "transfer", "channel-0", channel)
channel, cfound := quicksilver.InterchainstakingKeeper.IBCKeeper.ChannelKeeper.GetChannel(ctx, "transfer", "channel-0")
suite.Require().True(cfound)

ibcDenom := utils.DeriveIbcDenom(channel.Counterparty.PortId, channel.Counterparty.ChannelId, tc.amount.Denom)

err := quicksilver.BankKeeper.MintCoins(ctx, icstypes.ModuleName, sdk.NewCoins(sdk.NewCoin(ibcDenom, tc.amount.Amount)))
suite.Require().NoError(err)
Expand Down

0 comments on commit 519bca6

Please sign in to comment.