@magmaprotocol/magma-clmm-sdk 0.5.57 → 0.5.59

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.mjs CHANGED
@@ -10943,17 +10943,13 @@ var DlmmModule = class {
10943
10943
  this.updateCache(`${DlmmScript}_positionList_poolList`, poolList, cacheTime24h);
10944
10944
  const pool_reward_coins = await this.getPairRewarders(_params);
10945
10945
  const out = [];
10946
- for (let index = 0; index < allPosition.length; index++) {
10947
- const item = allPosition[index];
10948
- }
10949
10946
  for (const item of allPosition) {
10950
10947
  const pool = poolList.find((pool2) => pool2.pool_id === item.pool);
10951
- const coins = pool_coins.get(item.pool) || ["", ""];
10952
10948
  const positionLiquidity = await this.getPositionLiquidity({
10953
10949
  pair: item.pool,
10954
10950
  positionId: item.pos_object_id,
10955
- coinTypeA: coins[0],
10956
- coinTypeB: coins[1]
10951
+ coinTypeA: pool?.coin_a,
10952
+ coinTypeB: pool?.coin_b
10957
10953
  });
10958
10954
  const rewards_token = pool_reward_coins.get(item.pool) || [];
10959
10955
  let positionRewards = { position_id: item.pos_object_id, reward: [], amount: [] };
@@ -10961,16 +10957,16 @@ var DlmmModule = class {
10961
10957
  positionRewards = await this.getEarnedRewards({
10962
10958
  pool_id: item.pool,
10963
10959
  position_id: item.pos_object_id,
10964
- coin_a: coins[0],
10965
- coin_b: coins[1],
10960
+ coin_a: pool?.coin_a,
10961
+ coin_b: pool?.coin_b,
10966
10962
  rewards_token: pool_reward_coins.get(item.pool) || []
10967
10963
  });
10968
10964
  }
10969
10965
  const positionFees = await this.getEarnedFees({
10970
10966
  pool_id: item.pool,
10971
10967
  position_id: item.pos_object_id,
10972
- coin_a: coins[0],
10973
- coin_b: coins[1]
10968
+ coin_a: pool?.coin_a,
10969
+ coin_b: pool?.coin_b
10974
10970
  });
10975
10971
  out.push({
10976
10972
  position: item,