fix: typecast BigInt to number in progress computation

closes: https://github.com/mCaptcha/mCaptcha/issues/134
This commit is contained in:
Aravinth Manivannan 2024-02-22 18:40:38 +05:30
parent 3cd38511fa
commit 3cb0ca38ec
No known key found for this signature in database
GPG key ID: F8F50389936984FF

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}`);