summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/components/PendingTransactions.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/components/PendingTransactions.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx b/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx
index 5d5dae092..85b43fb4e 100644
--- a/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx
+++ b/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx
@@ -22,11 +22,11 @@ import {
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { Fragment, h, JSX, VNode } from "preact";
import { useEffect } from "preact/hooks";
+import { useBackendContext } from "../context/backend.js";
import { useTranslationContext } from "../context/translation.js";
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
import { Avatar } from "../mui/Avatar.js";
import { Typography } from "../mui/Typography.js";
-import { wxApi } from "../wxApi.js";
import Banner from "./Banner.js";
import { Time } from "./Time.js";
@@ -35,12 +35,13 @@ interface Props extends JSX.HTMLAttributes {
}
export function PendingTransactions({ goToTransaction }: Props): VNode {
+ const api = useBackendContext();
const state = useAsyncAsHook(() =>
- wxApi.wallet.call(WalletApiOperation.GetTransactions, {}),
+ api.wallet.call(WalletApiOperation.GetTransactions, {}),
);
useEffect(() => {
- return wxApi.listener.onUpdateNotification(
+ return api.listener.onUpdateNotification(
[NotificationType.WithdrawGroupFinished],
state?.retry,
);