aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-06-17 16:48:03 -0300
committerSebastian <sebasjm@gmail.com>2024-06-18 14:26:30 -0300
commit4b9a2f78957587b9ba0a8b52d104b1a879912349 (patch)
tree9bd329be523cf8d48f54f7a590a7e7589c326100 /packages
parent05a3c4942112bbd44cc0bbe385277125f9526ffa (diff)
downloadwallet-core-4b9a2f78957587b9ba0a8b52d104b1a879912349.tar.xz
fix duplicated events
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-wallet-webextension/src/wxBackend.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts b/packages/taler-wallet-webextension/src/wxBackend.ts
index a0b9f2908..1601f7703 100644
--- 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,
- });
+ };
}
}
}