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/Settings.tsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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

diff --git a/packages/taler-wallet-webextension/src/wallet/Settings.tsx b/packages/taler-wallet-webextension/src/wallet/Settings.tsx
index c0268a1ae..f00b242d6 100644
--- a/packages/taler-wallet-webextension/src/wallet/Settings.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Settings.tsx
@@ -34,6 +34,7 @@ import {
   SuccessText,
   WarningText,
 } from "../components/styled/index.js";
+import { useBackendContext } from "../context/backend.js";
 import { useDevContext } from "../context/devContext.js";
 import { useTranslationContext } from "../context/translation.js";
 import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
@@ -43,7 +44,6 @@ import { useClipboardPermissions } from "../hooks/useClipboardPermissions.js";
 import { ToggleHandler } from "../mui/handlers.js";
 import { Pages } from "../NavigationBar.js";
 import { platform } from "../platform/api.js";
-import { wxApi } from "../wxApi.js";
 
 const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined;
 
@@ -53,10 +53,11 @@ export function SettingsPage(): VNode {
   const { devModeToggle } = useDevContext();
   const { name, update } = useBackupDeviceName();
   const webex = platform.getWalletWebExVersion();
+  const api = useBackendContext();
 
   const exchangesHook = useAsyncAsHook(async () => {
-    const list = await wxApi.wallet.call(WalletApiOperation.ListExchanges, {});
-    const version = await wxApi.wallet.call(WalletApiOperation.GetVersion, {});
+    const list = await api.wallet.call(WalletApiOperation.ListExchanges, {});
+    const version = await api.wallet.call(WalletApiOperation.GetVersion, {});
     return { exchanges: list.exchanges, version };
   });
   const { exchanges, version } =
-- 
cgit v1.2.3

