@clonegod/ttd-core 3.1.35 → 3.1.37

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.
@@ -807,7 +807,7 @@ class ArbCache {
807
807
  for (const token of input_tokens) {
808
808
  if (!(token === null || token === void 0 ? void 0 : token.symbol) || (0, index_1.isEmpty)(token.market_price))
809
809
  continue;
810
- const field = (0, index_1.format_symbol_name)(token.symbol);
810
+ const field = token.symbol;
811
811
  yield this.loading_cache.hset(this.chain_id, index_1.CACHE_KEY_TYPE.CONFIG_TOKEN_LIST, field, JSON.stringify(token));
812
812
  count++;
813
813
  }
@@ -2,22 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DEFAULT_BLOCK_TIME_MS = exports.BLOCK_TIME_MS = void 0;
4
4
  exports.getBlockTimeMs = getBlockTimeMs;
5
- const index_1 = require("../index");
6
5
  exports.BLOCK_TIME_MS = {
7
- [index_1.CHAIN_ID.BSC]: 450,
8
- [index_1.CHAIN_ID.ETH]: 12000,
9
- [index_1.CHAIN_ID.BASE]: 2000,
10
- [index_1.CHAIN_ID.ARBITRUM]: 250,
11
- [index_1.CHAIN_ID.AVAX]: 2000,
12
- [index_1.CHAIN_ID.XLAYER]: 3000,
13
- [index_1.CHAIN_ID.POLYGON]: 2000,
14
- [index_1.CHAIN_ID.OPTIMISM]: 2000,
15
- [index_1.CHAIN_ID.LINEA]: 2000,
16
- [index_1.CHAIN_ID.SONIC]: 1000,
17
- [index_1.CHAIN_ID.TRON]: 3000,
18
- [index_1.CHAIN_ID.SOLANA]: 400,
19
- [index_1.CHAIN_ID.SUI]: 400,
20
- [index_1.CHAIN_ID.APTOS]: 250,
6
+ BSC: 450,
7
+ ETH: 12000,
8
+ BASE: 2000,
9
+ ARBITRUM: 250,
10
+ AVAX: 2000,
11
+ XLAYER: 3000,
12
+ POLYGON: 2000,
13
+ OPTIMISM: 2000,
14
+ LINEA: 2000,
15
+ SONIC: 1000,
16
+ TRON: 3000,
17
+ SOLANA: 400,
18
+ SUI: 400,
19
+ APTOS: 250,
21
20
  };
22
21
  exports.DEFAULT_BLOCK_TIME_MS = 2000;
23
22
  function getBlockTimeMs(chain_id) {
package/dist/index.js CHANGED
@@ -407,6 +407,16 @@ function log_warn(msg, data = {}, traceId = '') {
407
407
  ts: Date.now(),
408
408
  });
409
409
  }
410
+ function _omitUndefined(o) {
411
+ if (!o || typeof o !== 'object' || Array.isArray(o))
412
+ return o;
413
+ const out = {};
414
+ for (const k of Object.keys(o)) {
415
+ if (o[k] !== undefined)
416
+ out[k] = o[k];
417
+ }
418
+ return out;
419
+ }
410
420
  function log_info(msg, data = {}, traceId = '', caller = undefined, level = LOG_LEVEL.INFO) {
411
421
  var _a;
412
422
  if (level < _log_level) {
@@ -422,7 +432,7 @@ function log_info(msg, data = {}, traceId = '', caller = undefined, level = LOG_
422
432
  console.log(`${getCurDateTime()} - [${level}] - [${caller.module}] - ${msg}`);
423
433
  }
424
434
  if (!isEmpty(data)) {
425
- console.dir(data, { depth: Number((_a = process.env.LOG_DEPTH) !== null && _a !== void 0 ? _a : 4) });
435
+ console.dir(_omitUndefined(data), { depth: Number((_a = process.env.LOG_DEPTH) !== null && _a !== void 0 ? _a : 4) });
426
436
  }
427
437
  }
428
438
  function log_error(msg, err, traceId = '', caller = undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-core",
3
- "version": "3.1.35",
3
+ "version": "3.1.37",
4
4
  "description": "Common types and utilities for trading systems - use `npm run push` to publish",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",