@barchart/portfolio-api-common 1.0.5 → 1.0.7

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.
@@ -74,12 +74,16 @@ module.exports = (() => {
74
74
  }
75
75
 
76
76
  const getBasicTransaction = (t) => {
77
- return {
77
+ const basic = {
78
78
  date: t.date,
79
79
  type: t.type,
80
80
  sequence: t.sequence,
81
81
  instrument: t.instrument
82
82
  };
83
+
84
+ delete basic.instrument.id;
85
+
86
+ return instrument;
83
87
  };
84
88
 
85
89
  const formatters = new Map();
@@ -131,14 +135,14 @@ module.exports = (() => {
131
135
  fee: t.fee,
132
136
  total: t.quantity,
133
137
  rate: t.dividend.rate
134
- }
138
+ };
135
139
  });
136
140
 
137
141
  formatters.set(TransactionType.DISTRIBUTION_FUND, (t) => {
138
142
  return {
139
143
  shares: t.snapshot.open.subtract(t.quantity),
140
144
  fee: t.fee
141
- }
145
+ };
142
146
  });
143
147
 
144
148
  formatters.set(TransactionType.INCOME, (t) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",