mindesbunister
29fce0176f
fix: Correct order filtering to prevent false '32 orders' count
Problem: Bot reported '32 open orders' when Drift UI showed 0 orders
Root Cause: Filter checked orderId > 0 but didn't verify baseAssetAmount
Impact: Misleading logs suggesting ghost order accumulation
Fix: Enhanced filter with proper empty slot detection:
- Check orderId exists and is non-zero
- Check baseAssetAmount exists and is non-zero (BN comparison)
- Added logging to show: 'Found X orders (checked 32 total slots)'
Result: Bot now correctly reports 0 orders when none exist
Verification: Container restart shows no false positives
Files: lib/drift/orders.ts (cancelAllOrders function)
2025-11-21 16:44:04 +01:00
..
2025-11-20 10:35:04 +01:00
2025-11-21 09:47:00 +01:00
2025-11-21 16:44:04 +01:00
2025-11-19 18:07:07 +01:00
2025-11-21 09:47:00 +01:00
2025-11-21 15:49:26 +01:00
2025-11-21 09:47:00 +01:00