Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into jim/move-denomtrace-to-internal
  • Loading branch information
DimitrisJim authored Jun 5, 2024
commit 50d08d588c0938920de2514f33fba435d1f364f9
37 changes: 17 additions & 20 deletions modules/apps/transfer/keeper/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,12 @@ func (suite *KeeperTestSuite) TestOnRecvPacketSetsTotalEscrowAmountForSourceIBCT
path2 := ibctesting.NewTransferPath(suite.chainA, suite.chainB)
path2.Setup()

// denomTrace path: {transfer/channel-1/transfer/channel-0}
denomTrace := internaltypes.DenomTrace{
BaseDenom: sdk.DefaultBondDenom,
Path: fmt.Sprintf("%s/%s/%s/%s", path2.EndpointA.ChannelConfig.PortID, path2.EndpointA.ChannelID, path1.EndpointB.ChannelConfig.PortID, path1.EndpointB.ChannelID),
}
// denom path: {transfer/channel-1/transfer/channel-0}
denom := types.NewDenom(
sdk.DefaultBondDenom,
types.NewTrace(path2.EndpointA.ChannelConfig.PortID, path2.EndpointA.ChannelID),
types.NewTrace(path1.EndpointB.ChannelConfig.PortID, path1.EndpointB.ChannelID),
)

data := types.NewFungibleTokenPacketDataV2(
[]types.Token{
Expand All @@ -641,12 +642,12 @@ func (suite *KeeperTestSuite) TestOnRecvPacketSetsTotalEscrowAmountForSourceIBCT
timeout, 0,
)

// fund escrow account for transfer and channel-1 on chain B
// denomTrace path: transfer/channel-0
denomTrace = internaltypes.DenomTrace{
BaseDenom: sdk.DefaultBondDenom,
Path: fmt.Sprintf("%s/%s", path1.EndpointB.ChannelConfig.PortID, path1.EndpointB.ChannelID),
}
// denom path: transfer/channel-0
denom = types.NewDenom(
sdk.DefaultBondDenom,
types.NewTrace(path1.EndpointB.ChannelConfig.PortID, path1.EndpointB.ChannelID),
)

escrowAddress := types.GetEscrowAddress(path2.EndpointB.ChannelConfig.PortID, path2.EndpointB.ChannelID)
coin := sdk.NewCoin(denom.IBCDenom(), amount)
suite.Require().NoError(
Expand Down Expand Up @@ -831,11 +832,9 @@ func (suite *KeeperTestSuite) TestOnAcknowledgementPacketSetsTotalEscrowAmountFo
path2.Setup()

// fund escrow account for transfer and channel-1 on chain B
// denomTrace path = transfer/channel-0
denomTrace := internaltypes.DenomTrace{
BaseDenom: sdk.DefaultBondDenom,
Path: fmt.Sprintf("%s/%s", path1.EndpointB.ChannelConfig.PortID, path1.EndpointB.ChannelID),
}
// denom path: transfer/channel-0
denom := types.NewDenom(sdk.DefaultBondDenom, types.NewTrace(path1.EndpointB.ChannelConfig.PortID, path1.EndpointB.ChannelID))

escrowAddress := types.GetEscrowAddress(path2.EndpointB.ChannelConfig.PortID, path2.EndpointB.ChannelID)
coin := sdk.NewCoin(denom.IBCDenom(), amount)
suite.Require().NoError(
Expand Down Expand Up @@ -1063,10 +1062,8 @@ func (suite *KeeperTestSuite) TestOnTimeoutPacketSetsTotalEscrowAmountForSourceI
path2.Setup()

// fund escrow account for transfer and channel-1 on chain B
denomTrace := internaltypes.DenomTrace{
BaseDenom: sdk.DefaultBondDenom,
Path: fmt.Sprintf("%s/%s", path1.EndpointB.ChannelConfig.PortID, path1.EndpointB.ChannelID),
}
denom := types.NewDenom(sdk.DefaultBondDenom, types.NewTrace(path1.EndpointB.ChannelConfig.PortID, path1.EndpointB.ChannelID))

escrowAddress := types.GetEscrowAddress(path2.EndpointB.ChannelConfig.PortID, path2.EndpointB.ChannelID)
coin := sdk.NewCoin(denom.IBCDenom(), amount)
suite.Require().NoError(
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.