Merge pull request #140 from mCaptcha/fix-134

fix: typecast BigInt to number in progress computation
This commit is contained in:
Aravinth Manivannan 2024-02-22 19:21:03 +05:30 committed by GitHub
commit 1c9e242d7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -94,7 +94,7 @@ export const solveCaptchaRunner = async (e: Event): Promise<void> => {
}
if (resp.type === "progress") {
if (width < 80) {
width = (resp.nonce / max_recorded_nonce) * 100;
width = Number(resp.nonce / max_recorded_nonce) * 100;
setWidth(width);
}
console.log(`received nonce ${resp.nonce}`);