Skip to content

Commit

Permalink
[#227] fix lowest ask price and highest bid price
Browse files Browse the repository at this point in the history
  • Loading branch information
JahPowerBit committed Jul 23, 2014
1 parent ff48bc3 commit a1af781
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/js/components/exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,9 @@ function ExchangeViewModel() {
data['buy_orders'][i]['exclude'] = true;
} else {
if (base_depth == 0) {
self.lowestAskPrice(data['buy_orders'][i]['price']);
self.buyPrice(data['buy_orders'][i]['price']);
self.obtainableForBuy(divFloat(self.availableBalanceForBuy(), self.lowestAskPrice()));
self.highestBidPrice(data['buy_orders'][i]['price']);
self.sellPrice(data['buy_orders'][i]['price']);
self.obtainableForSell(divFloat(self.availableBalanceForSell(), self.highestBidPrice()));
}
data['buy_orders'][i]['exclude'] = false;
data['buy_orders'][i]['price'] = parseFloat(data['buy_orders'][i]['price']);
Expand All @@ -707,9 +707,9 @@ function ExchangeViewModel() {
data['sell_orders'][i]['exclude'] = true;
} else {
if (base_depth == 0) {
self.highestBidPrice(data['sell_orders'][i]['price']);
self.sellPrice(data['sell_orders'][i]['price']);
self.obtainableForSell(divFloat(self.availableBalanceForSell(), self.highestBidPrice()));
self.lowestAskPrice(data['sell_orders'][i]['price']);
self.buyPrice(data['sell_orders'][i]['price']);
self.obtainableForBuy(divFloat(self.availableBalanceForBuy(), self.lowestAskPrice()));
}
data['sell_orders'][i]['exclude'] = false;
data['sell_orders'][i]['price'] = parseFloat(data['sell_orders'][i]['price']);
Expand Down

0 comments on commit a1af781

Please sign in to comment.