Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 24, 2023
1 parent 6d01288 commit 4bf2806
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions yarn-project/end-to-end/src/e2e_deploy_contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ describe('e2e_deploy_contract', () => {
}),
);
logger(`Receipt received and expecting contract deployment at ${receipt.contractAddress}`);
const receiptAfterMined = await tx.wait();
// we pass in wallet to wait(...) because wallet is necessary to create a TS contract instance
const receiptAfterMined = await tx.wait({ wallet });

expect(receiptAfterMined).toEqual(
expect.objectContaining({
Expand All @@ -60,7 +61,8 @@ describe('e2e_deploy_contract', () => {

for (let index = 0; index < 2; index++) {
logger(`Deploying contract ${index + 1}...`);
const receipt = await deployer.deploy().send({ contractAddressSalt: Fr.random() }).wait();
// we pass in wallet to wait(...) because wallet is necessary to create a TS contract instance
const receipt = await deployer.deploy().send({ contractAddressSalt: Fr.random() }).wait({ wallet });
expect(receipt.status).toBe(TxStatus.MINED);
}
}, 30_000);
Expand Down Expand Up @@ -90,7 +92,8 @@ describe('e2e_deploy_contract', () => {
const deployer = new ContractDeployer(TestContractArtifact, pxe);

{
const receipt = await deployer.deploy().send({ contractAddressSalt }).wait();
// we pass in wallet to wait(...) because wallet is necessary to create a TS contract instance
const receipt = await deployer.deploy().send({ contractAddressSalt }).wait({ wallet });

expect(receipt.status).toBe(TxStatus.MINED);
expect(receipt.error).toBe('');
Expand All @@ -107,6 +110,7 @@ describe('e2e_deploy_contract', () => {
const deployer = new ContractDeployer(TestContractArtifact, wallet);
const portalContract = EthAddress.random();

// ContractDeployer was instantiated with wallet so we don't have to pass it to wait(...)
const txReceipt = await deployer.deploy().send({ portalContract }).wait();

expect(txReceipt.status).toBe(TxStatus.MINED);
Expand Down

0 comments on commit 4bf2806

Please sign in to comment.