From 3dd1047b085fa7795f322c5829f39208465bff13 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 29 Mar 2022 09:58:06 -0300 Subject: added react eslint and fix most of the warns --- packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts') diff --git a/packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts b/packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts index 14af7c0aa..4e7cab393 100644 --- a/packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts +++ b/packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts @@ -28,7 +28,7 @@ export function useProviderStatus(url: string): ProviderStatus | undefined { const [status, setStatus] = useState(undefined); useEffect(() => { - async function run() { + async function run(): Promise { //create a first list of backup info by currency const status = await wxApi.getBackupInfo(); @@ -37,13 +37,13 @@ export function useProviderStatus(url: string): ProviderStatus | undefined { ); const info = providers.length ? providers[0] : undefined; - async function sync() { + async function sync(): Promise { if (info) { await wxApi.syncOneProvider(info.syncProviderBaseUrl); } } - async function remove() { + async function remove(): Promise { if (info) { await wxApi.removeProvider(info.syncProviderBaseUrl); } @@ -52,7 +52,7 @@ export function useProviderStatus(url: string): ProviderStatus | undefined { setStatus({ info, sync, remove }); } run(); - }, []); + }); return status; } -- cgit v1.2.3