diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-29 09:58:06 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-29 10:04:33 -0300 |
commit | 3dd1047b085fa7795f322c5829f39208465bff13 (patch) | |
tree | 19340ca9420466e7059849dbf7013901733c0fde /packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts | |
parent | cb18b9813e5df6e315dfb1827f5f7cf304977390 (diff) |
added react eslint and fix most of the warns
Diffstat (limited to 'packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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<ProviderStatus | undefined>(undefined); useEffect(() => { - async function run() { + async function run(): Promise<void> { //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<void> { if (info) { await wxApi.syncOneProvider(info.syncProviderBaseUrl); } } - async function remove() { + async function remove(): Promise<void> { 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; } |