mirror of
https://github.com/aljazceru/hypergolic.git
synced 2025-12-17 05:24:21 +01:00
problem: purchase toast does not show upon new zap recieved
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checkNewZaps() {
|
function checkNewZaps() {
|
||||||
|
console.log(39);
|
||||||
const currentTime = Date.now() / 1000;
|
const currentTime = Date.now() / 1000;
|
||||||
const recentZaps = Array.from(unratifiedZaps.values()).filter(
|
const recentZaps = Array.from(unratifiedZaps.values()).filter(
|
||||||
(zap) =>
|
(zap) =>
|
||||||
@@ -50,11 +51,6 @@
|
|||||||
|
|
||||||
lastCheckTime = currentTime;
|
lastCheckTime = currentTime;
|
||||||
}
|
}
|
||||||
$: {
|
|
||||||
if (unratifiedZaps.size > 0) {
|
|
||||||
checkNewZaps();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
lastCheckTime = Date.now() / 1000 - 30; // 30 seconds ago
|
lastCheckTime = Date.now() / 1000 - 30; // 30 seconds ago
|
||||||
@@ -71,6 +67,7 @@
|
|||||||
for (let [_, a] of unratifiedZaps) {
|
for (let [_, a] of unratifiedZaps) {
|
||||||
unratifiedZapsAmount += a.Amount / 1000;
|
unratifiedZapsAmount += a.Amount / 1000;
|
||||||
}
|
}
|
||||||
|
checkNewZaps();
|
||||||
unratifiedZapsAmount = unratifiedZapsAmount;
|
unratifiedZapsAmount = unratifiedZapsAmount;
|
||||||
}
|
}
|
||||||
let _merits: { pubkey: string; merits: number; sats: number }[] = [];
|
let _merits: { pubkey: string; merits: number; sats: number }[] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user