@clonegod/ttd-core 2.0.36 → 2.0.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.
@@ -21,6 +21,7 @@ const price_cache_1 = require("./price_cache");
21
21
  function get_tron_token_price_info(addresses) {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
23
  const result = new Map();
24
+ addresses = addresses.map(e => e.toUpperCase());
24
25
  const PRICE_CHANNELS = [
25
26
  {
26
27
  name: 'CachedPrice',
@@ -157,7 +158,7 @@ function fetchPriceFromTronscanALL(addresses) {
157
158
  const token_price_list = response.data.data;
158
159
  if (token_price_list) {
159
160
  for (const address of addresses) {
160
- let price_info = token_price_list.find(e => e.id.toLowerCase() === address.toLowerCase());
161
+ let price_info = token_price_list.find(e => e.id.toUpperCase() === address.toUpperCase());
161
162
  if (price_info) {
162
163
  result.set(address, {
163
164
  address: address,
@@ -195,6 +196,6 @@ if (require.main === module) {
195
196
  "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
196
197
  "TCFLL5dx5ZJdKnWuesXxi1VPwjLVmWZZy9",
197
198
  ];
198
- console.log(yield get_tron_token_price_info(addresses));
199
+ console.log(yield (0, gecko_terminal_1.fetchPriceFromGeckoTerminal)(index_1.CHAIN_ID.TRON, addresses));
199
200
  }))();
200
201
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-core",
3
- "version": "2.0.36",
3
+ "version": "2.0.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": "types/index.d.ts",