From ff0ac7a0432dedd277f921260a2d97ca0be99854 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Sat, 15 Jul 2023 17:45:37 -0400 Subject: [PATCH] Skip checking confirmation count if confirms is 0 (#4229, #4242). --- src.ts/providers/provider.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src.ts/providers/provider.ts b/src.ts/providers/provider.ts index ee183328a2..6a9ec29fdf 100644 --- a/src.ts/providers/provider.ts +++ b/src.ts/providers/provider.ts @@ -1462,6 +1462,8 @@ export class TransactionResponse implements TransactionLike, Transaction const receipt = await this.provider.getTransactionReceipt(this.hash); + if (confirms === 0) { return receipt; } + if (receipt) { if ((await receipt.confirmations()) >= confirms) { return receipt; }