Skip to content

Commit

Permalink
Merge pull request #136 from helium/mbthiery/updated-api
Browse files Browse the repository at this point in the history
Minor refactor
  • Loading branch information
mbthiery authored Aug 29, 2024
2 parents b2a677a + 609c89a commit 1bfaaf2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/app/stats/utils/fetchGovernanceMetrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ const DEV_STATS: PositionMetricsByGroup = {
},
}
const getHntGovernanceMetrics = async () => {
if (process.env.NODE_ENV === "development") {
return DEV_STATS
}
if (process.env.NODE_ENV === "development") return DEV_STATS

const [positions, delegatedPositions] = await Promise.all([
fetchPositions("hnt"),
Expand All @@ -93,9 +91,7 @@ const getHntGovernanceMetrics = async () => {
export const fetchHntGovernanceStats = cache(getHntGovernanceMetrics)

const getSubDaoGovernanceMetrics = async (subDao: SubDao) => {
if (process.env.NODE_ENV === "development") {
return DEV_STATS[subDao]
}
if (process.env.NODE_ENV === "development") return DEV_STATS[subDao]

const positions = await fetchPositions(subDao)
const positionsWithMeta = await addPositionsMeta({
Expand Down

0 comments on commit 1bfaaf2

Please sign in to comment.