@barchart/portfolio-api-common 1.0.196 → 1.0.197
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.
|
@@ -24,6 +24,11 @@ module.exports = (() => {
|
|
|
24
24
|
|
|
25
25
|
const DEFAULT_CURRENCY = Currency.CAD;
|
|
26
26
|
|
|
27
|
+
const REQUIRED_CURRENCIES = [
|
|
28
|
+
Currency.CAD,
|
|
29
|
+
Currency.USD
|
|
30
|
+
];
|
|
31
|
+
|
|
27
32
|
/**
|
|
28
33
|
* A container for positions which groups the positions into one or more
|
|
29
34
|
* trees for aggregation and display purposes. For example, positions could be
|
|
@@ -114,7 +119,9 @@ module.exports = (() => {
|
|
|
114
119
|
return map;
|
|
115
120
|
}, { });
|
|
116
121
|
|
|
117
|
-
|
|
122
|
+
const forexCurrencyCodes = array.unique(Object.keys(this._currencies).concat(REQUIRED_CURRENCIES.map(c => c.code)));
|
|
123
|
+
|
|
124
|
+
this._forexSymbols = forexCurrencyCodes.reduce((symbols, code) => {
|
|
118
125
|
if (code !== DEFAULT_CURRENCY.code) {
|
|
119
126
|
symbols.push(`^${DEFAULT_CURRENCY.code}${code}`);
|
|
120
127
|
}
|
package/package.json
CHANGED
package/test/SpecRunner.js
CHANGED
|
@@ -740,6 +740,11 @@ module.exports = (() => {
|
|
|
740
740
|
|
|
741
741
|
const DEFAULT_CURRENCY = Currency.CAD;
|
|
742
742
|
|
|
743
|
+
const REQUIRED_CURRENCIES = [
|
|
744
|
+
Currency.CAD,
|
|
745
|
+
Currency.USD
|
|
746
|
+
];
|
|
747
|
+
|
|
743
748
|
/**
|
|
744
749
|
* A container for positions which groups the positions into one or more
|
|
745
750
|
* trees for aggregation and display purposes. For example, positions could be
|
|
@@ -830,7 +835,9 @@ module.exports = (() => {
|
|
|
830
835
|
return map;
|
|
831
836
|
}, { });
|
|
832
837
|
|
|
833
|
-
|
|
838
|
+
const forexCurrencyCodes = array.unique(Object.keys(this._currencies).concat(REQUIRED_CURRENCIES.map(c => c.code)));
|
|
839
|
+
|
|
840
|
+
this._forexSymbols = forexCurrencyCodes.reduce((symbols, code) => {
|
|
834
841
|
if (code !== DEFAULT_CURRENCY.code) {
|
|
835
842
|
symbols.push(`^${DEFAULT_CURRENCY.code}${code}`);
|
|
836
843
|
}
|