@magmaprotocol/magma-clmm-sdk 0.5.59 → 0.5.61

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.d.ts CHANGED
@@ -1730,7 +1730,7 @@ type EventPositionLiquidity = {
1730
1730
  liquidity: number | string;
1731
1731
  x_equivalent: number | string;
1732
1732
  y_equivalent: number | string;
1733
- bin_ids: number[] | string[];
1733
+ bin_real_ids: number[];
1734
1734
  bin_x_eq: number[] | string[];
1735
1735
  bin_y_eq: number[] | string[];
1736
1736
  bin_liquidity: number[] | string[];
package/dist/index.js CHANGED
@@ -11128,7 +11128,6 @@ var DlmmModule = class {
11128
11128
  filter: { Package: this._sdk.sdkOptions.dlmm_pool.package_id }
11129
11129
  });
11130
11130
  const hasAssignPoolIds = assignPoolIds.length > 0;
11131
- const pools = [];
11132
11131
  for (const item of ownerRes.data) {
11133
11132
  const type = extractStructTagFromType(item.data.type);
11134
11133
  if (type.full_address === this.buildPositionType()) {
@@ -11144,21 +11143,20 @@ var DlmmModule = class {
11144
11143
  }
11145
11144
  }
11146
11145
  }
11147
- const pool_coins = await this.getPoolCoins(pools);
11148
- const _params = [];
11149
- for (const [key, value] of pool_coins.entries()) {
11150
- _params.push({
11151
- pool_id: key,
11152
- coin_a: value[0],
11153
- coin_b: value[1]
11154
- });
11155
- }
11156
11146
  const poolMap = /* @__PURE__ */ new Set();
11157
11147
  for (const item of allPosition) {
11158
11148
  poolMap.add(item.pool);
11159
11149
  }
11160
11150
  const poolList = await this.getPoolInfo(Array.from(poolMap));
11161
11151
  this.updateCache(`${DlmmScript}_positionList_poolList`, poolList, cacheTime24h);
11152
+ const _params = [];
11153
+ for (const pool of poolList) {
11154
+ _params.push({
11155
+ pool_id: pool.pool_id,
11156
+ coin_a: pool.coin_a,
11157
+ coin_b: pool.coin_b
11158
+ });
11159
+ }
11162
11160
  const pool_reward_coins = await this.getPairRewarders(_params);
11163
11161
  const out = [];
11164
11162
  for (const item of allPosition) {
@@ -11249,7 +11247,7 @@ var DlmmModule = class {
11249
11247
  liquidity: 0,
11250
11248
  x_equivalent: 0,
11251
11249
  y_equivalent: 0,
11252
- bin_ids: [],
11250
+ bin_real_ids: [],
11253
11251
  bin_x_eq: [],
11254
11252
  bin_y_eq: [],
11255
11253
  bin_liquidity: []
@@ -11260,7 +11258,7 @@ var DlmmModule = class {
11260
11258
  out.liquidity = item.parsedJson.liquidity;
11261
11259
  out.x_equivalent = item.parsedJson.x_equivalent;
11262
11260
  out.y_equivalent = item.parsedJson.y_equivalent;
11263
- out.bin_ids = item.parsedJson.bin_ids;
11261
+ out.bin_real_ids = item.parsedJson.bin_ids.map((id) => (0, import_calc_dlmm3.get_real_id)(id));
11264
11262
  out.bin_x_eq = item.parsedJson.bin_x_eq;
11265
11263
  out.bin_y_eq = item.parsedJson.bin_y_eq;
11266
11264
  out.bin_liquidity = item.parsedJson.bin_liquidity;