Address PR #15 round 2: fail-closed admin guard, sync init, error reporting

1. /refresh now fail-closed: rejects all if ADMIN_CHAT_ID unset or invalid
2. Initial pair cache fill is synchronous — bot waits before accepting queries
3. /refresh reports failure when API fetch fails instead of always saying success

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
thuanleandClaude Opus 4.7 committed 2026-04-26 16:03:22 +07:00
1 parent c7128ff516
commit 914beea5ce
4 files changed
+15 -9

No files matched your search

+1 -1
View File
@@ -17,5 +17,5 @@ type IMarket interface {
// Trading pair methods
IsSpotPair(symbol string) bool
IsFuturesPair(symbol string) bool
RefreshTradingPairCache()
RefreshTradingPairCache() error
}