aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/recoup.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-13 16:08:51 +0200
committerFlorian Dold <florian@dold.me>2023-09-14 19:18:01 +0200
commitf4587c44fd6a6d76384cd671550890255c3fe650 (patch)
treef3eab7032e7ec4a6e49ffdf85ea57e3874b84130 /packages/taler-wallet-core/src/operations/recoup.ts
parent59ef010b0e1f1eaf938a20a46f52d7c94af7b10d (diff)
wallet-core: use typed microsecond timestamps in DB
Diffstat (limited to 'packages/taler-wallet-core/src/operations/recoup.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/recoup.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/operations/recoup.ts b/packages/taler-wallet-core/src/operations/recoup.ts
index 6a18e5de6..782e98d1c 100644
--- a/packages/taler-wallet-core/src/operations/recoup.ts
+++ b/packages/taler-wallet-core/src/operations/recoup.ts
@@ -47,6 +47,7 @@ import {
WithdrawCoinSource,
WithdrawalGroupStatus,
WithdrawalRecordType,
+ timestampPreciseToDb,
} from "../db.js";
import { InternalWalletState } from "../internal-wallet-state.js";
import { checkDbInvariant } from "../util/invariants.js";
@@ -391,7 +392,7 @@ export async function processRecoupGroup(
if (!rg2) {
return;
}
- rg2.timestampFinished = TalerPreciseTimestamp.now();
+ rg2.timestampFinished = timestampPreciseToDb(TalerPreciseTimestamp.now());
if (rg2.scheduleRefreshCoins.length > 0) {
const refreshGroupId = await createRefreshGroup(
ws,
@@ -424,7 +425,7 @@ export async function createRecoupGroup(
exchangeBaseUrl: exchangeBaseUrl,
coinPubs: coinPubs,
timestampFinished: undefined,
- timestampStarted: TalerPreciseTimestamp.now(),
+ timestampStarted: timestampPreciseToDb(TalerPreciseTimestamp.now()),
recoupFinishedPerCoin: coinPubs.map(() => false),
scheduleRefreshCoins: [],
};