diff options
| author | Adam Soltys <[email protected]> | 2026-07-06 14:55:40 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-07-06 14:55:40 -0700 |
| commit | 312621af84136fddbe7d7e47ffecc1ba2b38920d (patch) | |
| tree | 6090489ef5ae7bac16a25340bd2c11f426079cbb /src/api.js | |
| parent | d071a09604599831d370b06563144cf4ba028902 (diff) | |
| download | coinosv3-312621af84136fddbe7d7e47ffecc1ba2b38920d.tar.gz coinosv3-312621af84136fddbe7d7e47ffecc1ba2b38920d.zip | |
Fee rates from live explorer + reconnect half-open socket on wake
- Fee rates on the electrum backend came from Fulcrum's estimatefee
(Core's estimatesmartfee): historical, laggy, floored at 1 sat/vB, so
it showed 1 across the board while mempool.space showed 11/10. Pull the
configured explorer's live recommendation instead (/v1/fees/recommended,
then /fee-estimates), falling back to estimatefee only when the explorer
is unreachable — self-hosted/regtest behaviour unchanged.
- On mobile a backgrounded page leaves the socket half-open: TCP is dead
but readyState still reads OPEN, so wake() never reconnected and fired
scan RPCs into the void, waiting ~20s for the heartbeat to recover.
wake() now forces a reconnect when the socket has been silent past the
heartbeat window, so a payment shows the instant you refocus.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Diffstat (limited to 'src/api.js')
| -rw-r--r-- | src/api.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -593,7 +593,7 @@ export class Api { // Esplora /fee-estimates is { blockTarget: sat/vB }. Map to the named tiers the // UI expects. Round up so we never underpay. -function mapEsploraFees(est) { +export function mapEsploraFees(est) { const at = (n, d) => Math.max(1, Math.ceil(est[n] || d)); return { fastestFee: at(1, 10), |
