From cd8f76db61f4a1ab1a8a8a4d29b2f3e863b59854 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian@dold.me>
Date: Fri, 26 May 2023 12:19:32 +0200
Subject: taler-util,wallet-core: implement TalerPreciseTimestamp

Fixes #7703
---
 packages/taler-wallet-webextension/src/wallet/Transaction.tsx | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx')

diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index 9541cc33f..39175186f 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -25,6 +25,7 @@ import {
   parsePaytoUri,
   PaytoUri,
   stringifyPaytoUri,
+  TalerPreciseTimestamp,
   TalerProtocolTimestamp,
   Transaction,
   TransactionDeposit,
@@ -585,7 +586,7 @@ export function TransactionView({
                           on{" "}
                           {
                             <Time
-                              timestamp={AbsoluteTime.fromTimestamp(
+                              timestamp={AbsoluteTime.fromProtocolTimestamp(
                                 r.timestamp,
                               )}
                               format="dd MMMM yyyy"
@@ -671,7 +672,7 @@ export function TransactionView({
   if (transaction.type === TransactionType.Deposit) {
     const payto = parsePaytoUri(transaction.targetPaytoUri);
 
-    const wireTime = AbsoluteTime.fromTimestamp(
+    const wireTime = AbsoluteTime.fromProtocolTimestamp(
       transaction.wireTransferDeadline,
     );
     const shouldBeWired = wireTime.t_ms !== "never" && isPast(wireTime.t_ms);
@@ -1204,7 +1205,7 @@ function DeliveryDetails({
             </td>
             <td>
               <Time
-                timestamp={AbsoluteTime.fromTimestamp(date)}
+                timestamp={AbsoluteTime.fromProtocolTimestamp(date)}
                 format="dd MMMM yyyy, HH:mm"
               />
             </td>
@@ -1768,7 +1769,7 @@ function Header({
   kind,
   type,
 }: {
-  timestamp: TalerProtocolTimestamp;
+  timestamp: TalerPreciseTimestamp;
   total: AmountJson;
   children: ComponentChildren;
   kind: Kind;
@@ -1785,7 +1786,7 @@ function Header({
       <div>
         <SubTitle>{children}</SubTitle>
         <Time
-          timestamp={AbsoluteTime.fromTimestamp(timestamp)}
+          timestamp={AbsoluteTime.fromPreciseTimestamp(timestamp)}
           format="dd MMMM yyyy, HH:mm"
         />
       </div>
-- 
cgit v1.2.3

