fix: syntax error in drift-trading.ts

This commit is contained in:
mindesbunister
2025-07-13 02:29:27 +02:00
parent 836455d1a4
commit e1dc58e35d

View File

@@ -28,20 +28,8 @@ export interface TradeParams {
stopLossType?: 'PRICE' | 'PERCENTAGE'
takeProfitType?: 'PRICE' | 'PERCENTAGE'
}
if (localTrades.length > 0) {
console.log(`📊 Found ${localTrades.length} trades in local database`)
return localTrades.map((trade: any) => ({
id: trade.id.toString(),
symbol: trade.symbol,
side: trade.side as 'BUY' | 'SELL',
amount: trade.amount,
price: trade.price,
status: trade.status as 'FILLED' | 'PENDING' | 'CANCELLED',
executedAt: trade.executedAt ? trade.executedAt.toISOString() : trade.createdAt.toISOString(),
pnl: trade.profit || 0,
txId: trade.driftTxId || trade.id
}))
}ace TradeResult {
export interface TradeResult {
success: boolean
txId?: string
error?: string