mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 01:55:40 +00:00
Load pow-sha256 polyfill to support browsers that aren't capable of
executing WASM
This commit is contained in:
@@ -19,12 +19,12 @@ import { PoWConfig, ServiceWorkerWork } from "./types";
|
||||
import log from "../logger";
|
||||
|
||||
log.log("worker registered");
|
||||
onmessage = (e) => {
|
||||
onmessage = async (e) => {
|
||||
console.debug("message received at worker");
|
||||
const config: PoWConfig = e.data;
|
||||
|
||||
const t0 = performance.now();
|
||||
const work = prove(config);
|
||||
const work = await prove(config);
|
||||
|
||||
const t1 = performance.now();
|
||||
const duration = t1 - t0;
|
||||
|
||||
Reference in New Issue
Block a user