@barchart/portfolio-api-common 1.0.120 → 1.0.121

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.
@@ -96,7 +96,7 @@ module.exports = (() => {
96
96
  if (this._single) {
97
97
  const precision = sender.position.instrument.currency.precision;
98
98
 
99
- this._dataActual.currentPrice = sender.data.currentPrice;
99
+ this._dataActual.currentPrice = quote.lastPrice;
100
100
  this._dataFormat.currentPrice = formatNumber(this._dataActual.currentPrice, precision);
101
101
 
102
102
  this._dataFormat.quoteLast = formatNumber(quote.previousPrice, precision);
@@ -94,9 +94,6 @@ module.exports = (() => {
94
94
  this._previousQuote = this._currentQuote;
95
95
  this._currentQuote = quote;
96
96
 
97
- this._data.previousPrice = this._data.currentPrice;
98
- this._data.currentPrice = quote.lastPrice;
99
-
100
97
  this._quoteChangedEvent.fire(this._currentQuote);
101
98
  }
102
99
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.120",
3
+ "version": "1.0.121",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -1101,7 +1101,7 @@ module.exports = (() => {
1101
1101
  if (this._single) {
1102
1102
  const precision = sender.position.instrument.currency.precision;
1103
1103
 
1104
- this._dataActual.currentPrice = sender.data.currentPrice;
1104
+ this._dataActual.currentPrice = quote.lastPrice;
1105
1105
  this._dataFormat.currentPrice = formatNumber(this._dataActual.currentPrice, precision);
1106
1106
 
1107
1107
  this._dataFormat.quoteLast = formatNumber(quote.previousPrice, precision);
@@ -1516,9 +1516,6 @@ module.exports = (() => {
1516
1516
  this._previousQuote = this._currentQuote;
1517
1517
  this._currentQuote = quote;
1518
1518
 
1519
- this._data.previousPrice = this._data.currentPrice;
1520
- this._data.currentPrice = quote.lastPrice;
1521
-
1522
1519
  this._quoteChangedEvent.fire(this._currentQuote);
1523
1520
  }
1524
1521
  }