Skip to content

Commit

Permalink
fix: set date in advance to prevent multiple requests from the same a…
Browse files Browse the repository at this point in the history
…ddress

Signed-off-by: 170210 <[email protected]>
  • Loading branch information
170210 committed Feb 27, 2024
1 parent 6c61033 commit 19251b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/faucet/src/api/webserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 19251b9

Please sign in to comment.