aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/payments.ts19
1 files changed, 12 insertions, 7 deletions
diff --git a/routes/payments.ts b/routes/payments.ts
index 80ef56bb..011aabb4 100644
--- a/routes/payments.ts
+++ b/routes/payments.ts
@@ -747,13 +747,18 @@ export default {
try {
res.send(await build({ ...body, user }));
} catch (e) {
- warn(
- "problem estimating fee",
- e.message,
- user.username,
- body.amount,
- body.address,
- );
+ // Bots retry the same doomed withdrawal every few seconds; log once
+ // per user per 10 minutes.
+ const n = quiet(`feefail:${user.id}`);
+ if (n !== null)
+ warn(
+ "problem estimating fee",
+ e.message,
+ user.username,
+ body.amount,
+ body.address,
+ suppressed(n),
+ );
let msg = e.message;
if (msg.includes("500")) msg = "";
bail(res, `Failed to prepare transaction ${msg}`);