chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
20 lines • 666 B
JavaScript
export class BroadcastedTransaction {
waitToBeConfirmed() {
// eslint-disable-next-line no-async-promise-executor
return new Promise(async (resolve) => {
// First check before starting the interval
if (await this.isConfirmed()) {
resolve();
}
else {
const intervalId = setInterval(async () => {
if (await this.isConfirmed()) {
clearInterval(intervalId);
resolve();
}
}, 10000);
}
});
}
}
//# sourceMappingURL=BroadcastedTransaction.js.map