Merge pull request #1561 from 170210/fix_captcha

fix: set date in advance during faucet to prevent multiple requests from the same address
This commit is contained in:
Simon Warta 2024-02-27 14:33:41 +01:00 committed by GitHub
commit 11ce1223f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,9 +83,9 @@ export class Webserver {
}
try {
await faucet.credit(address, matchingDenom);
// Count addresses to prevent draining
this.addressCounter.set(address, new Date());
await faucet.credit(address, matchingDenom);
} catch (e) {
console.error(e);
throw new HttpError(500, "Sending tokens failed");