UNPKG

@ethereum-waffle/chai

Version:

A sweet set of chai matchers for your blockchain testing needs.

17 lines 425 B
export async function waitForPendingTransaction(tx, provider) { let hash; if (tx instanceof Promise) { ({ hash } = await tx); } else if (typeof tx === 'string') { hash = tx; } else { ({ hash } = tx); } if (!hash) { throw new Error(`${tx} is not a valid transaction`); } return provider.waitForTransaction(hash); } //# sourceMappingURL=transaction.js.map