mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-07 13:00:59 +08:00
fix: prevent panic on empty trader ID
This commit is contained in:
4
main.go
4
main.go
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user