Skip to content

chore(backend): remove relayer balance-alert Telegram bot#286

Merged
gianalarcon merged 1 commit into
developfrom
chore/disable-relayer-balance-alert-bot
Jun 10, 2026
Merged

chore(backend): remove relayer balance-alert Telegram bot#286
gianalarcon merged 1 commit into
developfrom
chore/disable-relayer-balance-alert-bot

Conversation

@gianalarcon

@gianalarcon gianalarcon commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

What

Removes the backend's daily relayer low-balance Telegram alert bot and its now-orphaned config wiring.

Why

This functionality is now handled by an external scheduled agent (polypay-relayer-balance-weekly) that checks the relayer wallet balance on Base + Horizen mainnet, includes ETH/BTC USD prices, and posts to Telegram — making the in-backend scheduler redundant.

Changes

  • 🗑️ Delete src/balance-alert/*BalanceAlertModule, BalanceAlertScheduler (the @Cron('0 0 * * *') job), and TelegramService.
  • 🔌 Unregister BalanceAlertModule from app.module.ts.
  • 🗑️ Delete src/config/telegram.config.ts and remove it from the ConfigModule load array.
  • 🧹 Remove orphaned TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID entries from config.keys.ts, env.validation.ts, and .env.example.

Safety notes

  • ScheduleModule.forRoot() is kept — still required by transaction-reconciler.scheduler (unsticks stuck txs) and price.scheduler (weekly ZEN price capture).
  • TelegramService had no other consumers (only balance-alert used it).
  • ✅ Post-change grep is clean: no remaining references to balance-alert, TelegramService, or TELEGRAM_*.
  • ℹ️ Runtime TELEGRAM_* env vars on the Cloud Run service are managed out-of-band and unaffected by this PR; they can be cleaned up separately by devops.

Validation

  • Local tsc/build not run (no node_modules in working checkout). Change is deletion-only with verified-clean references; CI yarn build (lint.yaml) will compile-check.

🤖 Generated with Claude Code

Removes the daily relayer low-balance Telegram alert and its orphaned
config wiring. This is replaced by an external scheduled agent that
checks the relayer balance on Base + Horizen mainnet (plus ETH/BTC
prices) and posts to Telegram.

- Delete src/balance-alert/* (module, scheduler, TelegramService)
- Unregister BalanceAlertModule from app.module; keep ScheduleModule
  (still used by transaction-reconciler + price schedulers)
- Delete src/config/telegram.config.ts and drop its load entry
- Remove TELEGRAM_* config keys, env validation, and .env.example block

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Huygon764 Huygon764 force-pushed the chore/disable-relayer-balance-alert-bot branch from 304899f to c905bf8 Compare June 10, 2026 03:01
@gianalarcon gianalarcon merged commit cb90030 into develop Jun 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant