impermax-sdk 2.1.10 → 2.1.12
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.
|
@@ -110,7 +110,7 @@ class TheGraphQueryBuilder {
|
|
|
110
110
|
periodFinish
|
|
111
111
|
}
|
|
112
112
|
}`;
|
|
113
|
-
const id_in_string = (addressesFilter === null || addressesFilter === void 0 ? void 0 : addressesFilter.length)
|
|
113
|
+
const id_in_string = `where: {id_in: ["${(addressesFilter === null || addressesFilter === void 0 ? void 0 : addressesFilter.length) ? addressesFilter.join('","').toLowerCase() : ''}"]}`;
|
|
114
114
|
return (0, graphql_tag_1.default) `{
|
|
115
115
|
lendingPools(first: 1000, orderBy: totalBorrowsUSD, orderDirection: desc ${id_in_string}) {
|
|
116
116
|
id
|
|
@@ -193,9 +193,9 @@ class TheGraphQueryBuilder {
|
|
|
193
193
|
*-----------------------------*/
|
|
194
194
|
vaultsQuery(vaultType, addressesFilter) {
|
|
195
195
|
// do something here for difference kind of vault type, currently only lending
|
|
196
|
-
const id_in_string =
|
|
196
|
+
//const id_in_string = `where: {id_in: ["${addressesFilter?.length ? addressesFilter.join('","').toLowerCase() : ''}"]}`;
|
|
197
197
|
return (0, graphql_tag_1.default) `{
|
|
198
|
-
lendingVaults(first: 1000
|
|
198
|
+
lendingVaults(first: 1000) {
|
|
199
199
|
id
|
|
200
200
|
underlying {
|
|
201
201
|
id
|
|
@@ -296,7 +296,7 @@ class TheGraphQueryBuilder {
|
|
|
296
296
|
accrualTimestamp
|
|
297
297
|
exchangeRate
|
|
298
298
|
}`;
|
|
299
|
-
const id_in_string = (addressesFilter === null || addressesFilter === void 0 ? void 0 : addressesFilter.length)
|
|
299
|
+
const id_in_string = `where: {id_in: ["${(addressesFilter === null || addressesFilter === void 0 ? void 0 : addressesFilter.length) ? addressesFilter.join('","').toLowerCase() : ''}"]}`;
|
|
300
300
|
return (0, graphql_tag_1.default) `{
|
|
301
301
|
lendingPools(first: 1000, orderBy: totalBorrowsUSD, orderDirection: desc, block: {number: ${blockNumber}} ${id_in_string}) {
|
|
302
302
|
id
|
|
@@ -332,7 +332,7 @@ class TheGraphQueryBuilder {
|
|
|
332
332
|
}`;
|
|
333
333
|
}
|
|
334
334
|
pastVolumeQuery(blockNumber, addressesFilter) {
|
|
335
|
-
const id_in_string = (addressesFilter === null || addressesFilter === void 0 ? void 0 : addressesFilter.length)
|
|
335
|
+
const id_in_string = `where: {id_in: ["${(addressesFilter === null || addressesFilter === void 0 ? void 0 : addressesFilter.length) ? addressesFilter.join('","').toLowerCase() : ''}"]}`;
|
|
336
336
|
return (0, graphql_tag_1.default) `{
|
|
337
337
|
pairs (block: {number: ${blockNumber}} ${id_in_string}) {
|
|
338
338
|
id
|
|
@@ -341,7 +341,7 @@ class TheGraphQueryBuilder {
|
|
|
341
341
|
}`;
|
|
342
342
|
}
|
|
343
343
|
currentVolumeAndReservesQuery(addressesFilter) {
|
|
344
|
-
const id_in_string = (addressesFilter === null || addressesFilter === void 0 ? void 0 : addressesFilter.length)
|
|
344
|
+
const id_in_string = `where: {id_in: ["${(addressesFilter === null || addressesFilter === void 0 ? void 0 : addressesFilter.length) ? addressesFilter.join('","').toLowerCase() : ''}"]}`;
|
|
345
345
|
return (0, graphql_tag_1.default) `{
|
|
346
346
|
pairs (${id_in_string}) {
|
|
347
347
|
id
|