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/DepositPage.tsx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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

diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx
index 98328ae4a..2bbd9f2e9 100644
--- a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx
@@ -32,7 +32,7 @@ import {
   WarningBox,
 } from "../components/styled/index.js";
 import { useTranslationContext } from "../context/translation.js";
-import { HookError, useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
+import { HookError, useAsyncAsHook2 } from "../hooks/useAsyncAsHook.js";
 import {
   ButtonHandler,
   SelectFieldHandler,
@@ -98,7 +98,7 @@ export function useComponentState(
   onSuccess: (currency: string) => void,
   api: typeof wxApi,
 ): State {
-  const hook = useAsyncAsHook(async () => {
+  const hook = useAsyncAsHook2(async () => {
     const { balances } = await api.getBalance();
     const { accounts } = await api.listKnownBankAccounts(currency);
     const defaultSelectedAccount =
@@ -117,10 +117,6 @@ export function useComponentState(
 
   const [fee, setFee] = useState<DepositGroupFees | undefined>(undefined);
 
-  // const hookResponse = !hook || hook.hasError ? undefined : hook.response;
-
-  // useEffect(() => {}, [hookResponse]);
-
   if (!hook || hook.hasError) {
     return {
       status: "loading",
-- 
cgit v1.2.3

