From d34eeb5c8c90c7143922b303cf3a7dbc2357246c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 11 Apr 2022 18:00:28 -0300 Subject: using the test to fine tune the withdraw process --- packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts') diff --git a/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts b/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts index 51123d154..e592073dd 100644 --- a/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts +++ b/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts @@ -42,7 +42,7 @@ export interface HookOperationalError { export type HookResponse = HookOk | HookError | undefined; export function useAsyncAsHook( - fn: () => Promise, + fn: () => Promise, updateOnNotification?: Array, deps?: any[], ): HookResponse { @@ -57,6 +57,7 @@ export function useAsyncAsHook( async function doAsync(): Promise { try { const response = await args.fn(); + if (response === false) return; setHookResponse({ hasError: false, response }); } catch (e) { if (e instanceof TalerError) { -- cgit v1.2.3