Skip to content

Commit 23eb300

Browse files
Merge pull request #10 from ava-labs/hotfix
Minimizing captcha score and failed Tx handling
2 parents 5c38adf + ed42d46 commit 23eb300

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

middlewares/verifyCaptcha.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class VerifyCaptcha {
1717
const data = response?.data;
1818

1919
if(data?.success) {
20-
if(data?.score > 0.6) {
20+
if(data?.score >= 0.3) {
2121
return true;
2222
}
2323
}

vms/evm.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,14 @@ export default class EVM {
156156
this.pendingTxNonces.delete(nonce);
157157
} catch (err: any) {
158158
console.log(err.message);
159-
console.log(`Error with nonce ${nonce} while sending signed transaction.`);
159+
console.log(`Error with nonce ${nonce} while sending signed transaction on ${this.NAME}.`);
160+
if(err.message.includes("nonce too low")) {
161+
console.log(`Nonce too low: Dropping transaction with nonce ${nonce} on ${this.NAME}`)
162+
this.pendingTxNonces.delete(nonce);
163+
} else {
164+
console.log("Re-sending tx to faucet address");
165+
this.sendTokenUtil(0, this.account.address, nonce)
166+
}
160167
}
161168
}
162169

0 commit comments

Comments
 (0)