From 335d22b12b3d8ed1a14d39bf8ca17faade9ca34c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 10 Jan 2023 17:11:34 -0300 Subject: when as number instead of string, fix codec used before declaration, pretty --- packages/taler-wallet-core/src/errors.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-core/src/errors.ts') diff --git a/packages/taler-wallet-core/src/errors.ts b/packages/taler-wallet-core/src/errors.ts index 308e9c7a8..7dbba2e2e 100644 --- a/packages/taler-wallet-core/src/errors.ts +++ b/packages/taler-wallet-core/src/errors.ts @@ -24,6 +24,7 @@ * Imports. */ import { + AbsoluteTime, PayMerchantInsufficientBalanceDetails, PayPeerInsufficientBalanceDetails, TalerErrorCode, @@ -103,7 +104,7 @@ export function makeErrorDetail( if (!hint && !(detail as any).hint) { hint = getDefaultHint(code); } - const when = new Date().toISOString(); + const when = AbsoluteTime.now(); return { code, when, hint, ...detail }; } @@ -161,7 +162,7 @@ export class TalerError extends Error { if (!hint) { hint = getDefaultHint(code); } - const when = new Date().toISOString(); + const when = AbsoluteTime.now(); return new TalerError({ code, when, hint, ...detail }); } -- cgit v1.2.3