Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add timeout to ContractTransactionResponse wait (#4497).
  • Loading branch information
ricmoo committed Feb 2, 2024
1 parent be5ec2d commit 095de51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src.ts/contract/wrappers.ts
Expand Up @@ -132,8 +132,8 @@ export class ContractTransactionResponse extends TransactionResponse {
* and the transaction has not been mined, otherwise this will
* wait until enough confirmations have completed.
*/
async wait(confirms?: number): Promise<null | ContractTransactionReceipt> {
const receipt = await super.wait(confirms);
async wait(confirms?: number, timeout?: number): Promise<null | ContractTransactionReceipt> {
const receipt = await super.wait(confirms, timeout);
if (receipt == null) { return null; }
return new ContractTransactionReceipt(this.#iface, this.provider, receipt);
}
Expand Down

0 comments on commit 095de51

Please sign in to comment.