Skip to content

Commit

Permalink
check withdraw in test
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Nov 6, 2024
1 parent b638cc5 commit 93bb808
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions e2e/e2etests/test_deposit_and_withdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ func TestDepositAndWithdraw(r *runner.E2ERunner, args []string) {
)

// wait for the cctx to be mined
cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout)
r.Logger.CCTX(*cctx, "deposit")
require.Equal(r, crosschaintypes.CctxStatus_OutboundMined, cctx.CctxStatus.Status)
cctxDeposit := utils.WaitCctxMinedByInboundHash(r.Ctx, tx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout)
r.Logger.CCTX(*cctxDeposit, "deposit")
require.Equal(r, crosschaintypes.CctxStatus_OutboundMined, cctxDeposit.CctxStatus.Status)

// first cctx should trigger a new cctx for the withdrawal
cctxWithdraw := utils.WaitCctxMinedByInboundHash(r.Ctx, cctxDeposit.Index, r.CctxClient, r.Logger, r.CctxTimeout)
r.Logger.CCTX(*cctxWithdraw, "withdraw")
require.Equal(r, crosschaintypes.CctxStatus_OutboundMined, cctxWithdraw.CctxStatus.Status)
}

0 comments on commit 93bb808

Please sign in to comment.