From 9dbf0bd7d2dc9353aa210a0c33faf0a5c5086f73 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 21 Jun 2023 14:51:14 -0300
Subject: better wording to the tx details

---
 packages/taler-wallet-webextension/src/wallet/History.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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

diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx b/packages/taler-wallet-webextension/src/wallet/History.tsx
index a16590fe8..900218991 100644
--- a/packages/taler-wallet-webextension/src/wallet/History.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/History.tsx
@@ -152,16 +152,20 @@ export function HistoryView({
       ? []
       : transactionByCurrency[selectedCurrency] ?? [];
 
+  const datesWithTransaction: string[] = [];
   const byDate = ts.reduce((rv, x) => {
     const theDate =
       x.timestamp.t_s === "never" ? 0 : normalizeToDay(x.timestamp.t_s * 1000);
     if (theDate) {
-      (rv[theDate] = rv[theDate] || []).push(x);
+      if (!rv[theDate]) {
+        rv[theDate] = [];
+        datesWithTransaction.push(String(theDate));
+      }
+      rv[theDate].push(x);
     }
 
     return rv;
   }, {} as { [x: string]: Transaction[] });
-  const datesWithTransaction = Object.keys(byDate);
 
   if (balances.length === 0 || !selectedCurrency) {
     return (
-- 
cgit v1.2.3

