@scallop-io/sui-scallop-sdk 2.2.7 → 2.2.9
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.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/constants/queryKeys.ts +1 -1
- package/src/models/scallopIndexer.ts +1 -1
- package/src/queries/portfolioQuery.ts +2 -2
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ export const queryKeys = {
|
|
|
11
11
|
getPoolAddresses: () => ['api', 'getPoolAddresses'],
|
|
12
12
|
getMarket: () => ['api', 'getMarket'],
|
|
13
13
|
getSpools: () => ['api', 'getSpools'],
|
|
14
|
-
|
|
14
|
+
getBorrowIncentivePools: () => ['api', 'getBorrowIncentivePools'],
|
|
15
15
|
getTotalValueLocked: () => ['api', 'getTotalValueLocked'],
|
|
16
16
|
},
|
|
17
17
|
|
|
@@ -134,7 +134,7 @@ class ScallopIndexer extends ScallopAxios {
|
|
|
134
134
|
borrowIncentivePools: BorrowIncentivePool[];
|
|
135
135
|
}>(
|
|
136
136
|
'/api/borrowIncentivePools/migrate',
|
|
137
|
-
queryKeys.api.
|
|
137
|
+
queryKeys.api.getBorrowIncentivePools()
|
|
138
138
|
);
|
|
139
139
|
|
|
140
140
|
if (response.status === 200) {
|
|
@@ -839,8 +839,6 @@ export const getTotalValueLocked = async (
|
|
|
839
839
|
query: ScallopQuery,
|
|
840
840
|
indexer: boolean = false
|
|
841
841
|
) => {
|
|
842
|
-
const market = await query.getMarketPools(undefined, { indexer });
|
|
843
|
-
|
|
844
842
|
let supplyLendingValue = BigNumber(0);
|
|
845
843
|
let supplyCollateralValue = BigNumber(0);
|
|
846
844
|
let borrowValue = BigNumber(0);
|
|
@@ -863,6 +861,8 @@ export const getTotalValueLocked = async (
|
|
|
863
861
|
return tvl;
|
|
864
862
|
}
|
|
865
863
|
|
|
864
|
+
const market = await query.getMarketPools(undefined, { indexer });
|
|
865
|
+
|
|
866
866
|
for (const pool of Object.values(market.pools)) {
|
|
867
867
|
if (!pool) continue;
|
|
868
868
|
supplyLendingValue = supplyLendingValue.plus(
|