fix: Use getPrismaClient() instead of this.prisma in Position Manager
This commit is contained in:
@@ -813,8 +813,9 @@ export class PositionManager {
|
|||||||
|
|
||||||
// CRITICAL FIX (Dec 12, 2025): Check if we have order signatures
|
// CRITICAL FIX (Dec 12, 2025): Check if we have order signatures
|
||||||
// Auto-synced positions may have NULL signatures, need fallback
|
// Auto-synced positions may have NULL signatures, need fallback
|
||||||
const { updateTradeState } = await import('../database/trades')
|
const { updateTradeState, getPrismaClient } = await import('../database/trades')
|
||||||
const dbTrade = await this.prisma.trade.findUnique({
|
const prisma = getPrismaClient()
|
||||||
|
const dbTrade = await prisma.trade.findUnique({
|
||||||
where: { id: trade.id },
|
where: { id: trade.id },
|
||||||
select: { slOrderTx: true, softStopOrderTx: true, hardStopOrderTx: true }
|
select: { slOrderTx: true, softStopOrderTx: true, hardStopOrderTx: true }
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user