Files
pezkuwi-telegram-miniapp/supabase
SatoshiQaziMuhammed a91d455bfb fix(check-deposits): pace TronGrid calls and retry 429 so later users are checked (#33)
check-deposits polls every user's TRC20 address each minute in unpaced
batches of 8. Since the previous change logged TronGrid failures, two
consecutive runs showed HTTP 429 from about the 24th request on: deposit
indexes 24-53, 30 of 53 users, were skipped on every run, so their TRC20
deposits were never seen. The old code returned silently on a non-2xx reply.

- batches start at least 1.1 s apart
- a 429 is retried twice, after 1 s and 2 s
- per-user failures, including thrown errors, are logged and returned in
  result.errors instead of being dropped

Deposits are found from the last 20 transfers per address and deduplicated
by tx_hash, so once users are checked again a skipped deposit is picked up
on the next run.
2026-10-18 06:28:27 +04:00
..