Skip to content

Commit

Permalink
fix: build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminshafii committed Jan 16, 2025
1 parent 4fc3d73 commit f788fd9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/request-invoice-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"dev": "PORT=3050 next dev --turbopack",
"build": "pnpm db:generate && pnpm db:migrate && next build",
"build:local": "pnpm run db:migrate:local && next build",
"start": "next start",
"lint": "next lint",
"db:generate": "drizzle-kit generate",
Expand Down
3 changes: 3 additions & 0 deletions packages/request-invoice-web/scripts/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { sql } from '@vercel/postgres';
async function main() {
console.log('0xHypr', 'Running migrations...');

// Log only specific env vars we care about for debugging
console.log('0xHypr', 'POSTGRES_URL:', process.env.POSTGRES_URL);

const db = drizzle(sql);

try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@

import React from 'react';
import { notFound } from 'next/navigation';
import { InvoiceDetails } from '@hypr/shared/src/components/invoice-details';
import { ephemeralKeyService } from '@/lib/ephemeral-key-service';
interface PageProps {
params: {

type PageProps = {
params: Promise<{
requestId: string;
};
searchParams: { [key: string]: string | string[] | undefined };
}>;
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}
const URL = process.env.NODE_ENV === 'production' ? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}` : 'http://localhost:3050';

export default async function InvoicePage({ params, searchParams }: PageProps) {
const { requestId } = await params;
Expand All @@ -19,10 +18,10 @@ export default async function InvoicePage({ params, searchParams }: PageProps) {
return notFound();
}

console.log('0xHypr', 'token', token)
console.log('0xHypr', 'token', token);
// Get the decryption key using the token
const decryptionKey = await ephemeralKeyService.getPrivateKey(token as string);
console.log('0xHypr', 'decryptionKey', decryptionKey)
console.log('0xHypr', 'decryptionKey', decryptionKey);
if (!decryptionKey) {
return notFound();
}
Expand Down

0 comments on commit f788fd9

Please sign in to comment.