From 7af3c430d49d7817e9a0cf28ab49143edba4c00f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 24 Jun 2026 23:23:50 -0700 Subject: Make pending receives fast: cut REST load, surface live/polling state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Incoming deposits show instantly when the mempool.space WebSocket is healthy (_ingestWs updates immediately). The lag came from the socket being starved: a 20s frontier poll plus a full wallet re-scan every 120s generated enough REST volume to trip mempool's per-IP rate limit (the 429/CORS errors), which in turn degraded the socket — a feedback loop. - While the socket is live, skip the periodic full scan entirely (the WS pushes confirmations and block events) and poll the frontier only every ~25s as a half-open-socket safety net — near-zero recurring REST. - While the socket is down, poll the frontier every ~6s (was 20s) so receives still show quickly, and keep the 120s reconcile scan. - Refresh the frontier on WS (re)connect to catch deposits that landed while disconnected. - Surface a Live/Polling badge on the balance card so a stuck socket is visible. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/i18n.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/i18n.js') diff --git a/src/i18n.js b/src/i18n.js index 28ee249..84ed882 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -174,6 +174,8 @@ const STR = { received: 'Received', sent: 'Sent', pendingTag: '⏳ pending', + liveTag: 'Live', + pollingTag: 'Polling', awaitingConfirmation: 'awaiting confirmation', feeShort: 'fee {x}', historyOffline: 'Transaction history is unavailable in offline mode.', -- cgit v1.2.3