@meteora-ag/dlmm 1.0.39-rc.8 → 1.0.39-rc.9
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 +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9909,20 +9909,20 @@ var DLMM = class {
|
|
|
9909
9909
|
let count = 0;
|
|
9910
9910
|
let binPriceWithLastLiquidity = minPrice;
|
|
9911
9911
|
while (count <= binArrays.length - 1) {
|
|
9912
|
-
const binArray = binArrays
|
|
9912
|
+
const binArray = binArrays[count];
|
|
9913
9913
|
if (binArray) {
|
|
9914
9914
|
const bins = binArray.account.bins;
|
|
9915
|
-
if (bins.every(({ liquiditySupply }) => liquiditySupply.isZero())) {
|
|
9915
|
+
if (bins.every(({ liquiditySupply }) => !liquiditySupply.isZero())) {
|
|
9916
9916
|
count++;
|
|
9917
9917
|
} else {
|
|
9918
9918
|
const lastBinWithLiquidityIndex = bins.findIndex(
|
|
9919
|
-
({ liquiditySupply }) =>
|
|
9919
|
+
({ liquiditySupply }) => liquiditySupply.isZero()
|
|
9920
9920
|
);
|
|
9921
9921
|
console.log(
|
|
9922
|
-
bins[lastBinWithLiquidityIndex].amountX.toString(),
|
|
9923
|
-
bins[lastBinWithLiquidityIndex].amountY.toString()
|
|
9922
|
+
bins[lastBinWithLiquidityIndex - 1].amountX.toString(),
|
|
9923
|
+
bins[lastBinWithLiquidityIndex - 1].amountY.toString()
|
|
9924
9924
|
);
|
|
9925
|
-
binPriceWithLastLiquidity = bins[lastBinWithLiquidityIndex].price.toString();
|
|
9925
|
+
binPriceWithLastLiquidity = bins[lastBinWithLiquidityIndex - 1].price.toString();
|
|
9926
9926
|
count = binArrays.length;
|
|
9927
9927
|
}
|
|
9928
9928
|
}
|