@barchart/portfolio-api-common 1.0.157 → 1.0.158
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.
|
@@ -230,14 +230,15 @@ module.exports = (() => {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
function calculateStaticData(item) {
|
|
233
|
+
const portfolio = item.portfolio;
|
|
233
234
|
const position = item.position;
|
|
234
235
|
const snapshot = item.position.snapshot;
|
|
235
236
|
const previousSummaries = item.previousSummaries;
|
|
236
237
|
|
|
237
238
|
const data = item._data;
|
|
238
239
|
|
|
239
|
-
if (
|
|
240
|
-
data.type =
|
|
240
|
+
if (portfolio.miscellany && portfolio.miscellany.data.type && portfolio.miscellany.data.type.value) {
|
|
241
|
+
data.type = portfolio.miscellany.data.type.value;
|
|
241
242
|
}
|
|
242
243
|
|
|
243
244
|
data.previousPrice = position.previous || null;
|
package/package.json
CHANGED
package/test/SpecRunner.js
CHANGED
|
@@ -2144,14 +2144,15 @@ module.exports = (() => {
|
|
|
2144
2144
|
}
|
|
2145
2145
|
|
|
2146
2146
|
function calculateStaticData(item) {
|
|
2147
|
+
const portfolio = item.portfolio;
|
|
2147
2148
|
const position = item.position;
|
|
2148
2149
|
const snapshot = item.position.snapshot;
|
|
2149
2150
|
const previousSummaries = item.previousSummaries;
|
|
2150
2151
|
|
|
2151
2152
|
const data = item._data;
|
|
2152
2153
|
|
|
2153
|
-
if (
|
|
2154
|
-
data.type =
|
|
2154
|
+
if (portfolio.miscellany && portfolio.miscellany.data.type && portfolio.miscellany.data.type.value) {
|
|
2155
|
+
data.type = portfolio.miscellany.data.type.value;
|
|
2155
2156
|
}
|
|
2156
2157
|
|
|
2157
2158
|
data.previousPrice = position.previous || null;
|