@clonegod/ttd-core 2.0.36 → 2.0.38
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.
|
@@ -20,6 +20,7 @@ const gecko_terminal_1 = require("./gecko_terminal");
|
|
|
20
20
|
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
|
+
(0, index_1.log_info)(`get_tron_token_price_info`, addresses);
|
|
23
24
|
const result = new Map();
|
|
24
25
|
const PRICE_CHANNELS = [
|
|
25
26
|
{
|
|
@@ -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.
|
|
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,
|
|
@@ -191,10 +192,8 @@ function fetchPriceFromTronscanALL(addresses) {
|
|
|
191
192
|
if (require.main === module) {
|
|
192
193
|
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
193
194
|
let addresses = [
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"TCFLL5dx5ZJdKnWuesXxi1VPwjLVmWZZy9",
|
|
195
|
+
"TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7",
|
|
196
|
+
"TMacq4TDUw5q8NFBwmbY4RLXvzvG5JTkvi",
|
|
197
197
|
];
|
|
198
|
-
console.log(yield get_tron_token_price_info(addresses));
|
|
199
198
|
}))();
|
|
200
199
|
}
|