fix: prevent panic on empty trader ID

This commit is contained in:
shinchan-zhai
2026-03-23 00:58:04 +08:00
parent 4d3e9c9f2a
commit 1b197cd819

View File

@@ -121,8 +121,10 @@ func main() {
if t.IsRunning {
status = "✅ Running"
}
tid := t.ID
if len(tid) > 8 { tid = tid[:8] }
logger.Infof(" • %s [%s] %s - AI Model: %s, Exchange: %s",
t.Name, t.ID[:8], status, t.AIModelID, t.ExchangeID)
t.Name, tid, status, t.AIModelID, t.ExchangeID)
}
}