@meteora-ag/dlmm 1.0.43 → 1.0.44-rc.2
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.d.ts +2 -2
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7663,10 +7663,13 @@ var DLMM = class {
|
|
|
7663
7663
|
* `rewardTwo`, both of which are of type `Decimal`.
|
|
7664
7664
|
*/
|
|
7665
7665
|
getEmissionRate() {
|
|
7666
|
-
const
|
|
7666
|
+
const now = Date.now() / 1e3;
|
|
7667
|
+
const [rewardOneEmissionRate, rewardTwoEmissionRate] = this.lbPair.rewardInfos.map(
|
|
7668
|
+
({ rewardRate, rewardDurationEnd }) => now > rewardDurationEnd.toNumber() ? void 0 : rewardRate
|
|
7669
|
+
);
|
|
7667
7670
|
return {
|
|
7668
|
-
rewardOne: new Decimal4(rewardOneEmissionRate.toString()).div(PRECISION),
|
|
7669
|
-
rewardTwo: new Decimal4(rewardTwoEmissionRate.toString()).div(PRECISION)
|
|
7671
|
+
rewardOne: rewardOneEmissionRate ? new Decimal4(rewardOneEmissionRate.toString()).div(PRECISION) : void 0,
|
|
7672
|
+
rewardTwo: rewardTwoEmissionRate ? new Decimal4(rewardTwoEmissionRate.toString()).div(PRECISION) : void 0
|
|
7670
7673
|
};
|
|
7671
7674
|
}
|
|
7672
7675
|
/**
|