From b35cfc0a54c760cfa902f9ae13deedfca5b624f9 Mon Sep 17 00:00:00 2001 From: onmax Date: Mon, 23 Dec 2024 19:39:50 +0700 Subject: [PATCH] fix: distribution endpoint to return only positive balances --- server/api/[version]/distribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/[version]/distribution.ts b/server/api/[version]/distribution.ts index 6e19473..af34dd3 100644 --- a/server/api/[version]/distribution.ts +++ b/server/api/[version]/distribution.ts @@ -15,7 +15,7 @@ export default defineCachedEventHandler(async () => { sql`${tables.activity.epochNumber} = ( SELECT MAX(epoch_number) FROM activity a2 - WHERE a2.validator_id = ${tables.activity.validatorId} + WHERE a2.validator_id = ${tables.activity.validatorId} AND a2.balance != -1 )`, ), )