Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Commit

Permalink
fix(positions): use units to get the side
Browse files Browse the repository at this point in the history
  • Loading branch information
albertosantini authored Nov 2, 2016
1 parent 3e0cefe commit 697406f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/app/positions/positions.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
shortUnits = position.short &&
parseInt(position.short.units, 10);
units = longUnits || shortUnits;
side = position.longUnits > 0 ? "buy" : "sell";
side = units > 0 ? "buy" : "sell";
avgPrice = (longUnits && position.long.averagePrice)
|| (shortUnits && position.short.averagePrice);

Expand Down

0 comments on commit 697406f

Please sign in to comment.