bulltrackers-module 1.0.713 → 1.0.715

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.
@@ -1,2 +1,2 @@
1
1
  // Change this string to force a global re-computation
2
- module.exports = "v2.0-epoch-7";
2
+ module.exports = "v2.0-epoch-8";
@@ -230,19 +230,20 @@ async function storeSignedInUserSocialPosts({ db, logger, collectionRegistry, ci
230
230
  * @returns {Promise<void>}
231
231
  */
232
232
  async function storePopularInvestorPortfolio({ db, logger, collectionRegistry, cid, date, portfolioData, deepPortfolioData = null, bigqueryBatchManager = null }) {
233
+ // Prepare portfolio document (used for both BigQuery and Firestore)
234
+ const portfolioDoc = {
235
+ ...portfolioData,
236
+ cid: String(cid)
237
+ };
238
+
239
+ // If deep portfolio data exists, merge it
240
+ if (deepPortfolioData && deepPortfolioData.positions) {
241
+ portfolioDoc.deepPositions = deepPortfolioData.positions;
242
+ }
243
+
233
244
  // 1. Write to BigQuery (for computations) - use batch manager if provided, otherwise direct write
234
245
  if (process.env.BIGQUERY_ENABLED !== 'false') {
235
246
  try {
236
- const portfolioDoc = {
237
- ...portfolioData,
238
- cid: String(cid)
239
- };
240
-
241
- // If deep portfolio data exists, merge it
242
- if (deepPortfolioData && deepPortfolioData.positions) {
243
- portfolioDoc.deepPositions = deepPortfolioData.positions;
244
- }
245
-
246
247
  const datasetId = process.env.BIGQUERY_DATASET_ID || 'bulltrackers_data';
247
248
  const row = {
248
249
  date: date,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.713",
3
+ "version": "1.0.715",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [