@meteora-ag/dlmm 1.0.49-rc.1 → 1.0.49-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 +2 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9768,11 +9768,6 @@ var DLMM = class {
|
|
|
9768
9768
|
sParameters2,
|
|
9769
9769
|
activeId.toNumber()
|
|
9770
9770
|
);
|
|
9771
|
-
console.log(
|
|
9772
|
-
activeId.toString(),
|
|
9773
|
-
binArrayAccountToSwap.account.index.toString(),
|
|
9774
|
-
isBinIdWithinBinArray(activeId, binArrayAccountToSwap.account.index)
|
|
9775
|
-
);
|
|
9776
9771
|
if (isBinIdWithinBinArray(activeId, binArrayAccountToSwap.account.index)) {
|
|
9777
9772
|
const bin = getBinFromBinArray(
|
|
9778
9773
|
activeId.toNumber(),
|
|
@@ -9786,13 +9781,6 @@ var DLMM = class {
|
|
|
9786
9781
|
inAmountLeft,
|
|
9787
9782
|
swapForY
|
|
9788
9783
|
);
|
|
9789
|
-
console.log(
|
|
9790
|
-
"\u{1F680} ~ DLMM ~ amountIn:",
|
|
9791
|
-
amountIn.toString(),
|
|
9792
|
-
amountOut.toString(),
|
|
9793
|
-
fee.toString(),
|
|
9794
|
-
protocolFee.toString()
|
|
9795
|
-
);
|
|
9796
9784
|
if (!amountIn.isZero()) {
|
|
9797
9785
|
inAmountLeft = inAmountLeft.sub(amountIn);
|
|
9798
9786
|
actualOutAmount = actualOutAmount.add(amountOut);
|
|
@@ -10750,7 +10738,7 @@ var DLMM = class {
|
|
|
10750
10738
|
}).add(syncWithMarketPriceTx);
|
|
10751
10739
|
}
|
|
10752
10740
|
async getMaxPriceInBinArrays(binArrayAccounts) {
|
|
10753
|
-
const sortedBinArrays = binArrayAccounts.sort(
|
|
10741
|
+
const sortedBinArrays = [...binArrayAccounts].sort(
|
|
10754
10742
|
({ account: { index: indexA } }, { account: { index: indexB } }) => indexA.toNumber() - indexB.toNumber()
|
|
10755
10743
|
);
|
|
10756
10744
|
let count = sortedBinArrays.length - 1;
|
|
@@ -10758,7 +10746,7 @@ var DLMM = class {
|
|
|
10758
10746
|
while (count >= 0) {
|
|
10759
10747
|
const binArray = sortedBinArrays[count];
|
|
10760
10748
|
if (binArray) {
|
|
10761
|
-
const bins = binArray.account.bins
|
|
10749
|
+
const bins = binArray.account.bins;
|
|
10762
10750
|
if (bins.every(({ amountX }) => amountX.isZero())) {
|
|
10763
10751
|
count--;
|
|
10764
10752
|
} else {
|