diff options
author | Florian Dold <florian@dold.me> | 2023-05-26 12:19:32 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-05-26 12:19:32 +0200 |
commit | cd8f76db61f4a1ab1a8a8a4d29b2f3e863b59854 (patch) | |
tree | 423ed7c6fc42ec5e05f655eb093b3b4bdc885996 /packages/taler-wallet-core/src/operations/tip.ts | |
parent | 557dcec30db6573c5d11ca26432008ac6621642e (diff) |
taler-util,wallet-core: implement TalerPreciseTimestamp
Fixes #7703
Diffstat (limited to 'packages/taler-wallet-core/src/operations/tip.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/tip.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts index 417f06dc2..524970faa 100644 --- a/packages/taler-wallet-core/src/operations/tip.ts +++ b/packages/taler-wallet-core/src/operations/tip.ts @@ -33,6 +33,7 @@ import { parseTipUri, PrepareTipResult, TalerErrorCode, + TalerPreciseTimestamp, TalerProtocolTimestamp, TipPlanchetDetail, TransactionMajorState, @@ -160,7 +161,7 @@ export async function prepareTip( exchangeBaseUrl: tipPickupStatus.exchange_url, next_url: tipPickupStatus.next_url, merchantBaseUrl: res.merchantBaseUrl, - createdTimestamp: TalerProtocolTimestamp.now(), + createdTimestamp: TalerPreciseTimestamp.now(), merchantTipId: res.merchantTipId, tipAmountEffective: Amounts.stringify(selectedDenoms.totalCoinValue), denomsSel: selectedDenoms, @@ -365,7 +366,7 @@ export async function processTip( if (tr.pickedUpTimestamp) { return; } - tr.pickedUpTimestamp = TalerProtocolTimestamp.now(); + tr.pickedUpTimestamp = TalerPreciseTimestamp.now(); await tx.tips.put(tr); for (const cr of newCoinRecords) { await makeCoinAvailable(ws, tx, cr); @@ -390,7 +391,7 @@ export async function acceptTip( logger.error("tip not found"); return undefined; } - tipRecord.acceptedTimestamp = TalerProtocolTimestamp.now(); + tipRecord.acceptedTimestamp = TalerPreciseTimestamp.now(); await tx.tips.put(tipRecord); return tipRecord; |