@meteora-ag/dlmm 1.5.2 → 1.5.3-rc.0
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 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14846,8 +14846,8 @@ var DLMM = class {
|
|
|
14846
14846
|
const binSupply = bin.supply;
|
|
14847
14847
|
const posShare = posShares[idx];
|
|
14848
14848
|
const posBinRewardInfo = positionRewardInfos[idx];
|
|
14849
|
-
const positionXAmount = binSupply.eq(ZERO) ?
|
|
14850
|
-
const positionYAmount = binSupply.eq(ZERO) ?
|
|
14849
|
+
const positionXAmount = binSupply.eq(ZERO) ? new (0, _decimaljs2.default)(0) : new (0, _decimaljs2.default)(posShare.toString()).mul(new (0, _decimaljs2.default)(bin.xAmount.toString())).div(new (0, _decimaljs2.default)(binSupply.toString()));
|
|
14850
|
+
const positionYAmount = binSupply.eq(ZERO) ? new (0, _decimaljs2.default)(0) : new (0, _decimaljs2.default)(posShare.toString()).mul(new (0, _decimaljs2.default)(bin.yAmount.toString())).div(new (0, _decimaljs2.default)(binSupply.toString())).floor();
|
|
14851
14851
|
totalXAmount = totalXAmount.add(new (0, _decimaljs2.default)(positionXAmount.toString()));
|
|
14852
14852
|
totalYAmount = totalYAmount.add(new (0, _decimaljs2.default)(positionYAmount.toString()));
|
|
14853
14853
|
const feeInfo = feeInfos[idx];
|
|
@@ -14910,8 +14910,8 @@ var DLMM = class {
|
|
|
14910
14910
|
binYAmount: bin.yAmount.toString(),
|
|
14911
14911
|
binLiquidity: binSupply.toString(),
|
|
14912
14912
|
positionLiquidity: posShare.toString(),
|
|
14913
|
-
positionXAmount: positionXAmount.
|
|
14914
|
-
positionYAmount: positionYAmount.
|
|
14913
|
+
positionXAmount: positionXAmount.toFixed(),
|
|
14914
|
+
positionYAmount: positionYAmount.toFixed(),
|
|
14915
14915
|
positionFeeXAmount: claimableFeeX.toString(),
|
|
14916
14916
|
positionFeeYAmount: claimableFeeY.toString(),
|
|
14917
14917
|
positionRewardAmount: claimableRewardsInBin.map(
|