diff --git a/__tests__/account.test.ts b/__tests__/account.test.ts index 682579ae7..bdecb1f38 100644 --- a/__tests__/account.test.ts +++ b/__tests__/account.test.ts @@ -76,7 +76,7 @@ describe('deploy and test Wallet', () => { calldata: [erc20.address, '10', '0'], }); - await provider.waitForTransaction(transaction_hash, ['ACCEPTED_ON_L2']); + await provider.waitForTransaction(transaction_hash, undefined, ['ACCEPTED_ON_L2']); }); test('read balance of wallet after transfer', async () => { @@ -115,7 +115,7 @@ describe('deploy and test Wallet', () => { }, ]); - await provider.waitForTransaction(transaction_hash, ['ACCEPTED_ON_L2']); + await provider.waitForTransaction(transaction_hash, undefined, ['ACCEPTED_ON_L2']); const response = await dapp.get_number(account.address); expect(toBN(response.number as string).toString()).toStrictEqual('57'); diff --git a/__tests__/fixtures.ts b/__tests__/fixtures.ts index 0e3b2f7e0..de707b856 100644 --- a/__tests__/fixtures.ts +++ b/__tests__/fixtures.ts @@ -48,7 +48,7 @@ export const getTestProvider = (): ProviderInterface => { // accelerate the tests when running locally const originalWaitForTransaction = provider.waitForTransaction.bind(provider); provider.waitForTransaction = (txHash, retryInterval) => { - return originalWaitForTransaction(txHash, undefined, retryInterval || 1000); + return originalWaitForTransaction(txHash, retryInterval || 1000); }; } diff --git a/src/account/default.ts b/src/account/default.ts index 935c3e2d6..e4f929ead 100644 --- a/src/account/default.ts +++ b/src/account/default.ts @@ -359,7 +359,9 @@ export class Account extends Provider implements AccountInterface { details: InvocationsDetails = {} ): Promise { const deployTx = await this.deploy(payload, details); - const txReceipt = await this.waitForTransaction(deployTx.transaction_hash, ['ACCEPTED_ON_L2']); + const txReceipt = await this.waitForTransaction(deployTx.transaction_hash, undefined, [ + 'ACCEPTED_ON_L2', + ]); return parseUDCEvent(txReceipt); } @@ -368,7 +370,7 @@ export class Account extends Provider implements AccountInterface { details?: InvocationsDetails ) { const { transaction_hash } = await this.declare({ contract, classHash }, details); - const declare = await this.waitForTransaction(transaction_hash, ['ACCEPTED_ON_L2']); + const declare = await this.waitForTransaction(transaction_hash, undefined, ['ACCEPTED_ON_L2']); const deploy = await this.deployContract({ classHash, constructorCalldata }, details); return { declare: { ...declare, class_hash: classHash }, deploy }; }