@meteora-ag/dlmm 1.0.39-rc.1 → 1.0.39-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.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9904,10 +9904,10 @@ var DLMM = class {
|
|
|
9904
9904
|
}).add(syncWithMarketPriceTx);
|
|
9905
9905
|
}
|
|
9906
9906
|
async getLastPrice() {
|
|
9907
|
-
const {
|
|
9907
|
+
const { price } = await this.getActiveBin();
|
|
9908
9908
|
const binArrays = await this.getBinArrays();
|
|
9909
9909
|
let count = 0;
|
|
9910
|
-
let binPriceWithLastLiquidity =
|
|
9910
|
+
let binPriceWithLastLiquidity = price;
|
|
9911
9911
|
while (count <= binArrays.length - 1) {
|
|
9912
9912
|
const binArray = binArrays[count];
|
|
9913
9913
|
if (binArray) {
|
|
@@ -9918,9 +9918,7 @@ var DLMM = class {
|
|
|
9918
9918
|
const lastBinWithLiquidityIndex = bins.findIndex(
|
|
9919
9919
|
({ liquiditySupply }) => liquiditySupply.isZero()
|
|
9920
9920
|
);
|
|
9921
|
-
binPriceWithLastLiquidity =
|
|
9922
|
-
bins[lastBinWithLiquidityIndex - 1].price.toNumber()
|
|
9923
|
-
);
|
|
9921
|
+
binPriceWithLastLiquidity = bins[lastBinWithLiquidityIndex - 1].price.toString();
|
|
9924
9922
|
count = binArrays.length;
|
|
9925
9923
|
}
|
|
9926
9924
|
}
|