@barchart/portfolio-api-common 1.0.65 → 1.0.66
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.
|
@@ -40,7 +40,7 @@ module.exports = (() => {
|
|
|
40
40
|
this._dataFormat.marketPercent = null;
|
|
41
41
|
this._dataFormat.unrealizedToday = null;
|
|
42
42
|
|
|
43
|
-
this._dataFormat.
|
|
43
|
+
this._dataFormat.unrealizedTodayNegative = false;
|
|
44
44
|
|
|
45
45
|
this._items.forEach((item) => {
|
|
46
46
|
item.registerPriceChangeHandler((data, sender) => {
|
|
@@ -170,7 +170,7 @@ module.exports = (() => {
|
|
|
170
170
|
format.market = formatCurrency(updates.market, currency);
|
|
171
171
|
format.marketPercent = formatPercent(updates.unrealizedToday, 2);
|
|
172
172
|
format.unrealizedToday = formatCurrency(updates.unrealizedToday, currency);
|
|
173
|
-
format.
|
|
173
|
+
format.unrealizedTodayNegative = actual.unrealizedToday.getIsNegative();
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
return PositionGroup;
|
package/package.json
CHANGED
package/test/SpecRunner.js
CHANGED
|
@@ -858,7 +858,7 @@ module.exports = (() => {
|
|
|
858
858
|
this._dataFormat.marketPercent = null;
|
|
859
859
|
this._dataFormat.unrealizedToday = null;
|
|
860
860
|
|
|
861
|
-
this._dataFormat.
|
|
861
|
+
this._dataFormat.unrealizedTodayNegative = false;
|
|
862
862
|
|
|
863
863
|
this._items.forEach((item) => {
|
|
864
864
|
item.registerPriceChangeHandler((data, sender) => {
|
|
@@ -988,7 +988,7 @@ module.exports = (() => {
|
|
|
988
988
|
format.market = formatCurrency(updates.market, currency);
|
|
989
989
|
format.marketPercent = formatPercent(updates.unrealizedToday, 2);
|
|
990
990
|
format.unrealizedToday = formatCurrency(updates.unrealizedToday, currency);
|
|
991
|
-
format.
|
|
991
|
+
format.unrealizedTodayNegative = actual.unrealizedToday.getIsNegative();
|
|
992
992
|
}
|
|
993
993
|
|
|
994
994
|
return PositionGroup;
|