From 609c89a9ba677209cc60df7048696b8e77871943 Mon Sep 17 00:00:00 2001 From: mbthiery Date: Thu, 29 Aug 2024 11:58:41 -0400 Subject: [PATCH] Minor refactor --- src/app/stats/utils/fetchGovernanceMetrics.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app/stats/utils/fetchGovernanceMetrics.ts b/src/app/stats/utils/fetchGovernanceMetrics.ts index f47f2ac..b86480a 100644 --- a/src/app/stats/utils/fetchGovernanceMetrics.ts +++ b/src/app/stats/utils/fetchGovernanceMetrics.ts @@ -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"), @@ -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({