firefox hotfix
This commit is contained in:
parent
538f27e9dd
commit
0a3f9979b2
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* Imports.
|
||||
*/
|
||||
import { Logger, TalerErrorCode } from "@gnu-taler/taler-util";
|
||||
import { j2s, Logger, TalerErrorCode } from "@gnu-taler/taler-util";
|
||||
import { TalerError } from "../../errors.js";
|
||||
import { openPromise } from "../../util/promiseUtils.js";
|
||||
import { timer, performanceNow, TimerHandle } from "../../util/timer.js";
|
||||
@ -265,6 +265,7 @@ export class CryptoDispatcher {
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
logger.warn(`bad message: ${j2s(msg)}`);
|
||||
currentWorkItem.reject(new Error("bad message from crypto worker"));
|
||||
}
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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) => {
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user