Fix market orders not showing sell orders
This commit is contained in:
parent
7c9fa1f696
commit
c6d81d5848
|
@ -152,7 +152,7 @@ func (db *DB) FetchMarketOrders(marketId int64, orders *[]Order) error {
|
|||
"CASE WHEN o.order_id IS NOT NULL THEN 'EXECUTED' ELSE 'PENDING' END AS status, o.order_id " +
|
||||
"FROM orders o " +
|
||||
"JOIN shares s ON o.share_id = s.id " +
|
||||
"JOIN invoices i ON i.id = o.invoice_id " +
|
||||
"LEFT JOIN invoices i ON i.id = o.invoice_id " +
|
||||
"WHERE s.market_id = $1 AND ( (o.side = 'BUY' AND i.confirmed_at IS NOT NULL) OR o.side = 'SELL' ) " +
|
||||
"ORDER BY o.created_at DESC"
|
||||
rows, err := db.Query(query, marketId)
|
||||
|
|
Loading…
Reference in New Issue