@meteora-ag/dlmm 1.0.43 → 1.0.44-rc.1

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
@@ -7663,10 +7663,16 @@ var DLMM = class {
7663
7663
  * `rewardTwo`, both of which are of type `Decimal`.
7664
7664
  */
7665
7665
  getEmissionRate() {
7666
- const [rewardOneEmissionRate, rewardTwoEmissionRate] = this.lbPair.rewardInfos.map(({ rewardRate }) => rewardRate);
7666
+ const now = Date.now() / 1e3;
7667
+ console.log("namgold debug rewardInfos", {
7668
+ rewardInfos: this.lbPair.rewardInfos
7669
+ });
7670
+ const [rewardOneEmissionRate, rewardTwoEmissionRate] = this.lbPair.rewardInfos.map(
7671
+ ({ rewardRate, rewardDurationEnd }) => now > rewardDurationEnd.toNumber() ? void 0 : rewardRate
7672
+ );
7667
7673
  return {
7668
- rewardOne: new Decimal4(rewardOneEmissionRate.toString()).div(PRECISION),
7669
- rewardTwo: new Decimal4(rewardTwoEmissionRate.toString()).div(PRECISION)
7674
+ rewardOne: rewardOneEmissionRate ? new Decimal4(rewardOneEmissionRate.toString()).div(PRECISION) : void 0,
7675
+ rewardTwo: rewardTwoEmissionRate ? new Decimal4(rewardTwoEmissionRate.toString()).div(PRECISION) : void 0
7670
7676
  };
7671
7677
  }
7672
7678
  /**