@meteora-ag/dlmm 1.5.0-sam.1 → 1.5.0-sam.3
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 +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9390,10 +9390,11 @@ function toWeightBidAsk(minBinId, maxBinId, activeId) {
|
|
|
9390
9390
|
return distributions;
|
|
9391
9391
|
}
|
|
9392
9392
|
function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amountX, amountY, amountXInActiveBin, amountYInActiveBin, strategyType, mintX, mintY, clock) {
|
|
9393
|
-
console.log("SDK", activeId, minBinId, maxBinId);
|
|
9393
|
+
console.log("SDK", strategyType, activeId, minBinId, maxBinId);
|
|
9394
9394
|
const isSingleSideX = amountY.isZero();
|
|
9395
9395
|
switch (strategyType) {
|
|
9396
9396
|
case 0 /* Spot */: {
|
|
9397
|
+
console.log(activeId < minBinId || activeId > maxBinId);
|
|
9397
9398
|
if (activeId < minBinId || activeId > maxBinId) {
|
|
9398
9399
|
const weights = toWeightSpotBalanced(minBinId, maxBinId);
|
|
9399
9400
|
return toAmountBothSide(
|
|
@@ -9413,6 +9414,7 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
|
|
|
9413
9414
|
if (!isSingleSideX) {
|
|
9414
9415
|
if (minBinId <= activeId) {
|
|
9415
9416
|
const weights = toWeightSpotBalanced(minBinId, activeId);
|
|
9417
|
+
console.log("\u{1F680} ~ weights:", weights);
|
|
9416
9418
|
const amounts = toAmountBidSide(
|
|
9417
9419
|
activeId,
|
|
9418
9420
|
amountY,
|
|
@@ -9420,6 +9422,7 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
|
|
|
9420
9422
|
mintY,
|
|
9421
9423
|
clock
|
|
9422
9424
|
);
|
|
9425
|
+
console.log("\u{1F680} ~ amounts:", amounts);
|
|
9423
9426
|
for (let bin of amounts) {
|
|
9424
9427
|
amountsInBin.push({
|
|
9425
9428
|
binId: bin.binId,
|