Add timeout to ContractTransactionResponse wait (#4497).
This commit is contained in:
parent
be5ec2d327
commit
095de51e60
@ -132,8 +132,8 @@ export class ContractTransactionResponse extends TransactionResponse {
|
|||||||
* and the transaction has not been mined, otherwise this will
|
* and the transaction has not been mined, otherwise this will
|
||||||
* wait until enough confirmations have completed.
|
* wait until enough confirmations have completed.
|
||||||
*/
|
*/
|
||||||
async wait(confirms?: number): Promise<null | ContractTransactionReceipt> {
|
async wait(confirms?: number, timeout?: number): Promise<null | ContractTransactionReceipt> {
|
||||||
const receipt = await super.wait(confirms);
|
const receipt = await super.wait(confirms, timeout);
|
||||||
if (receipt == null) { return null; }
|
if (receipt == null) { return null; }
|
||||||
return new ContractTransactionReceipt(this.#iface, this.provider, receipt);
|
return new ContractTransactionReceipt(this.#iface, this.provider, receipt);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user