diff options
| author | Adam Soltys <[email protected]> | 2026-06-15 08:01:18 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-15 08:01:18 -0700 |
| commit | 8a2bb0790d581ff67325966b3e37d6b2500128b5 (patch) | |
| tree | 4af258decd2f16c13ca2dd255ebac4e9c9c3972b /src/api.js | |
| parent | acd0e15c7066b7be4a11c5cf0151f5752d4a3b06 (diff) | |
| download | coinosv3-8a2bb0790d581ff67325966b3e37d6b2500128b5.tar.gz coinosv3-8a2bb0790d581ff67325966b3e37d6b2500128b5.zip | |
Add polling safety-net so pending balances appear reliably
Relying solely on the mempool WebSocket was unreliable: it only pushes new
events (no replay), and pushes can be missed (drops, server quirks), so a
deposit could go unseen with no manual refresh to fall back on.
- Add a 12s background poll alongside the WebSocket.
- Make background refreshes "silent": scan({silent:true}) re-renders only when
the visible state (utxos/txs/fresh indices) actually changes, so polls never
flash the UI or steal input focus while typing.
- Skip fees/price fetches on routine polls to keep request volume low.
- WS events now trigger the same silent refresh (debounce 800ms).
Unit-tested: silent refresh emits once when a pending deposit appears and not
at all when nothing changed.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/api.js')
0 files changed, 0 insertions, 0 deletions
