fix: harden drift verifier and validation flow

This commit is contained in:
mindesbunister
2025-12-10 15:05:44 +01:00
parent 0a45279c64
commit 4e286c91ef
12 changed files with 620 additions and 579 deletions

View File

@@ -349,7 +349,8 @@ export class PositionManager {
this.activeTrades.delete(tradeId)
}
} catch (error) {
console.error('❌ Error checking Drift position during trade removal:', error)
const errorMessage = `❌ Error checking Drift position during trade removal: ${error instanceof Error ? error.message : String(error)}`
console.error(errorMessage)
console.warn('⚠️ Removing from tracking without canceling orders (safety first)')
// On error, err on side of caution - don't cancel orders