summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wxBackend.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-03-08 15:36:50 -0300
committerSebastian <sebasjm@gmail.com>2024-03-08 15:39:59 -0300
commite92440e257b4df4a232a28701143a4f9db730458 (patch)
tree85c8bc084cf0089de9b7034de6f9db82d58e308e /packages/taler-wallet-webextension/src/wxBackend.ts
parent8dea5ac8f41e1d17163a08ba203f15ec372cd442 (diff)
downloadwallet-core-e92440e257b4df4a232a28701143a4f9db730458.tar.gz
wallet-core-e92440e257b4df4a232a28701143a4f9db730458.tar.bz2
wallet-core-e92440e257b4df4a232a28701143a4f9db730458.zip
fix #8489
Diffstat (limited to 'packages/taler-wallet-webextension/src/wxBackend.ts')
-rw-r--r--packages/taler-wallet-webextension/src/wxBackend.ts21
1 files changed, 6 insertions, 15 deletions
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<WalletEvent[]> {
}
async function clearNotifications(): Promise<void> {
- 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<void> {
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()) {