@scallop-io/sui-scallop-sdk 0.44.19 → 0.44.20

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
@@ -1207,12 +1207,20 @@ var calculateBorrowIncentivePoolPointData = (pasredBorrowIncentinvePoolData, par
1207
1207
  );
1208
1208
  const weightedStakedValue = weightedStakedCoin.multipliedBy(poolCoinPrice);
1209
1209
  const rateYearFactor = 365 * 24 * 60 * 60;
1210
- const rewardPerSec = (0, import_bignumber.default)(distributedPointPerSec).dividedBy(
1211
- parsedBorrowIncentivePoolPointData.period
1210
+ const rewardPerSec = (0, import_bignumber.default)(distributedPointPerSec).shiftedBy(
1211
+ -1 * rewardCoinDecimal
1212
1212
  );
1213
- const rewardValueForYear = (0, import_bignumber.default)(rewardPerSec).shiftedBy(-1 * rewardCoinDecimal).multipliedBy(rateYearFactor).multipliedBy(rewardCoinPrice);
1213
+ const rewardValueForYear = (0, import_bignumber.default)(rewardPerSec).multipliedBy(rateYearFactor).multipliedBy(rewardCoinPrice);
1214
1214
  const weightScale = (0, import_bignumber.default)("1000000000000");
1215
- const rewardRate = rewardValueForYear.dividedBy(weightedStakedValue).multipliedBy(parsedBorrowIncentivePoolPointData.baseWeight).dividedBy(weightScale).isFinite() ? rewardValueForYear.dividedBy(weightedStakedValue).multipliedBy(parsedBorrowIncentivePoolPointData.baseWeight).dividedBy(weightScale).toNumber() : Infinity;
1215
+ const rewardRate = rewardValueForYear.multipliedBy(
1216
+ (0, import_bignumber.default)(parsedBorrowIncentivePoolPointData.baseWeight).dividedBy(
1217
+ weightScale
1218
+ )
1219
+ ).dividedBy(weightedStakedValue).isFinite() ? rewardValueForYear.multipliedBy(
1220
+ (0, import_bignumber.default)(parsedBorrowIncentivePoolPointData.baseWeight).dividedBy(
1221
+ weightScale
1222
+ )
1223
+ ).dividedBy(weightedStakedValue).toNumber() : Infinity;
1216
1224
  return {
1217
1225
  distributedPointPerSec: distributedPointPerSec.toNumber(),
1218
1226
  accumulatedPoints: accumulatedPoints.toNumber(),
@@ -1305,7 +1313,12 @@ var parseAssetSymbol = (coinName) => {
1305
1313
  };
1306
1314
  var parseDataFromPythPriceFeed = (feed, address) => {
1307
1315
  const assetCoinNames = [
1308
- .../* @__PURE__ */ new Set([...SUPPORT_POOLS, ...SUPPORT_COLLATERALS])
1316
+ .../* @__PURE__ */ new Set([
1317
+ ...SUPPORT_POOLS,
1318
+ ...SUPPORT_COLLATERALS,
1319
+ ...SUPPORT_SPOOLS_REWARDS,
1320
+ ...SUPPORT_BORROW_INCENTIVE_REWARDS
1321
+ ])
1309
1322
  ];
1310
1323
  const assetCoinName = assetCoinNames.find((assetCoinName2) => {
1311
1324
  return address.get(`core.coins.${assetCoinName2}.oracle.pyth.feed`) === feed.id;