Skip to content

Commit 19251b9

Browse files
committed
fix: set date in advance to prevent multiple requests from the same address
Signed-off-by: 170210 <[email protected]>
1 parent 6c61033 commit 19251b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/faucet/src/api/webserver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ export class Webserver {
8383
}
8484

8585
try {
86-
await faucet.credit(address, matchingDenom);
8786
// Count addresses to prevent draining
8887
this.addressCounter.set(address, new Date());
88+
await faucet.credit(address, matchingDenom);
8989
} catch (e) {
9090
console.error(e);
9191
throw new HttpError(500, "Sending tokens failed");

0 commit comments

Comments
 (0)