@magmaprotocol/magma-clmm-sdk 0.5.23 → 0.5.24

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
@@ -9439,18 +9439,20 @@ var GaugeModule = class {
9439
9439
  ;
9440
9440
  value.infos.forEach((info) => {
9441
9441
  if (info.info) {
9442
- res.push({
9443
- coin_type_a: coins[0],
9444
- coin_type_b: coins[1],
9445
- liquidity: info.info.fields.liquidity,
9446
- tick_lower_index: asIntN(BigInt(info.info.fields.tick_lower_index.fields.bits)),
9447
- tick_upper_index: asIntN(BigInt(info.info.fields.tick_upper_index.fields.bits)),
9448
- pos_object_id: info.info.fields.position_id,
9449
- magma_distribution_staked: info.info.fields.magma_distribution_staked,
9450
- pool: info.pool_id,
9451
- earned: info.earned,
9452
- name: info.name
9453
- });
9442
+ if (res.findIndex((position) => position.pos_object_id === info.info.info.fields.position_id) > -1) {
9443
+ res.push({
9444
+ coin_type_a: coins[0],
9445
+ coin_type_b: coins[1],
9446
+ liquidity: info.info.fields.liquidity,
9447
+ tick_lower_index: asIntN(BigInt(info.info.fields.tick_lower_index.fields.bits)),
9448
+ tick_upper_index: asIntN(BigInt(info.info.fields.tick_upper_index.fields.bits)),
9449
+ pos_object_id: info.info.fields.position_id,
9450
+ magma_distribution_staked: info.info.fields.magma_distribution_staked,
9451
+ pool: info.pool_id,
9452
+ earned: info.earned,
9453
+ name: info.name
9454
+ });
9455
+ }
9454
9456
  }
9455
9457
  });
9456
9458
  });