taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 4b9a2f78957587b9ba0a8b52d104b1a879912349
parent 05a3c4942112bbd44cc0bbe385277125f9526ffa
Author: Sebastian <sebasjm@gmail.com>
Date:   Mon, 17 Jun 2024 16:48:03 -0300

fix duplicated events

Diffstat:
Mpackages/taler-wallet-webextension/src/wxBackend.ts | 22+++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts b/packages/taler-wallet-webextension/src/wxBackend.ts @@ -120,7 +120,7 @@ function convertWalletActivityNotification( if (found) { found.end = event.when; found.events.unshift(event); - return found; + return undefined; } return { id: getUniqueId(), @@ -148,7 +148,7 @@ function convertWalletActivityNotification( if (found) { found.end = event.when; found.events.unshift(event); - return found; + return undefined; } return { id: getUniqueId(), @@ -168,7 +168,7 @@ function convertWalletActivityNotification( if (found) { found.end = event.when; found.events.unshift(event); - return found; + return undefined; } return { id: getUniqueId(), @@ -181,14 +181,14 @@ function convertWalletActivityNotification( } case NotificationType.Idle: { const groupId = ""; - return({ + return { id: getUniqueId(), type: event.type, start: event.when, end: AbsoluteTime.never(), events: [event], groupId, - }); + }; } case NotificationType.TaskObservabilityEvent: { const groupId = `${event.type}:${event.taskId}`; @@ -196,16 +196,16 @@ function convertWalletActivityNotification( if (found) { found.end = event.when; found.events.unshift(event); - return found; + return undefined; } - return({ + return { id: getUniqueId(), type: event.type, start: event.when, end: AbsoluteTime.never(), events: [event], groupId, - }); + }; } case NotificationType.RequestObservabilityEvent: { const groupId = `${event.type}:${event.operation}:${event.requestId}`; @@ -213,16 +213,16 @@ function convertWalletActivityNotification( if (found) { found.end = event.when; found.events.unshift(event); - return found; + return undefined; } - return({ + return { id: getUniqueId(), type: event.type, start: event.when, end: AbsoluteTime.never(), events: [event], groupId, - }); + }; } } }