mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
[TASK] add short circuit when there are no direct nor autobridged offers
This commit is contained in:
@@ -1223,6 +1223,10 @@ OrderBook.prototype.computeAutobridgedOffers = function() {
|
||||
OrderBook.prototype.mergeDirectAndAutobridgedBooks = function() {
|
||||
var self = this;
|
||||
|
||||
if (_.isEmpty(this._offers) && _.isEmpty(this._offersAutobridged)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
this._mergedOffers = this._offers
|
||||
.concat(this._offersAutobridged)
|
||||
.sort(function(a, b) {
|
||||
|
||||
Reference in New Issue
Block a user