@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 CHANGED
@@ -4676,8 +4676,8 @@ interface FeeInfo {
4676
4676
  protocolFeePercentage: Decimal;
4677
4677
  }
4678
4678
  interface EmissionRate {
4679
- rewardOne: Decimal;
4680
- rewardTwo: Decimal;
4679
+ rewardOne: Decimal | undefined;
4680
+ rewardTwo: Decimal | undefined;
4681
4681
  }
4682
4682
  interface SwapFee {
4683
4683
  feeX: BN;
package/dist/index.js 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 [rewardOneEmissionRate, rewardTwoEmissionRate] = this.lbPair.rewardInfos.map(({ rewardRate }) => rewardRate);
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 (0, _decimaljs2.default)(rewardOneEmissionRate.toString()).div(PRECISION),
7669
- rewardTwo: new (0, _decimaljs2.default)(rewardTwoEmissionRate.toString()).div(PRECISION)
7671
+ rewardOne: rewardOneEmissionRate ? new (0, _decimaljs2.default)(rewardOneEmissionRate.toString()).div(PRECISION) : void 0,
7672
+ rewardTwo: rewardTwoEmissionRate ? new (0, _decimaljs2.default)(rewardTwoEmissionRate.toString()).div(PRECISION) : void 0
7670
7673
  };
7671
7674
  }
7672
7675
  /**