From e92440e257b4df4a232a28701143a4f9db730458 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 8 Mar 2024 15:36:50 -0300 Subject: fix #8489 --- packages/taler-wallet-webextension/src/wxBackend.ts | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wxBackend.ts') diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts b/packages/taler-wallet-webextension/src/wxBackend.ts index 195e05687..44e4c0d48 100644 --- a/packages/taler-wallet-webextension/src/wxBackend.ts +++ b/packages/taler-wallet-webextension/src/wxBackend.ts @@ -49,14 +49,11 @@ import { exportDb, importDb, } from "@gnu-taler/taler-wallet-core"; -import { - BrowserHttpLib, - ServiceWorkerHttpLib, -} from "@gnu-taler/web-util/browser"; import { MessageFromFrontend, MessageResponse } from "./platform/api.js"; import { platform } from "./platform/background.js"; import { ExtensionOperations } from "./taler-wallet-interaction-loader.js"; import { BackgroundOperations, WalletEvent } from "./wxApi.js"; +import { BrowserFetchHttpLib } from "@gnu-taler/web-util/browser"; /** * Currently active wallet instance. Might be unloaded and @@ -101,7 +98,7 @@ async function getNotifications(): Promise { } async function clearNotifications(): Promise { - notifications.splice(0,notifications.length) + notifications.splice(0, notifications.length) } @@ -242,7 +239,7 @@ async function dispatch< error: makeErrorDetail( TalerErrorCode.WALLET_CORE_NOT_AVAILABLE, { lastError }, - `wallet core not available${!lastError ? "": `,last error: ${lastError.hint}`}`, + `wallet core not available${!lastError ? "" : `,last error: ${lastError.hint}`}`, ), }; } @@ -279,15 +276,9 @@ async function reinitWallet(): Promise { let timer; const httpFactory = (): HttpRequestLibrary => { - if (platform.useServiceWorkerAsBackgroundProcess()) { - return new ServiceWorkerHttpLib({ - // enableThrottling: false, - }); - } else { - return new BrowserHttpLib({ - // enableThrottling: false, - }); - } + return new BrowserFetchHttpLib({ + // enableThrottling: false, + }); }; if (platform.useServiceWorkerAsBackgroundProcess()) { -- cgit v1.2.3