diff options
author | Florian Dold <florian@dold.me> | 2023-09-14 17:36:15 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-09-14 19:18:01 +0200 |
commit | 1ce53e1c211296233f2f683c64e156e4d3a79678 (patch) | |
tree | b6af47e4c77d5a0321ccaf3035040def0fcc64a9 /packages/taler-wallet-core/src/operations/attention.ts | |
parent | f4587c44fd6a6d76384cd671550890255c3fe650 (diff) |
wallet-core: consistently use usec timestamps in DB
Diffstat (limited to 'packages/taler-wallet-core/src/operations/attention.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/attention.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/attention.ts b/packages/taler-wallet-core/src/operations/attention.ts index 1030db0a6..92d69e93e 100644 --- a/packages/taler-wallet-core/src/operations/attention.ts +++ b/packages/taler-wallet-core/src/operations/attention.ts @@ -31,7 +31,7 @@ import { UserAttentionUnreadList, } from "@gnu-taler/taler-util"; import { InternalWalletState } from "../internal-wallet-state.js"; -import { timestampPreciseToDb } from "../index.js"; +import { timestampPreciseFromDb, timestampPreciseToDb } from "../index.js"; const logger = new Logger("operations/attention.ts"); @@ -75,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, }); }); @@ -118,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, }); }); |