From 554716b916c5b4c4ca39bf6344f840c62a0da54a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 25 Jun 2026 00:30:03 -0700 Subject: Fast-poll the receive address while watching for a payment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The WS badge reads Live but mempool.space's free address tracking doesn't reliably push incoming mempool txs, so a deposit could take ~18s to appear (the 25s safety poll catching it). While the user is on the Receive tab (online), now poll just the fresh receive address every ~3s regardless of Live state — one cheap request that guarantees near-instant arrival. Toggled idempotently from render() based on the active tab; stops when they navigate away. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 53e118e..9c9c22a 100644 --- a/src/app.js +++ b/src/app.js @@ -233,6 +233,9 @@ function render() { ? howItWorksScreen() : unlockScreen(); root.replaceChildren(screen, footer()); + // Fast-poll the receive address only while the user is actually watching for a + // payment (wallet screen, Receive tab, online). Idempotent — safe each render. + wallet.setWatchReceive(ui.screen === 'wallet' && ui.tab === 'receive' && !wallet.offline); } wallet.subscribe(render); -- cgit v1.2.3