Skip to content

Commit 3b538a7

Browse files
committed
Exclude test wallets from report UBI
1 parent cbbbc97 commit 3b538a7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/nextjs/app/api/ubi-report/route.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ import { NextResponse } from 'next/server'
33
import { newKyselyPostgresql } from '@/.config/kysely.config'
44
import { sql } from 'kysely'
55

6+
const EXCLUDED_WALLETS = [
7+
'0x204d050d301716d45eaa6807855cbf679c4f1dcf',
8+
'0x2cdc442Ec321ad8e5c136a461ad0c81b3e4f57f4',
9+
'0x2e2c4ac19c93d0984840cdd8e7f77500e2ef978e',
10+
'0x66ff77975e413c7ed2e1396657688fa64992f9f1',
11+
'0x939aa9effad34e11bb8fa3025f1b500e87970cae',
12+
].map((w) => w.toLowerCase())
13+
614
export async function GET() {
715
const db = newKyselyPostgresql()
816
try {
@@ -12,6 +20,7 @@ export async function GET() {
1220
'wallet as wallet_address',
1321
sql<string>`sum(amount)`.as('total_ubi_given'),
1422
])
23+
.where(sql`lower(wallet)`, 'not in', EXCLUDED_WALLETS)
1524
.groupBy('wallet')
1625
.having(sql`sum(amount)`, '>', 0)
1726
.execute()

0 commit comments

Comments
 (0)