@scallop-io/sui-scallop-sdk 0.46.41 → 0.46.43

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
@@ -3323,7 +3323,7 @@ var getLendings = async (query, poolCoinNames, ownerAddress, indexer = false) =>
3323
3323
  );
3324
3324
  return lendings;
3325
3325
  };
3326
- var getLending = async (query, poolCoinName, ownerAddress, indexer = false, marketPool, spool, stakeAccounts, coinAmount, marketCoinAmount, sCoinAmount, coinPrice) => {
3326
+ var getLending = async (query, poolCoinName, ownerAddress, indexer = false, marketPool, spool, stakeAccounts, coinAmount, marketCoinAmount, coinPrice, sCoinAmount) => {
3327
3327
  const marketCoinName = query.utils.parseMarketCoinName(poolCoinName);
3328
3328
  marketPool = marketPool || await query.getMarketPool(poolCoinName, indexer);
3329
3329
  spool = spool || SUPPORT_SPOOLS.includes(marketCoinName) ? await query.getSpool(marketCoinName, indexer) : void 0;
@@ -3391,7 +3391,9 @@ var getLending = async (query, poolCoinName, ownerAddress, indexer = false, mark
3391
3391
  const marketCoinPrice = BigNumber4(coinPrice ?? 0).multipliedBy(
3392
3392
  marketPool?.conversionRate ?? 1
3393
3393
  );
3394
- const unstakedMarketAmount = BigNumber4(marketCoinAmount);
3394
+ const unstakedMarketAmount = BigNumber4(marketCoinAmount).plus(
3395
+ BigNumber4(sCoinAmount)
3396
+ );
3395
3397
  const unstakedMarketCoin = unstakedMarketAmount.shiftedBy(-1 * coinDecimal);
3396
3398
  const availableSupplyAmount = BigNumber4(coinAmount);
3397
3399
  const availableSupplyCoin = availableSupplyAmount.shiftedBy(-1 * coinDecimal);