@scallop-io/sui-scallop-sdk 0.44.17 → 0.44.18
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 +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/utils/query.ts +6 -1
package/package.json
CHANGED
package/src/utils/query.ts
CHANGED
|
@@ -359,12 +359,17 @@ export const calculateSpoolRewardPoolData = (
|
|
|
359
359
|
.shiftedBy(-1 * rewardCoinDecimal)
|
|
360
360
|
.multipliedBy(rateYearFactor)
|
|
361
361
|
.multipliedBy(rewardCoinPrice);
|
|
362
|
-
|
|
362
|
+
|
|
363
|
+
let rewardRate = rewardValueForYear
|
|
363
364
|
.dividedBy(calculatedSpoolData.stakedValue)
|
|
364
365
|
.isFinite()
|
|
365
366
|
? rewardValueForYear.dividedBy(calculatedSpoolData.stakedValue).toNumber()
|
|
366
367
|
: Infinity;
|
|
367
368
|
|
|
369
|
+
if (parsedSpoolData.maxPoint === parsedSpoolData.distributedPoint) {
|
|
370
|
+
rewardRate = Infinity;
|
|
371
|
+
}
|
|
372
|
+
|
|
368
373
|
return {
|
|
369
374
|
rewardApr: rewardRate,
|
|
370
375
|
totalRewardAmount: totalRewardAmount.toNumber(),
|