From f93bd51499ed34844b666bf6d333227adf4368bf Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Thu, 15 Dec 2022 17:11:24 -0300
Subject: wxApi from context and using the new testing sdk

---
 packages/taler-wallet-webextension/src/wallet/History.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/wallet/History.tsx')

diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx b/packages/taler-wallet-webextension/src/wallet/History.tsx
index 4b9c5c711..50f634f52 100644
--- a/packages/taler-wallet-webextension/src/wallet/History.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/History.tsx
@@ -33,13 +33,13 @@ import {
 } from "../components/styled/index.js";
 import { Time } from "../components/Time.js";
 import { TransactionItem } from "../components/TransactionItem.js";
+import { useBackendContext } from "../context/backend.js";
 import { useTranslationContext } from "../context/translation.js";
 import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
 import { Button } from "../mui/Button.js";
 import { NoBalanceHelp } from "../popup/NoBalanceHelp.js";
 import DownloadIcon from "../svg/download_24px.svg";
 import UploadIcon from "../svg/upload_24px.svg";
-import { wxApi } from "../wxApi.js";
 
 interface Props {
   currency?: string;
@@ -52,13 +52,14 @@ export function HistoryPage({
   goToWalletDeposit,
 }: Props): VNode {
   const { i18n } = useTranslationContext();
+  const api = useBackendContext();
   const state = useAsyncAsHook(async () => ({
-    b: await wxApi.wallet.call(WalletApiOperation.GetBalances, {}),
-    tx: await wxApi.wallet.call(WalletApiOperation.GetTransactions, {}),
+    b: await api.wallet.call(WalletApiOperation.GetBalances, {}),
+    tx: await api.wallet.call(WalletApiOperation.GetTransactions, {}),
   }));
 
   useEffect(() => {
-    return wxApi.listener.onUpdateNotification(
+    return api.listener.onUpdateNotification(
       [NotificationType.WithdrawGroupFinished],
       state?.retry,
     );
-- 
cgit v1.2.3

