Skip to content

Commit

Permalink
Fix market not loading for bit assets close bitshares#681
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed Nov 2, 2017
1 parent 0bf805f commit 4f57b87
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/lib/common/MarketClasses.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ class CallOrder {
this.inverted = market_base === order.call_price.base.asset_id;
this.id = order.id;
this.borrower = order.borrower;
this.borrowers = [order.borrower];
/* Collateral asset type is call_price.base.asset_id */
this.for_sale = parseInt(order.collateral, 10);
this.for_sale_id = order.call_price.base.asset_id;
Expand Down Expand Up @@ -662,6 +663,9 @@ class CallOrder {

sum(order) {
let newOrder = this.clone();
if (newOrder.borrowers.indexOf(order.borrower) === -1) {
newOrder.borrowers.push(order.borrower);
}
newOrder.to_receive += order.to_receive;
newOrder.for_sale += order.for_sale;
newOrder._clearCache();
Expand Down Expand Up @@ -726,6 +730,10 @@ class CallOrder {
return "";
}
}

isMine(id) {
return this.borrowers.indexOf(id) !== -1;
}
}

class SettleOrder extends LimitOrder {
Expand Down

0 comments on commit 4f57b87

Please sign in to comment.