@meteora-ag/dlmm 1.5.2-rc.6 → 1.5.2-rc.7

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 CHANGED
@@ -11854,10 +11854,6 @@ var DLMM = class {
11854
11854
  const positions = [
11855
11855
  ...positionsV2.map((p) => new PositionV2Wrapper(p.publicKey, p.account))
11856
11856
  ];
11857
- console.log(
11858
- "\u{1F680} ~ DLMM ~ getPositionsByUserAndLbPair ~ positions:",
11859
- positions[0].liquidityShares().map((p) => p.toString())
11860
- );
11861
11857
  if (!positions) {
11862
11858
  throw new Error("Error fetching positions");
11863
11859
  }
@@ -14797,10 +14793,6 @@ var DLMM = class {
14797
14793
  const lowerBinId = position.lowerBinId();
14798
14794
  const upperBinId = position.upperBinId();
14799
14795
  const posShares = position.liquidityShares();
14800
- console.log(
14801
- "\u{1F680} ~ DLMM ~ posShares:",
14802
- posShares.map((s) => s.toString())
14803
- );
14804
14796
  const lastUpdatedAt = position.lastUpdatedAt();
14805
14797
  const feeInfos = position.feeInfos();
14806
14798
  const totalClaimedFeeXAmount = position.totalClaimedFeeXAmount();
@@ -14830,14 +14822,8 @@ var DLMM = class {
14830
14822
  const binSupply = bin.supply;
14831
14823
  const posShare = posShares[idx];
14832
14824
  const posBinRewardInfo = positionRewardInfos[idx];
14833
- if (bin.binId === 17630) {
14834
- console.log("index", idx);
14835
- console.log("supply", binSupply.toString());
14836
- console.log("share", posShare.toString());
14837
- console.log("binXAmount", bin.xAmount.toString());
14838
- }
14839
- const positionXAmount = binSupply.eq(ZERO) ? ZERO : posShare.mul(bin.xAmount).div(binSupply);
14840
- const positionYAmount = binSupply.eq(ZERO) ? ZERO : posShare.mul(bin.yAmount).div(binSupply);
14825
+ const positionXAmount = binSupply.eq(ZERO) ? ZERO : new (0, _decimaljs2.default)(posShare.toString()).mul(new (0, _decimaljs2.default)(bin.xAmount.toString())).div(new (0, _decimaljs2.default)(binSupply.toString()));
14826
+ const positionYAmount = binSupply.eq(ZERO) ? ZERO : new (0, _decimaljs2.default)(posShare.toString()).mul(new (0, _decimaljs2.default)(bin.yAmount.toString())).div(new (0, _decimaljs2.default)(binSupply.toString()));
14841
14827
  totalXAmount = totalXAmount.add(new (0, _decimaljs2.default)(positionXAmount.toString()));
14842
14828
  totalYAmount = totalYAmount.add(new (0, _decimaljs2.default)(positionYAmount.toString()));
14843
14829
  const feeInfo = feeInfos[idx];