aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/attention.ts
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-10-06 16:33:05 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-10-06 16:33:05 +0200
commitfe7b51ef2736edbf04f5bbd9d19f2a2d04baccc2 (patch)
tree66c68c8d6a666f6e74dc663c9ee4f07879f6626c /packages/taler-wallet-core/src/operations/attention.ts
parent35611f0bf9cf67638b171c2a300fab1797d3d8f0 (diff)
parent97d7be7503168f4f3bbd05905d32aa76ca1636b2 (diff)
Merge branch 'master' into age-withdraw
Diffstat (limited to 'packages/taler-wallet-core/src/operations/attention.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/attention.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/attention.ts b/packages/taler-wallet-core/src/operations/attention.ts
index 7d84b43ef..92d69e93e 100644
--- a/packages/taler-wallet-core/src/operations/attention.ts
+++ b/packages/taler-wallet-core/src/operations/attention.ts
@@ -31,6 +31,7 @@ import {
UserAttentionUnreadList,
} from "@gnu-taler/taler-util";
import { InternalWalletState } from "../internal-wallet-state.js";
+import { timestampPreciseFromDb, timestampPreciseToDb } from "../index.js";
const logger = new Logger("operations/attention.ts");
@@ -74,7 +75,7 @@ export async function getUserAttentions(
return;
pending.push({
info: x.info,
- when: TalerPreciseTimestamp.fromMilliseconds(x.createdMs),
+ when: timestampPreciseFromDb(x.created),
read: x.read !== undefined,
});
});
@@ -94,7 +95,7 @@ export async function markAttentionRequestAsRead(
if (!ua) throw Error("attention request not found");
tx.userAttention.put({
...ua,
- read: TalerPreciseTimestamp.now(),
+ read: timestampPreciseToDb(TalerPreciseTimestamp.now()),
});
});
}
@@ -117,7 +118,7 @@ export async function addAttentionRequest(
await tx.userAttention.put({
info,
entityId,
- createdMs: AbsoluteTime.now().t_ms as number,
+ created: timestampPreciseToDb(TalerPreciseTimestamp.now()),
read: undefined,
});
});