@clonegod/ttd-core 2.1.27 → 2.1.29

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.
@@ -38,12 +38,12 @@ class ArbCache {
38
38
  this.redis_cmd.init()
39
39
  ]);
40
40
  this.redis_event_publisher = (0, index_1.getArbEventPublisher)(this);
41
- (0, index_1.mkdirSync)(path_1.default.join('config', this.chain_id, 'bak').toLowerCase(), true);
41
+ (0, index_1.mkdirSync)(path_1.default.join('config', this.chain_id).toLowerCase(), true);
42
42
  yield Promise.all([
43
43
  this.get_token_list_no_cache(),
44
44
  this.get_pool_list_no_cache()
45
45
  ]);
46
- if (((_a = process.env.APP_NAME) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'config-center') {
46
+ if (((_a = process.env.APP_NAME) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'ttd-config-center') {
47
47
  yield this.init_configs();
48
48
  }
49
49
  }
@@ -57,8 +57,8 @@ class ArbCache {
57
57
  return __awaiter(this, void 0, void 0, function* () {
58
58
  var _a;
59
59
  let app_name = process.env.APP_NAME;
60
- if (((_a = process.env.APP_NAME) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== 'config-center') {
61
- (0, index_1.log_warn)(`Only config-center can initial config! process.env.APP_NAME=${app_name}, return`);
60
+ if (((_a = process.env.APP_NAME) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== 'ttd-config-center') {
61
+ (0, index_1.log_warn)(`Only ttd-config-center can initial config! process.env.APP_NAME=${app_name}, return`);
62
62
  return;
63
63
  }
64
64
  let enable_init_cache = process.env.ENABLE_INIT_CACHE;
@@ -139,7 +139,7 @@ function fetchPriceFromJupiter(addresses) {
139
139
  }
140
140
  catch (error) {
141
141
  retryCount++;
142
- (0, index_1.log_warn)(`[fetchPriceFromJupiter] Request failed (attempt ${retryCount}/${maxRetries}): ${error instanceof Error ? error.message : String(error)}`);
142
+ (0, index_1.log_warn)(`[fetchPriceFromJupiter] Request failed (attempt ${retryCount}/${maxRetries}): ${error instanceof Error ? error.message : String(error)}, url: ${url}`);
143
143
  if (retryCount <= maxRetries) {
144
144
  const currentRetrysleep = retrysleepMs * retryCount;
145
145
  (0, index_1.log_debug)(`[fetchPriceFromJupiter] Retrying in ${currentRetrysleep}ms...`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-core",
3
- "version": "2.1.27",
3
+ "version": "2.1.29",
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": "types/index.d.ts",