@barchart/portfolio-api-common 1.0.159 → 1.0.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -171,8 +171,8 @@ module.exports = (() => {
171
171
  this._dataFormat.quoteTime = this._dataActual.quoteTime;
172
172
  this._dataFormat.quoteVolume = formatNumber(this._dataActual.quoteVolume, 0);
173
173
 
174
- const quoteChangePositive = is.number(this._dataActual.quoteChange) && this._dataActual.quoteChange > 0;
175
- const quoteChangeNegative = is.number(this._dataActual.quoteChange) && this._dataActual.quoteChange < 0;
174
+ const quoteChangePositive = quote.lastPriceDirection === 'up';
175
+ const quoteChangeNegative = quote.lastPriceDirection === 'down';
176
176
 
177
177
  setTimeout(() => this._dataFormat.quoteChangeDirection = { up: quoteChangePositive, down: quoteChangeNegative }, 0);
178
178
  this._dataFormat.quoteChangeNegative = quoteChangeNegative;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.159",
3
+ "version": "1.0.160",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -1416,8 +1416,8 @@ module.exports = (() => {
1416
1416
  this._dataFormat.quoteTime = this._dataActual.quoteTime;
1417
1417
  this._dataFormat.quoteVolume = formatNumber(this._dataActual.quoteVolume, 0);
1418
1418
 
1419
- const quoteChangePositive = is.number(this._dataActual.quoteChange) && this._dataActual.quoteChange > 0;
1420
- const quoteChangeNegative = is.number(this._dataActual.quoteChange) && this._dataActual.quoteChange < 0;
1419
+ const quoteChangePositive = quote.lastPriceDirection === 'up';
1420
+ const quoteChangeNegative = quote.lastPriceDirection === 'down';
1421
1421
 
1422
1422
  setTimeout(() => this._dataFormat.quoteChangeDirection = { up: quoteChangePositive, down: quoteChangeNegative }, 0);
1423
1423
  this._dataFormat.quoteChangeNegative = quoteChangeNegative;