Skip to content

Commit 1fff5ea

Browse files
darkdarkdragongeertweening
authored andcommitted
[FIX] fix AutobridgeCalculator (RT-3445)
pass issuers to AutobridgeCalculator so it can create offers with right issuers
1 parent ad99563 commit 1fff5ea

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/autobridgecalculator.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ function assertValidLegOneOffer(legOneOffer, message) {
1818
}
1919

2020
function AutobridgeCalculator(currencyGets, currencyPays,
21-
legOneOffers, legTwoOffers) {
21+
legOneOffers, legTwoOffers, issuerGets, issuerPays) {
2222
this._currencyGets = currencyGets;
2323
this._currencyPays = currencyPays;
24+
this._issuerGets = issuerGets;
25+
this._issuerPays = issuerPays;
2426
this.legOneOffers = _.cloneDeep(legOneOffers);
2527
this.legTwoOffers = _.cloneDeep(legTwoOffers);
2628

src/orderbook.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,9 @@ OrderBook.prototype.computeAutobridgedOffers = function() {
11891189
this._currencyGets,
11901190
this._currencyPays,
11911191
this._legOneBook.getOffersSync(),
1192-
this._legTwoBook.getOffersSync()
1192+
this._legTwoBook.getOffersSync(),
1193+
this._issuerGets,
1194+
this._issuerPays
11931195
);
11941196

11951197
this._offersAutobridged = autobridgeCalculator.calculate();

0 commit comments

Comments
 (0)