aboutsummaryrefslogtreecommitdiffstats
path: root/src/sw-nwc.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/sw-nwc.js')
-rw-r--r--src/sw-nwc.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sw-nwc.js b/src/sw-nwc.js
index db57b99..8267b6b 100644
--- a/src/sw-nwc.js
+++ b/src/sw-nwc.js
@@ -1,9 +1,10 @@
// Service-worker side of background NWC. Bundled by build.js and appended to
// the generated sw.js, replacing the notify-only push handler: a push now
-// first tries to ANSWER the request from the pouch (see nwc-respond.js), and
-// only falls back to the wake-the-user notification when it can't.
+// first tries to ANSWER the request from the background state mirror (see
+// nwc-respond.js), and only falls back to the wake-the-user notification
+// when it can't.
-import { respondFromPouch } from './nwc-respond.js';
+import { respondFromBg } from './nwc-respond.js';
const NOTIFIER = 'https://nwcpush.coinos.io';
@@ -21,7 +22,7 @@ self.addEventListener('push', (e) => {
}
let handled = false;
try {
- handled = await respondFromPouch(data, {
+ handled = await respondFromBg(data, {
notifier: NOTIFIER,
log: (m) => console.log('[sw-nwc]', m),
});