mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
[FIX] fix AutobridgeCalculator (RT-3445)
pass issuers to AutobridgeCalculator so it can create offers with right issuers
This commit is contained in:
@@ -18,9 +18,11 @@ function assertValidLegOneOffer(legOneOffer, message) {
|
||||
}
|
||||
|
||||
function AutobridgeCalculator(currencyGets, currencyPays,
|
||||
legOneOffers, legTwoOffers) {
|
||||
legOneOffers, legTwoOffers, issuerGets, issuerPays) {
|
||||
this._currencyGets = currencyGets;
|
||||
this._currencyPays = currencyPays;
|
||||
this._issuerGets = issuerGets;
|
||||
this._issuerPays = issuerPays;
|
||||
this.legOneOffers = _.cloneDeep(legOneOffers);
|
||||
this.legTwoOffers = _.cloneDeep(legTwoOffers);
|
||||
|
||||
|
||||
@@ -1189,7 +1189,9 @@ OrderBook.prototype.computeAutobridgedOffers = function() {
|
||||
this._currencyGets,
|
||||
this._currencyPays,
|
||||
this._legOneBook.getOffersSync(),
|
||||
this._legTwoBook.getOffersSync()
|
||||
this._legTwoBook.getOffersSync(),
|
||||
this._issuerGets,
|
||||
this._issuerPays
|
||||
);
|
||||
|
||||
this._offersAutobridged = autobridgeCalculator.calculate();
|
||||
|
||||
Reference in New Issue
Block a user