fix(trader): stop swallowing critical errors in order paths

- check CancelAllOrders errors in okx/kucoin/bitget/gate open/close paths
  (aligns with existing binance/hyperliquid/aster/bybit pattern)
- log saveDecision failures in auto_trader_loop instead of discarding
- remove dead MustNormalizeTimeframe that panicked in market package
- web: npm audit fix resolves react-router HIGH CVEs (GHSA-49rj-9fvp-4h2h,
  GHSA-2j2x-hqr9-3h42, GHSA-8x6r-g9mw-2r78, GHSA-rxv8-25v2-qmq8)
This commit is contained in:
tinkle-community
2026-06-11 00:12:58 +08:00
parent 220cb7428b
commit 094ab45476
7 changed files with 55 additions and 32 deletions

View File

@@ -43,15 +43,6 @@ func TFDuration(tf string) (time.Duration, error) {
return supportedTimeframes[norm], nil
}
// MustNormalizeTimeframe is similar to NormalizeTimeframe, but panics when unsupported.
func MustNormalizeTimeframe(tf string) string {
norm, err := NormalizeTimeframe(tf)
if err != nil {
panic(err)
}
return norm
}
// SupportedTimeframes returns all supported timeframes (sorted slice).
func SupportedTimeframes() []string {
keys := make([]string, 0, len(supportedTimeframes))