aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/deposits.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/deposits.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/deposits.ts17
1 files changed, 13 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts
index 2de8f30a1..111d15989 100644
--- a/packages/taler-wallet-core/src/operations/deposits.ts
+++ b/packages/taler-wallet-core/src/operations/deposits.ts
@@ -73,6 +73,9 @@ import {
RefreshOperationStatus,
createRefreshGroup,
getTotalRefreshCost,
+ timestampPreciseToDb,
+ timestampProtocolFromDb,
+ timestampProtocolToDb,
} from "../index.js";
import { InternalWalletState } from "../internal-wallet-state.js";
import { assertUnreachable } from "../util/assertUnreachable.js";
@@ -799,7 +802,7 @@ async function processDepositGroupPendingTrack(
amountRaw: Amounts.stringify(raw),
wireFee: Amounts.stringify(wireFee),
exchangePub: track.exchange_pub,
- timestampExecuted: track.execution_time,
+ timestampExecuted: timestampProtocolToDb(track.execution_time),
wireTransferId: track.wtid,
},
id: track.exchange_sig,
@@ -857,7 +860,9 @@ async function processDepositGroupPendingTrack(
}
}
if (allWired) {
- dg.timestampFinished = TalerPreciseTimestamp.now();
+ dg.timestampFinished = timestampPreciseToDb(
+ TalerPreciseTimestamp.now(),
+ );
dg.operationStatus = DepositOperationStatus.Finished;
await tx.depositGroups.put(dg);
}
@@ -1375,7 +1380,9 @@ export async function createDepositGroup(
amount: contractData.amount,
noncePriv: noncePair.priv,
noncePub: noncePair.pub,
- timestampCreated: AbsoluteTime.toPreciseTimestamp(now),
+ timestampCreated: timestampPreciseToDb(
+ AbsoluteTime.toPreciseTimestamp(now),
+ ),
timestampFinished: undefined,
statusPerCoin: payCoinSel.coinSel.coinPubs.map(
() => DepositElementStatus.DepositPending,
@@ -1388,7 +1395,9 @@ export async function createDepositGroup(
counterpartyEffectiveDepositAmount: Amounts.stringify(
counterpartyEffectiveDepositAmount,
),
- wireTransferDeadline: contractTerms.wire_transfer_deadline,
+ wireTransferDeadline: timestampProtocolToDb(
+ contractTerms.wire_transfer_deadline,
+ ),
wire: {
payto_uri: req.depositPaytoUri,
salt: wireSalt,