More flexible signature for waitForTransaction.

This commit is contained in:
Richard Moore 2022-12-05 23:45:41 -05:00
parent 32927d78e9
commit 392b86fb8f

@ -980,7 +980,7 @@ export class AbstractProvider implements Provider {
//return "TODO"; //return "TODO";
} }
async waitForTransaction(hash: string, _confirms?: number, timeout?: number): Promise<null | TransactionReceipt> { async waitForTransaction(hash: string, _confirms?: null | number, timeout?: null | number): Promise<null | TransactionReceipt> {
const confirms = (_confirms != null) ? _confirms: 1; const confirms = (_confirms != null) ? _confirms: 1;
if (confirms === 0) { return this.getTransactionReceipt(hash); } if (confirms === 0) { return this.getTransactionReceipt(hash); }