Commit 7a91d270 by zihan

修复一个下单的重大bug

parent 23589f27
......@@ -118,20 +118,20 @@ class Order {
if (error) {
console.error("搜索订单出错");
console.error(error);
let timeout = 100;
setTimeout(() => {
this.api.searchOrder(orderId, handleSearchResult.bind(this, orderId, symbol, side, callback));
}, timeout);
// let timeout = 100;
// setTimeout(() => {
api2.searchOrder(orderId,symbol, side, handleSearchResult.bind(this));
// }, timeout);
}
if(!result || !result.data){
console.error("没有返回数据,再次搜索");
api2.searchOrder(orderId, symbol, side, handleSearchResult.bind(this, orderId, symbol, side, callback));
api2.searchOrder(orderId, symbol, side, handleSearchResult.bind(this));
return;
}
callback(null, convertToRecordOrder(result.data, price));
}
this.api.searchOrder(orderId, symbol, side, handleSearchResult.bind(this, orderId, symbol, side, callback));
this.api.searchOrder(orderId, symbol, side, handleSearchResult.bind(this));
})
}
}
......
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