diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wxApi.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wxApi.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/wxApi.ts b/packages/taler-wallet-webextension/src/wxApi.ts index be0fed883..31fbd5b45 100644 --- a/packages/taler-wallet-webextension/src/wxApi.ts +++ b/packages/taler-wallet-webextension/src/wxApi.ts @@ -350,11 +350,13 @@ export function acceptTip(req: AcceptTipRequest): Promise<void> { return callBackend("acceptTip", req); } -export function onUpdateNotification(messageType: Array<NotificationType>, doCallback: () => void): () => void { +export function onUpdateNotification(messageTypes: Array<NotificationType>, doCallback: () => void): () => void { // eslint-disable-next-line no-undef const port = chrome.runtime.connect({ name: "notifications" }); const listener = (message: MessageFromBackend): void => { - if (messageType.includes(message.type)) { + const shouldNotify = messageTypes.includes(message.type) + console.log("Notification arrived, should notify?", shouldNotify, message.type, messageTypes) + if (shouldNotify) { doCallback(); } }; |