Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/api/metadata/gitcoin/[address]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
return NextResponse.json(createResponse(0, []));
}

const stamps = await fetchStamps(address);
// Normalize address to lower-case with 0x prefix
const safeAddress = "0x" + address.replace(/^0x/i, "").toLowerCase();

const stamps = await fetchStamps(safeAddress);
if (!stamps.length) return NextResponse.json(createResponse(0, []));

const detailsArr = stamps.map(gitcoinPassportMapping).filter(Boolean);
Expand Down