From b6876bdb04740400298cec6eba12891a8ae8ac7c Mon Sep 17 00:00:00 2001 From: martbost Date: Mon, 21 Sep 2026 06:26:23 -0500 Subject: [PATCH] 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 --- public/app.html | 2 +- public/app.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/public/app.html b/public/app.html index 4216591..533a191 100644 --- a/public/app.html +++ b/public/app.html @@ -46,6 +46,6 @@
Rewards are for completed missions, not income. The daily pool is limited; when it is spent, claims close until midnight Central. Cryptocurrency involves risk of loss.
- + diff --git a/public/app.js b/public/app.js index 196053b..8aa5b16 100644 --- a/public/app.js +++ b/public/app.js @@ -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} ' + d.pol + ' POL 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} ' + d.pol + ' POL 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() {