Commit 00c75323 by zihan

bug修复

parent b5253a67
...@@ -177,7 +177,7 @@ class biboxApi { ...@@ -177,7 +177,7 @@ class biboxApi {
const data = result.data; const data = result.data;
const oldData = totalOrderbook[symbol]; const oldData = totalOrderbook[symbol];
if(!oldData || data.timestamp > oldData.timestamp){ if(!oldData || data.timestamp > oldData.timestamp){
totalOrderbook[symbol]={asks:data.SELL,bids:data.BUY,timestamp:data.timestamp}; totalOrderbook[symbol]={asks:data.SELL.map((item)=>[item[0],item[1]]),bids:data.BUY.map((item)=>[item[0],item[1]]),timestamp:data.timestamp};
} }
wss.send(JSON.stringify({id,type:'subscribe','topic':`/trade/${symbol}_TRADE`})) wss.send(JSON.stringify({id,type:'subscribe','topic':`/trade/${symbol}_TRADE`}))
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment