@meteora-ag/dlmm 1.5.0-sam.3 → 1.5.0-sam.5

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
@@ -9392,9 +9392,10 @@ function toWeightBidAsk(minBinId, maxBinId, activeId) {
9392
9392
  function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amountX, amountY, amountXInActiveBin, amountYInActiveBin, strategyType, mintX, mintY, clock) {
9393
9393
  console.log("SDK", strategyType, activeId, minBinId, maxBinId);
9394
9394
  const isSingleSideX = amountY.isZero();
9395
+ console.log("\u{1F680} ~ isSingleSideX:", isSingleSideX);
9395
9396
  switch (strategyType) {
9396
9397
  case 0 /* Spot */: {
9397
- console.log(activeId < minBinId || activeId > maxBinId);
9398
+ console.log("test0", activeId < minBinId || activeId > maxBinId);
9398
9399
  if (activeId < minBinId || activeId > maxBinId) {
9399
9400
  const weights = toWeightSpotBalanced(minBinId, maxBinId);
9400
9401
  return toAmountBothSide(
@@ -9412,6 +9413,7 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
9412
9413
  }
9413
9414
  const amountsInBin = [];
9414
9415
  if (!isSingleSideX) {
9416
+ console.log("test", minBinId <= activeId);
9415
9417
  if (minBinId <= activeId) {
9416
9418
  const weights = toWeightSpotBalanced(minBinId, activeId);
9417
9419
  console.log("\u{1F680} ~ weights:", weights);
@@ -9431,8 +9433,10 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
9431
9433
  });
9432
9434
  }
9433
9435
  }
9436
+ console.log("test2", activeId < maxBinId);
9434
9437
  if (activeId < maxBinId) {
9435
9438
  const weights = toWeightSpotBalanced(activeId + 1, maxBinId);
9439
+ console.log("\u{1F680} ~ weights:", weights);
9436
9440
  const amounts = toAmountAskSide(
9437
9441
  activeId,
9438
9442
  binStep,
@@ -9441,6 +9445,7 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
9441
9445
  mintX,
9442
9446
  clock
9443
9447
  );
9448
+ console.log("\u{1F680} ~ amounts:", amounts);
9444
9449
  for (let bin of amounts) {
9445
9450
  amountsInBin.push({
9446
9451
  binId: bin.binId,