@scallop-io/sui-scallop-sdk 0.47.0-alpha.4 → 0.47.0-alpha.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.
- package/dist/index.js +12 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/builders/coreBuilder.ts +1 -1
- package/src/queries/borrowIncentiveQuery.ts +3 -4
- package/src/queries/coreQuery.ts +3 -2
- package/src/queries/spoolQuery.ts +4 -3
package/package.json
CHANGED
|
@@ -392,7 +392,7 @@ const generateCoreQuickMethod: GenerateCoreQuickMethod = ({
|
|
|
392
392
|
(await builder.utils.getObligationCoinNames(
|
|
393
393
|
obligationInfo.obligationId
|
|
394
394
|
)) ?? [];
|
|
395
|
-
const updateCoinNames = [...
|
|
395
|
+
const updateCoinNames = [...obligationCoinNames, poolCoinName];
|
|
396
396
|
await updateOracles(builder, txBlock, updateCoinNames);
|
|
397
397
|
return txBlock.borrow(
|
|
398
398
|
obligationInfo.obligationId,
|
|
@@ -39,14 +39,13 @@ export const queryBorrowIncentivePools = async (
|
|
|
39
39
|
) => {
|
|
40
40
|
const borrowIncentivePools: BorrowIncentivePools = {};
|
|
41
41
|
|
|
42
|
-
const coinPrices =
|
|
43
|
-
[
|
|
42
|
+
const coinPrices =
|
|
43
|
+
(await query.utils.getCoinPrices([
|
|
44
44
|
...new Set([
|
|
45
45
|
...borrowIncentiveCoinNames,
|
|
46
46
|
...SUPPORT_BORROW_INCENTIVE_REWARDS,
|
|
47
47
|
]),
|
|
48
|
-
] ??
|
|
49
|
-
);
|
|
48
|
+
])) ?? {};
|
|
50
49
|
|
|
51
50
|
if (indexer) {
|
|
52
51
|
const borrowIncentivePoolsIndexer =
|
package/src/queries/coreQuery.ts
CHANGED
|
@@ -233,7 +233,7 @@ export const getMarketPools = async (
|
|
|
233
233
|
const marketObjectResponse = await query.cache.queryGetObject(marketId, {
|
|
234
234
|
showContent: true,
|
|
235
235
|
});
|
|
236
|
-
const coinPrices = await query.utils.getCoinPrices(poolCoinNames ??
|
|
236
|
+
const coinPrices = (await query.utils.getCoinPrices(poolCoinNames)) ?? {};
|
|
237
237
|
|
|
238
238
|
const marketPools: MarketPools = {};
|
|
239
239
|
|
|
@@ -518,7 +518,8 @@ export const getMarketCollaterals = async (
|
|
|
518
518
|
indexer: boolean = false
|
|
519
519
|
) => {
|
|
520
520
|
const marketId = query.address.get('core.market');
|
|
521
|
-
const coinPrices =
|
|
521
|
+
const coinPrices =
|
|
522
|
+
(await query.utils.getCoinPrices(collateralCoinNames)) ?? {};
|
|
522
523
|
const marketCollaterals: MarketCollaterals = {};
|
|
523
524
|
|
|
524
525
|
if (indexer) {
|
|
@@ -42,9 +42,10 @@ export const getSpools = async (
|
|
|
42
42
|
query.utils.getSpoolRewardCoinName(stakeMarketCoinName);
|
|
43
43
|
return rewardCoinName;
|
|
44
44
|
});
|
|
45
|
-
const coinPrices =
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const coinPrices =
|
|
46
|
+
(await query.utils.getCoinPrices([
|
|
47
|
+
...new Set([...stakeCoinNames, ...rewardCoinNames]),
|
|
48
|
+
])) ?? {};
|
|
48
49
|
|
|
49
50
|
const marketPools = await query.getMarketPools(stakeCoinNames, indexer);
|
|
50
51
|
const spools: Spools = {};
|