@clonegod/ttd-core 3.0.4 → 3.0.5

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.
@@ -420,21 +420,27 @@ class ArbCache {
420
420
  }
421
421
  }
422
422
  for (let pair of pair_set) {
423
- let [base_symbol, quote_symbol] = pair.split('/');
424
- let tokenA = yield this.get_one_token_info_by_symbol(base_symbol);
425
- let tokenB = yield this.get_one_token_info_by_symbol(quote_symbol);
426
- let price_decimals = pair_price_decimals.get(pair);
427
- if (!price_decimals || price_decimals <= 0) {
428
- price_decimals = 12;
423
+ try {
424
+ let [base_symbol, quote_symbol] = pair.split('/');
425
+ let tokenA = yield this.get_one_token_info_by_symbol(base_symbol);
426
+ let tokenB = yield this.get_one_token_info_by_symbol(quote_symbol);
427
+ let price_decimals = pair_price_decimals.get(pair);
428
+ if (!price_decimals || price_decimals <= 0) {
429
+ price_decimals = 12;
430
+ }
431
+ let pool_list = (yield this.get_pool_list_by_pair(pair)).filter(e => e.enable).map(e => e.pool_address);
432
+ pair_list.push({
433
+ pair,
434
+ tokenA,
435
+ tokenB,
436
+ price_decimals,
437
+ pool_list
438
+ });
439
+ }
440
+ catch (err) {
441
+ (0, index_1.log_warn)(`get_pair_list, failed! input_pair=${input_pair}, err=${err.message}`);
442
+ continue;
429
443
  }
430
- let pool_list = (yield this.get_pool_list_by_pair(pair)).filter(e => e.enable).map(e => e.pool_address);
431
- pair_list.push({
432
- pair,
433
- tokenA,
434
- tokenB,
435
- price_decimals,
436
- pool_list
437
- });
438
444
  }
439
445
  pair_list = pair_list.sort((a, b) => a.pair.localeCompare(b.pair));
440
446
  if (index_1.LOG.debug) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-core",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
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",