From d071a09604599831d370b06563144cf4ba028902 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 6 Jul 2026 11:12:31 -0700 Subject: Gift cross-device sync, snapshot size cap, reliable SW updates, gift-detail layout - Gifts now sync across devices: gift records + reserved/reclaimed coin sets ride the encrypted snapshot as a merge-safe extension (like ark), and every gift state change (create/reclaim/revoke) triggers a saveCache so it actually publishes. A gift made on one device now shows on the others. - Cap the published snapshot at ~40KB JSON (relay rejects >64KB events, nip44 expands ~1.5x): trim oldest on-chain txs when oversized; another device backfills via rescan. Typical wallets untouched. - Service worker: register with updateViaCache:'none' so a new build is detected immediately (not held by the 4h HTTP cache), and reload once on controllerchange so the fresh app runs without a manual second refresh. - Gift detail: View/Reclaim share a row, Revoke on its own full-width line so 'Revoke now' stops wrapping. Co-Authored-By: Claude Fable 5 --- src/wallet.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet.js') diff --git a/src/wallet.js b/src/wallet.js index ccb7b81..1c58de6 100644 --- a/src/wallet.js +++ b/src/wallet.js @@ -1203,6 +1203,7 @@ export class Wallet { // state (ark vtxos) must flow both directions. _mergeSnapshotExtensions(d) { for (const e of this._cacheExtensions) { try { if (e.mergeAlways) e.load(d); } catch {} } + this.emit(); // a live cross-device merge (ark/gift state) should re-render } // Called with every saved state snapshot (e.g. to push it to sync relays). registerCacheSavedHook(fn) { this._cacheSavedHooks.push(fn); } -- cgit v1.2.3