@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.mjs CHANGED
@@ -2383,7 +2383,7 @@ var getMarketPools = async (query, poolCoinNames = [...SUPPORT_POOLS], indexer =
2383
2383
  const marketObjectResponse = await query.cache.queryGetObject(marketId, {
2384
2384
  showContent: true
2385
2385
  });
2386
- const coinPrices = await query.utils.getCoinPrices(poolCoinNames ?? []);
2386
+ const coinPrices = await query.utils.getCoinPrices(poolCoinNames) ?? {};
2387
2387
  const marketPools = {};
2388
2388
  if (indexer) {
2389
2389
  const marketPoolsIndexer = await query.indexer.getMarketPools();
@@ -2565,7 +2565,7 @@ var getMarketPool = async (query, poolCoinName, indexer = false, marketObject, c
2565
2565
  };
2566
2566
  var getMarketCollaterals = async (query, collateralCoinNames = [...SUPPORT_COLLATERALS], indexer = false) => {
2567
2567
  const marketId = query.address.get("core.market");
2568
- const coinPrices = await query.utils.getCoinPrices(collateralCoinNames ?? []);
2568
+ const coinPrices = await query.utils.getCoinPrices(collateralCoinNames) ?? {};
2569
2569
  const marketCollaterals = {};
2570
2570
  if (indexer) {
2571
2571
  const marketCollateralsIndexer = await query.indexer.getMarketCollaterals();
@@ -2874,9 +2874,9 @@ var getSpools = async (query, stakeMarketCoinNames = [...SUPPORT_SPOOLS], indexe
2874
2874
  const rewardCoinName = query.utils.getSpoolRewardCoinName(stakeMarketCoinName);
2875
2875
  return rewardCoinName;
2876
2876
  });
2877
- const coinPrices = await query.utils.getCoinPrices(
2878
- [.../* @__PURE__ */ new Set([...stakeCoinNames, ...rewardCoinNames])]
2879
- );
2877
+ const coinPrices = await query.utils.getCoinPrices([
2878
+ .../* @__PURE__ */ new Set([...stakeCoinNames, ...rewardCoinNames])
2879
+ ]) ?? {};
2880
2880
  const marketPools = await query.getMarketPools(stakeCoinNames, indexer);
2881
2881
  const spools = {};
2882
2882
  if (indexer) {
@@ -3256,14 +3256,12 @@ var queryBorrowIncentivePools = async (query, borrowIncentiveCoinNames = [
3256
3256
  ...SUPPORT_BORROW_INCENTIVE_POOLS
3257
3257
  ], indexer = false) => {
3258
3258
  const borrowIncentivePools = {};
3259
- const coinPrices = await query.utils.getCoinPrices(
3260
- [
3261
- .../* @__PURE__ */ new Set([
3262
- ...borrowIncentiveCoinNames,
3263
- ...SUPPORT_BORROW_INCENTIVE_REWARDS
3264
- ])
3265
- ]
3266
- );
3259
+ const coinPrices = await query.utils.getCoinPrices([
3260
+ .../* @__PURE__ */ new Set([
3261
+ ...borrowIncentiveCoinNames,
3262
+ ...SUPPORT_BORROW_INCENTIVE_REWARDS
3263
+ ])
3264
+ ]) ?? {};
3267
3265
  if (indexer) {
3268
3266
  const borrowIncentivePoolsIndexer = await query.indexer.getBorrowIncentivePools();
3269
3267
  const updateBorrowIncentivePool = (pool) => {
@@ -5157,7 +5155,7 @@ var generateCoreQuickMethod = ({
5157
5155
  const obligationCoinNames = await builder.utils.getObligationCoinNames(
5158
5156
  obligationInfo.obligationId
5159
5157
  ) ?? [];
5160
- const updateCoinNames = [...obligationCoinNames ?? [], poolCoinName];
5158
+ const updateCoinNames = [...obligationCoinNames, poolCoinName];
5161
5159
  await updateOracles(builder, txBlock, updateCoinNames);
5162
5160
  return txBlock.borrow(
5163
5161
  obligationInfo.obligationId,