@ethereum-waffle/chai
Version:
A sweet set of chai matchers for your blockchain testing needs.
21 lines • 602 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.waitForPendingTransaction = void 0;
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);
}
exports.waitForPendingTransaction = waitForPendingTransaction;
//# sourceMappingURL=transaction.js.map