Relax DEV balance thresholds to silence cron alerts#190
Merged
Conversation
DEV wallets carry test funds (sub-dollar amounts), so the PRD thresholds (1000 USDT, 0.1 cBTC, 1 BTC Lightning capacity) fire LOW alerts on every 5-min tick. Keep the same asset list on DEV but with min=0 / max=Infinity so balance < min and balance > max are never satisfied — the cron, RPC balance fetch and Telegram pipeline stay exercised on DEV with no noise. PRD list is unchanged.
Address review: requirement was to lower DEV min thresholds, not to also disable HIGH alerts. minBalance=0 silences LOW alerts (balance < 0 is never satisfied for non-negative wallet balances) while leaving the maxBalance bounds as-is so HIGH alerts still fire if a DEV wallet ever overshoots the PRD-shaped ceiling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BalanceAlertServicefully wired on DEV (cron tick, RPC balance fetch, Telegram pipeline all still exercised) but with permissive thresholds so no LOW/HIGH alert ever fires.PRD_BALANCE_THRESHOLDSwithminBalance: 0andmaxBalance: Number.POSITIVE_INFINITY. Adding a new asset to PRD automatically picks it up on DEV with no-op bounds.Why this instead of an empty array
DEV is the integration-test environment for the alerting code path itself — Boltz/RPC reads, Telegram send. An empty list would skip the entire
checkAndAlertloop and hide regressions in the surrounding code.Test plan
npm run lintcleannpm run buildcleanSent ... alertlines, no Telegram messages to@lds_balance_alerts_dev_botdevelop → main): alerts continue to fire on threshold violations