fix: set date in advance to prevent multiple requests from the same address
Signed-off-by: 170210 <j170210@icloud.com>
This commit is contained in:
parent
6c610331d4
commit
19251b9f34
@ -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");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user