File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
apps/nextjs/app/api/ubi-report Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,14 @@ import { NextResponse } from 'next/server'
33import { newKyselyPostgresql } from '@/.config/kysely.config'
44import { sql } from 'kysely'
55
6+ const EXCLUDED_WALLETS = [
7+ '0x204d050d301716d45eaa6807855cbf679c4f1dcf' ,
8+ '0x2cdc442Ec321ad8e5c136a461ad0c81b3e4f57f4' ,
9+ '0x2e2c4ac19c93d0984840cdd8e7f77500e2ef978e' ,
10+ '0x66ff77975e413c7ed2e1396657688fa64992f9f1' ,
11+ '0x939aa9effad34e11bb8fa3025f1b500e87970cae' ,
12+ ] . map ( ( w ) => w . toLowerCase ( ) )
13+
614export 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 ( )
You can’t perform that action at this time.
0 commit comments