Skip to content

Commit

Permalink
Do not use forTotal for latest tvl usd calculation (l2beat#6245)
Browse files Browse the repository at this point in the history
  • Loading branch information
torztomasz authored Dec 30, 2024
1 parent 6276739 commit dd1ecae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ const getCachedProjectsLatestTvlUsd = cache(
return Object.fromEntries(
Object.entries(groupedByProject).map(([projectId, records]) => {
const summedPerSource = sumValuesPerSource(records, {
forTotal: true,
forTotal: false,
excludeAssociatedTokens: false,
})
const summed = sum(Object.values(summedPerSource))
return [projectId, Number(summed) / 100]
}),
)
},
['latestTvlUsd'],
['latestTvlUsd-v2'],
{
tags: ['tvl'],
revalidate: UnixTime.HOUR,
Expand Down

0 comments on commit dd1ecae

Please sign in to comment.