From 671d2a96474f59ca9234c876ce6604d03de95727 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 14 Sep 2026 09:06:02 -0700 Subject: One device pays a zap, whichever of them heard it first. Every awake device of a wallet hears a wallet-connect pay request within the same second, and the per-tab lock only reaches one browser profile: two profiles on one laptop each locked an HTLC for the same 21-sat zap. The push notifier now hands each pay request to the first device that claims it; a device that loses the claim stands down silently, and a device that cannot reach the notifier answers as before so nobody goes quiet over a hiccup. The worker path claims the same way. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01QYJfZ4A1TDCEY4Foq3CApR --- tools/nwc-sw-test.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/nwc-sw-test.js') diff --git a/tools/nwc-sw-test.js b/tools/nwc-sw-test.js index acf3027..ae79e18 100644 --- a/tools/nwc-sw-test.js +++ b/tools/nwc-sw-test.js @@ -51,6 +51,9 @@ function harness({ rec = baseRec(), recs = null, answered = false } = {}) { published.push(JSON.parse(opts.body).event); return { ok: true, json: async () => ({ ok: true }) }; } + if (url.includes('/claim')) { + return { ok: true, json: async () => ({ ok: true }) }; + } if (url.includes('/answered')) { return { ok: true, json: async () => ({ answered: typeof answered === 'function' ? answered() : answered }) }; } -- cgit v1.2.3