summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Withdraw.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-04-25 23:07:31 -0300
committerSebastian <sebasjm@gmail.com>2022-04-26 11:48:29 -0300
commit41ab855736815d33f5fdbebc896b167c71482eee (patch)
treeb1c61f37f107f8118215483c4945bc942ee45b7a /packages/taler-wallet-webextension/src/cta/Withdraw.tsx
parent65e6a8caa0de98632ad99cca35bf98bffe663dff (diff)
downloadwallet-core-41ab855736815d33f5fdbebc896b167c71482eee.tar.gz
wallet-core-41ab855736815d33f5fdbebc896b167c71482eee.tar.bz2
wallet-core-41ab855736815d33f5fdbebc896b167c71482eee.zip
remove old async hook
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Withdraw.tsx12
1 files changed, 4 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx
index 56c64a6d7..3346512f7 100644
--- a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx
@@ -40,11 +40,7 @@ import {
WalletAction,
} from "../components/styled/index.js";
import { useTranslationContext } from "../context/translation.js";
-import {
- HookError,
- useAsyncAsHook,
- useAsyncAsHook2,
-} from "../hooks/useAsyncAsHook.js";
+import { HookError, useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
import { buildTermsOfServiceState } from "../utils/index.js";
import { ButtonHandler, SelectFieldHandler } from "../mui/handlers.js";
import * as wxApi from "../wxApi.js";
@@ -103,7 +99,7 @@ export function useComponentState(
/**
* Ask the wallet about the withdraw URI
*/
- const uriInfoHook = useAsyncAsHook2(async () => {
+ const uriInfoHook = useAsyncAsHook(async () => {
if (!talerWithdrawUri) throw Error("ERROR_NO-URI-FOR-WITHDRAWAL");
const uriInfo = await api.getWithdrawalDetailsForUri({
@@ -151,7 +147,7 @@ export function useComponentState(
/**
* For the exchange selected, bring the status of the terms of service
*/
- const terms = useAsyncAsHook2(async () => {
+ const terms = useAsyncAsHook(async () => {
if (!thisExchange) return false;
const exchangeTos = await api.getExchangeTos(thisExchange, ["text/xml"]);
@@ -165,7 +161,7 @@ export function useComponentState(
* With the exchange and amount, ask the wallet the information
* about the withdrawal
*/
- const info = useAsyncAsHook2(async () => {
+ const info = useAsyncAsHook(async () => {
if (!thisExchange || !amount) return false;
const info = await api.getExchangeWithdrawalInfo({