mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-03-30 15:08:29 +00:00
fix wasm bigint progress handler
This commit is contained in:
parent
f67fdf917e
commit
cba056aba6
@ -94,7 +94,7 @@ export const solveCaptchaRunner = async (e: Event): Promise<void> => {
|
||||
}
|
||||
if (resp.type === "progress") {
|
||||
if (width < 80) {
|
||||
width = Number(resp.nonce / max_recorded_nonce) * 100;
|
||||
width = resp.nonce / max_recorded_nonce * 100;
|
||||
setWidth(width);
|
||||
}
|
||||
console.log(`received nonce ${resp.nonce}`);
|
||||
|
@ -30,7 +30,7 @@ const prove = async (
|
||||
config.string,
|
||||
config.difficulty_factor,
|
||||
STEPS,
|
||||
progress
|
||||
(nonce: BigInt | number) => progress(Number(nonce))
|
||||
);
|
||||
const t1 = performance.now();
|
||||
time = t1 - t0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user