@pioneer-platform/markets 8.3.16 → 8.4.0

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # @pioneer-platform/markets
2
+
3
+ ## 8.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Release: minor version bump for all packages
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @pioneer-platform/pro-token@0.1.0
13
+ - @pioneer-platform/loggerdog@8.4.0
14
+ - @pioneer-platform/default-redis@8.4.0
15
+ - @pioneer-platform/pioneer-coins@9.4.0
16
+ - @pioneer-platform/pioneer-types@8.4.0
17
+ - @pioneer-platform/pioneer-discovery@0.1.0
package/lib/index.js CHANGED
@@ -177,10 +177,8 @@ var update_cache = function () {
177
177
  if (!(j < assetsMatchSymbol.length)) return [3 /*break*/, 4];
178
178
  asset = assetsMatchSymbol[j];
179
179
  key = "coincap:" + asset.caip;
180
- // No expiration - old price is better than no price
181
- return [4 /*yield*/, redis.set(key, JSON.stringify(entry))];
180
+ return [4 /*yield*/, redis.setex(key, 3600, JSON.stringify(entry))];
182
181
  case 2:
183
- // No expiration - old price is better than no price
184
182
  _b.sent();
185
183
  log.info(tag, "saved: " + key);
186
184
  populatedCaips_1.add(asset.caip);
@@ -230,10 +228,8 @@ var update_cache = function () {
230
228
  if (!(_c < matchingAssets_1.length)) return [3 /*break*/, 4];
231
229
  matchingAsset = matchingAssets_1[_c];
232
230
  key = "coingecko:".concat(matchingAsset.caip);
233
- // No expiration - old price is better than no price
234
- return [4 /*yield*/, redis.set(key, JSON.stringify(coin))];
231
+ return [4 /*yield*/, redis.setex(key, 3600, JSON.stringify(coin))];
235
232
  case 2:
236
- // No expiration - old price is better than no price
237
233
  _d.sent();
238
234
  log.info(tag, "Saved ".concat(coin.symbol, " under ").concat(key));
239
235
  populatedCaips_1.add(matchingAsset.caip);
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@pioneer-platform/markets",
3
- "version": "8.3.16",
3
+ "version": "8.4.0",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "dependencies": {
7
- "@pioneer-platform/default-redis": "^8.3.1",
8
- "@pioneer-platform/loggerdog": "^8.3.1",
9
- "@pioneer-platform/pioneer-coins": "^9.2.26",
10
- "@pioneer-platform/pioneer-discovery": "^0.0.14",
11
- "@pioneer-platform/pioneer-types": "^8.3.1",
12
- "@pioneer-platform/pro-token": "^0.0.3",
7
+ "@pioneer-platform/default-redis": "^8.4.0",
8
+ "@pioneer-platform/loggerdog": "^8.4.0",
9
+ "@pioneer-platform/pioneer-coins": "^9.4.0",
10
+ "@pioneer-platform/pioneer-discovery": "^0.1.0",
11
+ "@pioneer-platform/pioneer-types": "^8.4.0",
12
+ "@pioneer-platform/pro-token": "^0.1.0",
13
13
  "axios": "^1.6.0",
14
14
  "axios-retry": "^3.2.0",
15
15
  "dotenv": "^8.2.0"