diff options
Diffstat (limited to 'packages/taler-wallet-webextension')
3 files changed, 22 insertions, 10 deletions
diff --git a/packages/taler-wallet-webextension/manifest-common.json b/packages/taler-wallet-webextension/manifest-common.json index 36c4b74a9..f82ab5096 100644 --- a/packages/taler-wallet-webextension/manifest-common.json +++ b/packages/taler-wallet-webextension/manifest-common.json @@ -2,8 +2,8 @@ "name": "GNU Taler Wallet (git)", "description": "Privacy preserving and transparent payments", "author": "GNU Taler Developers", - "version": "0.9.0.25", - "version_name": "0.9.0-dev.25", + "version": "0.9.0.27", + "version_name": "0.9.0-dev.27", "icons": { "16": "static/img/taler-logo-16.png", "19": "static/img/taler-logo-19.png", diff --git a/packages/taler-wallet-webextension/src/browserWorkerEntry.ts b/packages/taler-wallet-webextension/src/browserWorkerEntry.ts index 1b6cfc455..2f1a26e36 100644 --- a/packages/taler-wallet-webextension/src/browserWorkerEntry.ts +++ b/packages/taler-wallet-webextension/src/browserWorkerEntry.ts @@ -22,8 +22,11 @@ * Imports. */ -import { Logger } from "@gnu-taler/taler-util"; -import { nativeCrypto } from "@gnu-taler/taler-wallet-core"; +import { j2s, Logger } from "@gnu-taler/taler-util"; +import { + getErrorDetailFromException, + nativeCrypto, +} from "@gnu-taler/taler-wallet-core"; const logger = new Logger("browserWorkerEntry.ts"); @@ -41,13 +44,22 @@ async function handleRequest( return; } + logger.info(`browser worker crypto request: ${j2s(req)}`); + + let responseMsg: any; try { - const result = await (impl as any)[operation](req); - worker.postMessage({ result, id }); - } catch (e) { - logger.error("error during operation", e); - return; + const result = await (impl as any)[operation](impl, req); + responseMsg = { type: "success", result, id }; + } catch (e: any) { + logger.error(`error during operation: ${e.stack ?? e.toString()}`); + responseMsg = { + type: "error", + id, + error: getErrorDetailFromException(e), + }; } + + worker.postMessage(responseMsg); } worker.onmessage = (msg: MessageEvent) => { diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts b/packages/taler-wallet-webextension/src/wxBackend.ts index 1dc6343c5..9581abc56 100644 --- a/packages/taler-wallet-webextension/src/wxBackend.ts +++ b/packages/taler-wallet-webextension/src/wxBackend.ts @@ -217,7 +217,7 @@ async function reinitWallet(): Promise<void> { timer = new SetTimeoutTimerAPI(); } else { httpLib = new BrowserHttpLib(); - cryptoWorker = new BrowserCryptoWorkerFactory(); + cryptoWorker = new SynchronousCryptoWorkerFactory(); timer = new SetTimeoutTimerAPI(); } |