@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.d.ts +2 -2
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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,16 @@ 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
|
+
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 (0, _decimaljs2.default)(rewardOneEmissionRate.toString()).div(PRECISION),
|
|
7669
|
-
rewardTwo: new (0, _decimaljs2.default)(rewardTwoEmissionRate.toString()).div(PRECISION)
|
|
7674
|
+
rewardOne: rewardOneEmissionRate ? new (0, _decimaljs2.default)(rewardOneEmissionRate.toString()).div(PRECISION) : void 0,
|
|
7675
|
+
rewardTwo: rewardTwoEmissionRate ? new (0, _decimaljs2.default)(rewardTwoEmissionRate.toString()).div(PRECISION) : void 0
|
|
7670
7676
|
};
|
|
7671
7677
|
}
|
|
7672
7678
|
/**
|