aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/History.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/History.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/History.tsx11
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx b/packages/taler-wallet-webextension/src/wallet/History.tsx
index 143d3adbb..1d51f835a 100644
--- a/packages/taler-wallet-webextension/src/wallet/History.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/History.tsx
@@ -23,7 +23,7 @@ import {
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { Fragment, h, VNode } from "preact";
import { useEffect, useState } from "preact/hooks";
-import { AlertView } from "../components/CurrentAlerts.js";
+import { ErrorAlertView } from "../components/CurrentAlerts.js";
import { Loading } from "../components/Loading.js";
import {
CenteredBoldText,
@@ -33,7 +33,7 @@ import {
} from "../components/styled/index.js";
import { Time } from "../components/Time.js";
import { TransactionItem } from "../components/TransactionItem.js";
-import { alertFromError } from "../context/alert.js";
+import { alertFromError, useAlertContext } from "../context/alert.js";
import { useBackendContext } from "../context/backend.js";
import { useTranslationContext } from "../context/translation.js";
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
@@ -72,8 +72,8 @@ export function HistoryPage({
if (state.hasError) {
return (
- <AlertView
- alert={alertFromError(
+ <ErrorAlertView
+ error={alertFromError(
i18n.str`Could not load the list of transactions`,
state,
)}
@@ -112,6 +112,7 @@ export function HistoryView({
}): VNode {
const { i18n } = useTranslationContext();
const currencies = balances.map((b) => b.available.split(":")[0]);
+ const { pushAlertOnError } = useAlertContext();
const defaultCurrencyIndex = currencies.findIndex(
(c) => c === defaultCurrency,
@@ -145,7 +146,7 @@ export function HistoryView({
return (
<NoBalanceHelp
goToWalletManualWithdraw={{
- onClick: goToWalletManualWithdraw,
+ onClick: pushAlertOnError(goToWalletManualWithdraw),
}}
/>
);