Skip to content

Commit

Permalink
clear interval
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Oct 20, 2023
1 parent 39ed59d commit 200766c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helpers/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const trackCCTX = async (
let cctxs: any = {};
let pendingNonces: any = [];

setInterval(async () => {
const intervalID = setInterval(async () => {
pendingNonces = await fetchNonces(API, TSS);
if (Object.keys(cctxs).length === 0) {
if (!json && emitter) {
Expand Down Expand Up @@ -226,6 +226,8 @@ export const trackCCTX = async (
})
.every((s) => s === "OutboundMined");

clearInterval(intervalID);

if (!allOutboundMined) {
reject("CCTX aborted or reverted");
} else {
Expand Down

0 comments on commit 200766c

Please sign in to comment.