@scallop-io/sui-scallop-sdk 0.46.32 → 0.46.33

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
@@ -3034,9 +3034,10 @@ var getObligationAccount = async (query, obligationId, ownerAddress, indexer = f
3034
3034
  let availableClaimCoin = BigNumber4(0);
3035
3035
  const accountBorrowedAmount = BigNumber4(accountPoint.weightedAmount);
3036
3036
  const baseIndexRate = 1e9;
3037
- const increasedPointRate = poolPoint.currentPointIndex ? BigNumber4(
3038
- poolPoint.currentPointIndex - accountPoint.index
3039
- ).dividedBy(baseIndexRate) : 1;
3037
+ const increasedPointRate = poolPoint.currentPointIndex ? Math.max(
3038
+ BigNumber4(poolPoint.currentPointIndex - accountPoint.index).dividedBy(baseIndexRate).toNumber(),
3039
+ 0
3040
+ ) : 1;
3040
3041
  availableClaimAmount = availableClaimAmount.plus(
3041
3042
  accountBorrowedAmount.multipliedBy(increasedPointRate).plus(accountPoint.points)
3042
3043
  );
@@ -3049,7 +3050,7 @@ var getObligationAccount = async (query, obligationId, ownerAddress, indexer = f
3049
3050
  ).isFinite() ? BigNumber4(accountPoint.weightedAmount).div(
3050
3051
  BigNumber4(borrowIncentiveAccount.debtAmount).multipliedBy(poolPoint.baseWeight).dividedBy(weightScale)
3051
3052
  ).toNumber() : 1;
3052
- if (availableClaimAmount.isGreaterThan(0)) {
3053
+ if (availableClaimAmount.isGreaterThanOrEqualTo(0)) {
3053
3054
  rewards.push({
3054
3055
  coinName: poolPoint.coinName,
3055
3056
  coinType: poolPoint.coinType,