fix: use user charges on req

This commit is contained in:
Sophie Calixto authored and GitHub committed 2025-08-13 09:27:54 -03:00
1 parent 3af750cd70
commit 3ceec4c186
1 file changed
+2 -2
+2 -2
View File
@@ -1218,7 +1218,7 @@
localY: y,
});
if (pixelBatch.length >= 60) {
if (pixelBatch.length >= Math.floor(state.currentCharges)) {
const success = await sendPixelBatch(pixelBatch, regionX, regionY);
if (success === "token_error") {
@@ -1244,7 +1244,7 @@
pixelBatch = [];
if (state.currentCharges < 60) {
if (state.currentCharges < 1) {
updateUI("noCharges", "warning", {
time: Utils.formatTime(state.cooldown),
});