From 36ae1a0ef228ebbbc397b38c677f743e1ecd63ce Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Fri, 31 May 2024 11:58:47 -0400 Subject: [PATCH] count legacy DAOs in stats --- src/data/formulas/generic/stats.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/formulas/generic/stats.ts b/src/data/formulas/generic/stats.ts index e829f34a..c0d1dd70 100644 --- a/src/data/formulas/generic/stats.ts +++ b/src/data/formulas/generic/stats.ts @@ -3,10 +3,11 @@ import { GenericFormula, dbKeyForKeys } from '@/core' export const daos: GenericFormula = { dynamic: true, compute: async ({ query }) => { + // sg_dao and cw3_dao are beta/legacy DAO DAO (v0.2.5 and v0.3.0) const [{ count }] = await query( `SELECT COUNT(*) as "count" FROM (SELECT DISTINCT ON ("contractAddress") "contractAddress" FROM "WasmStateEvents" WHERE "key" = '${dbKeyForKeys( 'contract_info' - )}' AND ("value" LIKE '%cw-core%' OR "value" LIKE '%cwd-core%' OR "value" LIKE '%dao-core%') ORDER BY "contractAddress") tmp` + )}' AND ("value" LIKE '%cw-core%' OR "value" LIKE '%cwd-core%' OR "value" LIKE '%dao-core%' OR "value" LIKE '%sg_dao%' OR "value" LIKE '%cw3_dao%') ORDER BY "contractAddress") tmp` ) return Number(count)