@magmaprotocol/magma-clmm-sdk 0.5.14 → 0.5.16
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 +18 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9273,7 +9273,23 @@ var GaugeModule = class {
|
|
|
9273
9273
|
continue;
|
|
9274
9274
|
}
|
|
9275
9275
|
const stakedPositionOfPool = await this.getUserStakedPositionInfoOfPool(userAddr, pool, gauger, coins[0], coins[1]);
|
|
9276
|
-
|
|
9276
|
+
console.log("stakedPositionOfPool", stakedPositionOfPool);
|
|
9277
|
+
stakedPositionOfPool.forEach((value) => {
|
|
9278
|
+
value.infos.forEach((info) => {
|
|
9279
|
+
res.push({
|
|
9280
|
+
coin_type_a: coins[0],
|
|
9281
|
+
coin_type_b: coins[1],
|
|
9282
|
+
liquidity: info.info.liquidity,
|
|
9283
|
+
tick_lower_index: asIntN(BigInt(info.info.tick_lower_index.bits)),
|
|
9284
|
+
tick_upper_index: asIntN(BigInt(info.info.tick_upper_index.bits)),
|
|
9285
|
+
pos_object_id: info.info.position_id,
|
|
9286
|
+
magma_distribution_staked: info.info.magma_distribution_staked,
|
|
9287
|
+
pool: info.pool_id,
|
|
9288
|
+
earned: info.earned,
|
|
9289
|
+
name: info.name
|
|
9290
|
+
});
|
|
9291
|
+
});
|
|
9292
|
+
});
|
|
9277
9293
|
}
|
|
9278
9294
|
return res;
|
|
9279
9295
|
}
|
|
@@ -9317,7 +9333,7 @@ var GaugeModule = class {
|
|
|
9317
9333
|
sender: simulationAccount.address
|
|
9318
9334
|
});
|
|
9319
9335
|
if (simulateRes.error != null) {
|
|
9320
|
-
throw new Error(`
|
|
9336
|
+
throw new Error(`getPoolGaguers error code: ${simulateRes.error ?? "unknown error"}`);
|
|
9321
9337
|
}
|
|
9322
9338
|
const poolGauger = /* @__PURE__ */ new Map();
|
|
9323
9339
|
simulateRes.events?.forEach((item) => {
|