@toon-protocol/views@0.10.8
·
29 commits
to main
since this release
Patch Changes
-
0f6fc74: Fix three wallet-overview bugs that made the wallet card look broken in the host iframe:
- Copy button was a silent no-op. The TOON app runs in the host iframe, which
isn't granted theclipboard-writepermission policy, so
navigator.clipboard.writeTextrejects there — and the click had no rejection
handler.CopyButtonnow falls back to the legacydocument.execCommand('copy')
over a hidden textarea (works in a sandboxed frame), same iframe-limitation
class as thewindow.confirm→ consent fix. - Fund button gave no feedback. Tapping "Fund" fired the faucet but the card
never changed, so it read as broken. The button now shows aFunding…→
Requested(orRetry fundon failure) state and re-reads balances after a
successful drip. - Balances rendered blank on a flaky read. The
toon_balancescontrol plane
can transiently refuse on:8787while the websocket transport is healthy
(toon-client#186) — it succeeds on retry.readBalancesnow retries before
giving up and throws on persistent failure, andwallet-overviewshows a
"Balances temporarily unavailable — Retry" state instead of a blank card that's
indistinguishable from a real zero balance.
Also fixes the daemon-side root cause of that flakiness (toon-client#186), not
just the symptom:- Stale keep-alive socket race. The long-lived MCP server calls the localhost
control plane infrequently, so the daemon (Node's default 5s keep-alive) reaped
idle sockets the undici client pool still held — the next request reused a dead
socket and failed withECONNRESET, mislabeled as "daemon not reachable". The
daemon now keeps idle sockets alive past the client's pool window
(keepAliveTimeout: 650s), and theControlClienttransparently retries
idempotent (GET/DELETE) requests on a transient connection failure. Mutating
POSTs are not retried (no double publish/fund/deposit). - Timeouts no longer masquerade as "daemon not reachable". A request the
client aborts on its own timeout (e.g. a hung on-chain balance read) is now a
retryable504, so the surfaced message says "retry" instead of "the daemon
failed to start — check the log".
- Copy button was a silent no-op. The TOON app runs in the host iframe, which