Skip to content

Commit 095de51

Browse files
committedFeb 2, 2024
Add timeout to ContractTransactionResponse wait (#4497).
1 parent be5ec2d commit 095de51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src.ts/contract/wrappers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ export class ContractTransactionResponse extends TransactionResponse {
132132
* and the transaction has not been mined, otherwise this will
133133
* wait until enough confirmations have completed.
134134
*/
135-
async wait(confirms?: number): Promise<null | ContractTransactionReceipt> {
136-
const receipt = await super.wait(confirms);
135+
async wait(confirms?: number, timeout?: number): Promise<null | ContractTransactionReceipt> {
136+
const receipt = await super.wait(confirms, timeout);
137137
if (receipt == null) { return null; }
138138
return new ContractTransactionReceipt(this.#iface, this.provider, receipt);
139139
}

0 commit comments

Comments
 (0)