Skip to content

Commit

Permalink
remove test context restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
juan518munoz committed Jan 25, 2024
1 parent 1e3c462 commit a499871
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions core/tests/ts-integration/src/context-owner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class TestContextOwner {
const gasPrice = await scaledGasPrice(this.mainEthersWallet);

// Deposit L2 tokens (if needed). Depositing ETH with current native implementation is not supported.
if (!l2ETHAmountToDeposit.isZero() && !this.env.nativeErc20Testing) {
if (!l2ETHAmountToDeposit.isZero()) {
// Given that we've already sent a number of transactions,
// we have to correctly send nonce.
const depositHandle = this.mainSyncWallet
Expand Down Expand Up @@ -341,23 +341,17 @@ export class TestContextOwner {
this.reporter.startAction(`Distributing tokens on L2`);
let l2startNonce = await this.mainSyncWallet.getTransactionCount();

// All the promises we send in this function.
const l2TxPromises: Promise<any>[] = [];

// ETH transfers.
if (!this.env.nativeErc20Testing) {
const ethPromises = await sendTransfers(
zksync.utils.ETH_ADDRESS,
this.mainSyncWallet,
wallets,
L2_ETH_PER_ACCOUNT,
l2startNonce,
undefined,
this.reporter
);
l2startNonce += l2TxPromises.length;
l2TxPromises.push(...ethPromises);
}
const l2TxPromises = await sendTransfers(
zksync.utils.ETH_ADDRESS,
this.mainSyncWallet,
wallets,
L2_ETH_PER_ACCOUNT,
l2startNonce,
undefined,
this.reporter
);
l2startNonce += l2TxPromises.length;

// ERC20 transfers.
const l2TokenAddress = await this.mainSyncWallet.l2TokenAddress(this.env.erc20Token.l1Address);
Expand Down

0 comments on commit a499871

Please sign in to comment.