@merkl/api 0.21.42 → 0.21.44

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.
@@ -85,6 +85,19 @@ export const main = async () => {
85
85
  }
86
86
  });
87
87
  }
88
+ else {
89
+ for (const d of campaigns) {
90
+ if (!!d) {
91
+ // Main Parameter OVERRIDING
92
+ if (d.campaignType === Campaign.SILO && d.campaignParameters.whitelist?.length === 1) {
93
+ d.mainParameter = `${d.mainParameter}-${d.campaignParameters.whitelist[0]}`;
94
+ }
95
+ if (!dynamicData[`${d.campaignType}_${d.mainParameter}`])
96
+ dynamicData[`${d.campaignType}_${d.mainParameter}`] = {};
97
+ dynamicData[`${d.campaignType}_${d.mainParameter}`][d.campaignId] = d;
98
+ }
99
+ }
100
+ }
88
101
  });
89
102
  await Promise.all(promisesPerType);
90
103
  }
@@ -22,6 +22,9 @@ chainId, user) {
22
22
  promises.push(withTimeout(getClammUserPositions(user, chainId, positionsToCheck[numkey]), MERKL_USER_POSITION_FETCHING_GLOBAL_TIMEOUT));
23
23
  break;
24
24
  case Campaign.ERC20:
25
+ case Campaign.ERC20LOGPROCESSOR:
26
+ case Campaign.ERC20REBASELOGPROCESSOR:
27
+ case Campaign.ERC20_FIX_APR:
25
28
  promises.push(withTimeout(executeSimple(chainId, getERC20UserPositions(user, chainId, positionsToCheck[numkey])), MERKL_USER_POSITION_FETCHING_GLOBAL_TIMEOUT));
26
29
  break;
27
30
  case Campaign.SILO:
@@ -71,7 +71,7 @@ export async function getMorphoUserPositions(user, _chainId, campaigns) {
71
71
  userPositions: [],
72
72
  decimals: campaigns[campaign].decimals,
73
73
  // FIXME only have the borrowed/supplied part
74
- totalSupply: BN2Number(campaigns[campaign].totalSupplyTargetToken, campaigns[campaign].decimals),
74
+ totalSupply: campaigns[campaign].totalSupplyTargetToken,
75
75
  userTVL: 0,
76
76
  };
77
77
  let balance = 0;