Skip to content

Commit

Permalink
also try to wait on withdrawals
Browse files Browse the repository at this point in the history
Signed-off-by: tomg10 <[email protected]>
  • Loading branch information
tomg10 committed Sep 10, 2024
1 parent 7cb5181 commit 37a5c3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/tests/ts-integration/tests/erc20.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { shouldChangeTokenBalances, shouldOnlyTakeFee } from '../src/modifiers/b

import * as zksync from 'zksync-ethers';
import * as ethers from 'ethers';
import { scaledGasPrice, waitForIncreasedL1Nonce, waitUntilBlockFinalized } from '../src/helpers';
import {scaledGasPrice, waitForIncreasedL1Nonce, waitUntilBlockFinalized} from '../src/helpers';
import { L2_DEFAULT_ETH_PER_ACCOUNT } from '../src/context-owner';

describe('ERC20 contract checks', () => {
Expand Down Expand Up @@ -178,7 +178,9 @@ describe('ERC20 contract checks', () => {
l1: true
}
);
let nonce = await alice._signerL1().getNonce();
await expect(alice.finalizeWithdrawal(withdrawalTx.hash)).toBeAccepted([l1BalanceChange]);
await waitForIncreasedL1Nonce(nonce, alice);
});

test('Should claim failed deposit', async () => {
Expand Down Expand Up @@ -243,7 +245,6 @@ describe('ERC20 contract checks', () => {
}

// deposit handle with the precalculated max amount
let nonce = await alice._signerL1().getNonce();
const depositHandle = await alice.deposit({
token: tokenDetails.l1Address,
amount: tokenDepositAmount,
Expand All @@ -258,7 +259,6 @@ describe('ERC20 contract checks', () => {
{ wallet: alice, change: tokenDepositAmount }
]);
await expect(depositHandle).toBeAccepted([l2TokenBalanceChange]);
await waitForIncreasedL1Nonce(nonce, alice);
});

afterAll(async () => {
Expand Down

0 comments on commit 37a5c3d

Please sign in to comment.