From 161dfa15e59b27f41dfa86d47d321d2fa2e3e9d5 Mon Sep 17 00:00:00 2001 From: LHerskind Date: Tue, 22 Aug 2023 18:35:04 +0000 Subject: [PATCH] fix: will throw if `wait` on dropped tx. --- yarn-project/end-to-end/src/e2e_lending_contract.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yarn-project/end-to-end/src/e2e_lending_contract.test.ts b/yarn-project/end-to-end/src/e2e_lending_contract.test.ts index 2ba1df56ff0a..ff9aa6936a6c 100644 --- a/yarn-project/end-to-end/src/e2e_lending_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_lending_contract.test.ts @@ -540,7 +540,8 @@ describe('e2e_lending_contract', () => { // Withdraw more than possible to test the revert. logger('Withdraw: trying to withdraw more than possible'); const tx = lendingContract.methods.withdraw_public(recipient, 10n ** 9n).send({ origin: recipient }); - const receipt = await tx.wait(); + await tx.isMined({ interval: 0.1 }); + const receipt = await tx.getReceipt(); expect(receipt.status).toBe(TxStatus.DROPPED); }