aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/History.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-11-13 13:18:55 -0300
committerSebastian <sebasjm@gmail.com>2023-11-13 15:33:28 -0300
commit23e567b6a78bb9590e4c6f3aa193dc2192c705cf (patch)
tree80fc43b8349ba6492911a371c4049b81b769a5a2 /packages/taler-wallet-webextension/src/wallet/History.tsx
parent7033150c842f998f1f532d7142bdfa636d4576c4 (diff)
downloadwallet-core-23e567b6a78bb9590e4c6f3aa193dc2192c705cf.tar.xz
remove icon, fix dates
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/History.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/History.tsx15
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx b/packages/taler-wallet-webextension/src/wallet/History.tsx
index 56d0ef7bd..dcc3c43e3 100644
--- a/packages/taler-wallet-webextension/src/wallet/History.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/History.tsx
@@ -42,6 +42,7 @@ import { Button } from "../mui/Button.js";
import { NoBalanceHelp } from "../popup/NoBalanceHelp.js";
import DownloadIcon from "../svg/download_24px.inline.svg";
import UploadIcon from "../svg/upload_24px.inline.svg";
+import { getDate, startOfDay } from "date-fns";
interface Props {
currency?: string;
@@ -154,14 +155,14 @@ export function HistoryView({
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) {
- if (!rv[theDate]) {
- rv[theDate] = [];
- datesWithTransaction.push(String(theDate));
+ const startDay =
+ x.timestamp.t_s === "never" ? 0 : startOfDay(x.timestamp.t_s * 1000).getTime();
+ if (startDay) {
+ if (!rv[startDay]) {
+ rv[startDay] = [];
+ datesWithTransaction.push(String(startDay));
}
- rv[theDate].push(x);
+ rv[startDay].push(x);
}
return rv;