okex: fix order detail segmentation

This commit is contained in:
c9s 2021-05-29 00:27:05 +08:00
parent 2a5ef30135
commit 64b9c78a5b

View File

@ -109,9 +109,8 @@ func segmentOrderDetails(orderDetails []okexapi.OrderDetails) (trades, orders []
for _, orderDetail := range orderDetails { for _, orderDetail := range orderDetails {
if len(orderDetail.LastTradeID) > 0 { if len(orderDetail.LastTradeID) > 0 {
trades = append(trades, orderDetail) trades = append(trades, orderDetail)
} else {
orders = append(orders, orderDetail)
} }
orders = append(orders, orderDetail)
} }
return trades, orders return trades, orders
} }