diff --git a/src/components/MeritsAndSatflow.svelte b/src/components/MeritsAndSatflow.svelte index 37fcc1f..e97187c 100644 --- a/src/components/MeritsAndSatflow.svelte +++ b/src/components/MeritsAndSatflow.svelte @@ -36,6 +36,7 @@ } function checkNewZaps() { + console.log(39); const currentTime = Date.now() / 1000; const recentZaps = Array.from(unratifiedZaps.values()).filter( (zap) => @@ -50,11 +51,6 @@ lastCheckTime = currentTime; } - $: { - if (unratifiedZaps.size > 0) { - checkNewZaps(); - } - } onMount(() => { lastCheckTime = Date.now() / 1000 - 30; // 30 seconds ago @@ -71,6 +67,7 @@ for (let [_, a] of unratifiedZaps) { unratifiedZapsAmount += a.Amount / 1000; } + checkNewZaps(); unratifiedZapsAmount = unratifiedZapsAmount; } let _merits: { pubkey: string; merits: number; sats: number }[] = [];