fix: syntax error in drift-trading.ts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user