From f8d12f7b0d4af1b1769b89e80c87f9c169678564 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 18 Mar 2022 15:32:41 +0100 Subject: wallet: t_s/d_us migration --- .../src/wallet/BackupPage.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet/BackupPage.tsx') diff --git a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx index e1d34748b..8c12201b9 100644 --- a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, see */ -import { Timestamp, Translate } from "@gnu-taler/taler-util"; +import { AbsoluteTime, Translate } from "@gnu-taler/taler-util"; import { ProviderInfo, ProviderPaymentPaid, @@ -104,7 +104,13 @@ export function BackupView({ @@ -207,13 +213,13 @@ function ExpirationText({ until }: { until: Timestamp }): VNode { ); } -function colorByTimeToExpire(d: Timestamp): string { +function colorByTimeToExpire(d: AbsoluteTime): string { if (d.t_ms === "never") return "rgb(28, 184, 65)"; const months = differenceInMonths(d.t_ms, new Date()); return months > 1 ? "rgb(28, 184, 65)" : "rgb(223, 117, 20)"; } -function daysUntil(d: Timestamp): string { +function daysUntil(d: AbsoluteTime): string { if (d.t_ms === "never") return ""; const duration = intervalToDuration({ start: d.t_ms, -- cgit v1.2.3