Board: no replay of old payouts as toasts on load; only drips that flip to paid while the board is open (Marty, 2026-09-21)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-21 06:26:23 -05:00
parent 184ca99902
commit b6876bdb04
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -12,11 +12,15 @@
host.appendChild(t); requestAnimationFrame(() => t.classList.add('in'));
setTimeout(() => { t.classList.remove('in'); setTimeout(() => t.remove(), 400); }, kind === 'big' ? 9000 : 6000);
}
const seenPaid = new Set(); let seenLedger = null;
// a drip that flips to paid while the board is open gets a toast with its proof
const seenPaid = new Set(); let seenLedger = null, paidPrimed = false;
// a drip that flips to paid while the board is open gets a toast with its proof. The first pass only
// records what is already paid: history is on the ledger, not in the toasts (Marty, 2026-09-21).
function watchPaid() {
for (const d of (board.drips || [])) if (d.status === 'paid' && d.tx) { if (seenPaid.size && !seenPaid.has(d.id)) toast('\u{1F4B0} <b>' + d.pol + ' POL</b> landed in your wallet.', 'ok', { href: explorer + '/tx/' + d.tx, text: 'verify \u2197' }); seenPaid.add(d.id); }
if (!seenPaid.size) for (const d of (board.drips || [])) if (d.status === 'paid') seenPaid.add(d.id);
for (const d of (board.drips || [])) if (d.status === 'paid' && d.tx) {
if (paidPrimed && !seenPaid.has(d.id)) toast('\u{1F4B0} <b>' + d.pol + ' POL</b> landed in your wallet.', 'ok', { href: explorer + '/tx/' + d.tx, text: 'verify \u2197' });
seenPaid.add(d.id);
}
paidPrimed = true;
}
// other hunters' finds, as they happen
async function watchLedger() {