summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/BackupPage.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/BackupPage.tsx32
1 files changed, 15 insertions, 17 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx
index 5ae52db6f..8a3710f69 100644
--- a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx
@@ -16,23 +16,22 @@
import {
AbsoluteTime,
- constructRecoveryUri,
- stringifyRestoreUri,
-} from "@gnu-taler/taler-util";
-import {
ProviderInfo,
ProviderPaymentPaid,
ProviderPaymentStatus,
ProviderPaymentType,
- WalletApiOperation,
-} from "@gnu-taler/taler-wallet-core";
+ stringifyRestoreUri,
+} from "@gnu-taler/taler-util";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import { useTranslationContext } from "@gnu-taler/web-util/browser";
import {
differenceInMonths,
formatDuration,
intervalToDuration,
} from "date-fns";
-import { Fragment, h, VNode } from "preact";
+import { Fragment, VNode, h } from "preact";
import { useEffect, useState } from "preact/hooks";
+import { Pages } from "../NavigationBar.js";
import { ErrorAlertView } from "../components/CurrentAlerts.js";
import { Loading } from "../components/Loading.js";
import { QR } from "../components/QR.js";
@@ -48,10 +47,8 @@ import {
} from "../components/styled/index.js";
import { alertFromError } from "../context/alert.js";
import { useBackendContext } from "../context/backend.js";
-import { useTranslationContext } from "@gnu-taler/web-util/browser";
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
import { Button } from "../mui/Button.js";
-import { Pages } from "../NavigationBar.js";
interface Props {
onAddProvider: () => Promise<void>;
@@ -124,6 +121,7 @@ export function BackupPage({ onAddProvider }: Props): VNode {
return (
<ErrorAlertView
error={alertFromError(
+ i18n,
i18n.str`Could not load backup providers`,
status,
)}
@@ -325,12 +323,12 @@ function daysUntil(d: AbsoluteTime): string {
duration?.years
? "years"
: duration?.months
- ? "months"
- : duration?.days
- ? "days"
- : duration.hours
- ? "hours"
- : "minutes",
+ ? "months"
+ : duration?.days
+ ? "days"
+ : duration.hours
+ ? "hours"
+ : "minutes",
],
});
return `${str}`;
@@ -353,6 +351,6 @@ function getStatusPaidOrder(
return a.paidUntil.t_ms === "never"
? -1
: b.paidUntil.t_ms === "never"
- ? 1
- : a.paidUntil.t_ms - b.paidUntil.t_ms;
+ ? 1
+ : a.paidUntil.t_ms - b.paidUntil.t_ms;
}