@merkl/api 0.20.31 → 0.20.32

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.
@@ -54,7 +54,6 @@ async function computeUniV4PoolTVLFromMostRecentStateSave(chainId, poolID, price
54
54
  catch {
55
55
  log.warn(`merklDynamic data - failed to decode state of pool ${poolID} on ${NETWORK_LABELS[chainId]}`);
56
56
  }
57
- console.log("debug tvl", chainId, poolID, amount0, amount1, tvl);
58
57
  return { tvl, amount0, amount1, blockNumber: blockNumber };
59
58
  }
60
59
  export class UniswapV4DynamicData {
@@ -243,7 +242,8 @@ export class UniswapV4DynamicData {
243
242
  sqrtPrice,
244
243
  tick: tick,
245
244
  priceRewardToken: priceRewardToken,
246
- tvl: poolBalanceToken0 * priceToken0 + poolBalanceToken1 * priceToken1,
245
+ tvl: (!!priceToken0 ? poolBalanceToken0 * priceToken0 : 0) +
246
+ (!!priceToken1 ? poolBalanceToken1 * priceToken1 : 0),
247
247
  });
248
248
  }
249
249
  }