From 65e6a8caa0de98632ad99cca35bf98bffe663dff Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 25 Apr 2022 22:37:41 -0300
Subject: useAsync new API

---
 packages/taler-wallet-webextension/src/wallet/Settings.tsx | 10 +++-------
 1 file changed, 3 insertions(+), 7 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 9a41bcc25..eefa5f385 100644
--- a/packages/taler-wallet-webextension/src/wallet/Settings.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Settings.tsx
@@ -29,7 +29,7 @@ import {
 } from "../components/styled/index.js";
 import { useDevContext } from "../context/devContext.js";
 import { useTranslationContext } from "../context/translation.js";
-import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
+import { useAsyncAsHook2 } from "../hooks/useAsyncAsHook.js";
 import { useBackupDeviceName } from "../hooks/useBackupDeviceName.js";
 import { useExtendedPermissions } from "../hooks/useExtendedPermissions.js";
 import { Pages } from "../NavigationBar.js";
@@ -40,13 +40,11 @@ export function SettingsPage(): VNode {
   const [permissionsEnabled, togglePermissions] = useExtendedPermissions();
   const { devMode, toggleDevMode } = useDevContext();
   const { name, update } = useBackupDeviceName();
-  // const [lang, changeLang] = useLang();
-  const exchangesHook = useAsyncAsHook(wxApi.listExchanges);
+
+  const exchangesHook = useAsyncAsHook2(wxApi.listExchanges);
 
   return (
     <SettingsView
-      // lang={lang}
-      // changeLang={changeLang}
       knownExchanges={
         !exchangesHook || exchangesHook.hasError
           ? []
@@ -63,8 +61,6 @@ export function SettingsPage(): VNode {
 }
 
 export interface ViewProps {
-  // lang: string;
-  // changeLang: (s: string) => void;
   deviceName: string;
   setDeviceName: (s: string) => Promise<void>;
   permissionsEnabled: boolean;
-- 
cgit v1.2.3

