UNPKG

chaingate

Version:

A complete TypeScript library for connecting to and making transactions on different blockchains

24 lines 834 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BroadcastedTransaction = void 0; 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); } }); } } exports.BroadcastedTransaction = BroadcastedTransaction; //# sourceMappingURL=BroadcastedTransaction.js.map