@meteora-ag/dlmm 1.5.0-sam.0 → 1.5.0-sam.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 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7843,7 +7843,6 @@ function toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBi
|
|
|
7843
7843
|
let totalWeightX = wx0;
|
|
7844
7844
|
let totalWeightY = wy0;
|
|
7845
7845
|
distributions.forEach((element) => {
|
|
7846
|
-
console.log("\u{1F680} ~ distributions.forEach ~ element:", element.binId);
|
|
7847
7846
|
if (element.binId < activeId) {
|
|
7848
7847
|
totalWeightY = totalWeightY.add(new (0, _decimaljs2.default)(element.weight));
|
|
7849
7848
|
}
|
|
@@ -9391,6 +9390,7 @@ function toWeightBidAsk(minBinId, maxBinId, activeId) {
|
|
|
9391
9390
|
return distributions;
|
|
9392
9391
|
}
|
|
9393
9392
|
function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amountX, amountY, amountXInActiveBin, amountYInActiveBin, strategyType, mintX, mintY, clock) {
|
|
9393
|
+
console.log("SDK", activeId, minBinId, maxBinId);
|
|
9394
9394
|
const isSingleSideX = amountY.isZero();
|
|
9395
9395
|
switch (strategyType) {
|
|
9396
9396
|
case 0 /* Spot */: {
|
|
@@ -9413,6 +9413,7 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
|
|
|
9413
9413
|
if (!isSingleSideX) {
|
|
9414
9414
|
if (minBinId <= activeId) {
|
|
9415
9415
|
const weights = toWeightSpotBalanced(minBinId, activeId);
|
|
9416
|
+
console.log("\u{1F680} ~ weights:", weights);
|
|
9416
9417
|
const amounts = toAmountBidSide(
|
|
9417
9418
|
activeId,
|
|
9418
9419
|
amountY,
|
|
@@ -9420,6 +9421,7 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
|
|
|
9420
9421
|
mintY,
|
|
9421
9422
|
clock
|
|
9422
9423
|
);
|
|
9424
|
+
console.log("\u{1F680} ~ amounts:", amounts);
|
|
9423
9425
|
for (let bin of amounts) {
|
|
9424
9426
|
amountsInBin.push({
|
|
9425
9427
|
binId: bin.binId,
|