@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 CHANGED
@@ -2457,7 +2457,7 @@ var getMarketPools = async (query, poolCoinNames = [...SUPPORT_POOLS], indexer =
2457
2457
  const marketObjectResponse = await query.cache.queryGetObject(marketId, {
2458
2458
  showContent: true
2459
2459
  });
2460
- const coinPrices = await query.utils.getCoinPrices(poolCoinNames ?? []);
2460
+ const coinPrices = await query.utils.getCoinPrices(poolCoinNames) ?? {};
2461
2461
  const marketPools = {};
2462
2462
  if (indexer) {
2463
2463
  const marketPoolsIndexer = await query.indexer.getMarketPools();
@@ -2639,7 +2639,7 @@ var getMarketPool = async (query, poolCoinName, indexer = false, marketObject, c
2639
2639
  };
2640
2640
  var getMarketCollaterals = async (query, collateralCoinNames = [...SUPPORT_COLLATERALS], indexer = false) => {
2641
2641
  const marketId = query.address.get("core.market");
2642
- const coinPrices = await query.utils.getCoinPrices(collateralCoinNames ?? []);
2642
+ const coinPrices = await query.utils.getCoinPrices(collateralCoinNames) ?? {};
2643
2643
  const marketCollaterals = {};
2644
2644
  if (indexer) {
2645
2645
  const marketCollateralsIndexer = await query.indexer.getMarketCollaterals();
@@ -2948,9 +2948,9 @@ var getSpools = async (query, stakeMarketCoinNames = [...SUPPORT_SPOOLS], indexe
2948
2948
  const rewardCoinName = query.utils.getSpoolRewardCoinName(stakeMarketCoinName);
2949
2949
  return rewardCoinName;
2950
2950
  });
2951
- const coinPrices = await query.utils.getCoinPrices(
2952
- [.../* @__PURE__ */ new Set([...stakeCoinNames, ...rewardCoinNames])]
2953
- );
2951
+ const coinPrices = await query.utils.getCoinPrices([
2952
+ .../* @__PURE__ */ new Set([...stakeCoinNames, ...rewardCoinNames])
2953
+ ]) ?? {};
2954
2954
  const marketPools = await query.getMarketPools(stakeCoinNames, indexer);
2955
2955
  const spools = {};
2956
2956
  if (indexer) {
@@ -3330,14 +3330,12 @@ var queryBorrowIncentivePools = async (query, borrowIncentiveCoinNames = [
3330
3330
  ...SUPPORT_BORROW_INCENTIVE_POOLS
3331
3331
  ], indexer = false) => {
3332
3332
  const borrowIncentivePools = {};
3333
- const coinPrices = await query.utils.getCoinPrices(
3334
- [
3335
- .../* @__PURE__ */ new Set([
3336
- ...borrowIncentiveCoinNames,
3337
- ...SUPPORT_BORROW_INCENTIVE_REWARDS
3338
- ])
3339
- ]
3340
- );
3333
+ const coinPrices = await query.utils.getCoinPrices([
3334
+ .../* @__PURE__ */ new Set([
3335
+ ...borrowIncentiveCoinNames,
3336
+ ...SUPPORT_BORROW_INCENTIVE_REWARDS
3337
+ ])
3338
+ ]) ?? {};
3341
3339
  if (indexer) {
3342
3340
  const borrowIncentivePoolsIndexer = await query.indexer.getBorrowIncentivePools();
3343
3341
  const updateBorrowIncentivePool = (pool) => {
@@ -5228,7 +5226,7 @@ var generateCoreQuickMethod = ({
5228
5226
  const obligationCoinNames = await builder.utils.getObligationCoinNames(
5229
5227
  obligationInfo.obligationId
5230
5228
  ) ?? [];
5231
- const updateCoinNames = [...obligationCoinNames ?? [], poolCoinName];
5229
+ const updateCoinNames = [...obligationCoinNames, poolCoinName];
5232
5230
  await updateOracles(builder, txBlock, updateCoinNames);
5233
5231
  return txBlock.borrow(
5234
5232
  obligationInfo.obligationId,