From d561d4110c7b484bee077678b8469188a3541753 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 Aug 2026 11:44:43 -0700 Subject: Wake hal for wallet-connect requests while it is closed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Step 3, first half. Android Chrome freezes backgrounded PWAs and closes their relay sockets, so a phone with hal "open" answers nothing — which is what made Amethyst spin. Push is the only way to reach a frozen app. - service worker gains a `push` handler. It deliberately does NOT spend: if a window is open it nudges it to re-listen, otherwise it raises a notification that opens hal on tap. Putting a spend path in the worker is the remaining half and wants its own testing. - hal-side: request permission, subscribe with the notifier's VAPID key, and register its service pubkeys with nwcpush.coinos.io. Turning it off deregisters, unsubscribes, and clears the pouch — no reason to leave spendable keys where a worker can read them if nothing will. - a Settings toggle, and the ark feature exposes the ASP context the pouch record needs. Co-Authored-By: Claude Fable 5 --- src/i18n.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/i18n.js') diff --git a/src/i18n.js b/src/i18n.js index b9371e7..1fa7d74 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -439,6 +439,11 @@ const STR = { nwcDesc: 'Let another app pay from this wallet over nostr — it never sees your keys, only spends within the limits you set, and you can cut it off at any time. Payments go out over Ark.', nwcTabWarning: 'Only works while Hal is open in a tab — it is not an always-on service.', nwcAdd: 'Add a connection', + nwcBackground: 'Alert me when closed', + nwcOn: 'On', + nwcOff: 'Off', + nwcBackgroundOn: 'You will be notified of payment requests', + nwcBackgroundOff: 'Background alerts turned off', nwcAppName: 'App name (e.g. Damus)', nwcMaxPayment: 'Max per payment (sats)', nwcDailyBudget: 'Daily budget (sats)', -- cgit v1.2.3