diff --git a/backend/.env.example b/backend/.env.example index 0695033..1e7a42a 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -21,6 +21,9 @@ NODE_ENV=development # CORS origin allowed by backend APIs. CORS_ORIGIN=http://localhost:5173 +# Optional additional CORS origins (comma-separated), e.g. staging + production apps. +# CORS_ALLOWED_ORIGINS=https://staging.payd.io,https://app.payd.io + # Frontend base URL used for auth redirects. FRONTEND_URL=http://localhost:5173 diff --git a/backend/src/config/env.ts b/backend/src/config/env.ts index 395f974..62cd2d3 100644 --- a/backend/src/config/env.ts +++ b/backend/src/config/env.ts @@ -8,7 +8,7 @@ const envSchema = z.object({ DATABASE_URL: z.string().default('postgres://localhost:5432/payd_test'), REDIS_URL: z.string().optional(), NODE_ENV: z.enum(['development', 'production', 'test']).default('development'), - CORS_ORIGIN: z.string().default('http://localhost:5173'), + CORS_ORIGIN: z.string().optional(), CORS_ALLOWED_ORIGINS: z.string().optional(), THROTTLING_TPM: z.string().default('100'), THROTTLING_MAX_QUEUE_SIZE: z.string().default('1000'), diff --git a/frontend/src/__tests__/TransactionHistory.integration.test.tsx b/frontend/src/__tests__/TransactionHistory.integration.test.tsx index 0e217ba..08927f4 100644 --- a/frontend/src/__tests__/TransactionHistory.integration.test.tsx +++ b/frontend/src/__tests__/TransactionHistory.integration.test.tsx @@ -163,11 +163,13 @@ describe('TransactionHistory Integration', () => { // Wait for empty state to appear await waitFor(() => { - expect(getByText('No transactions found')).toBeInTheDocument(); + expect(getByText('No transactions yet')).toBeInTheDocument(); }); // When no filters are active, should show default message - expect(getByText(/No transaction history available yet/)).toBeInTheDocument(); + expect( + getByText(/Your payroll history will appear here once payments are sent/) + ).toBeInTheDocument(); }); test('displays error state and retry button on API failure', async () => { diff --git a/frontend/src/pages/RevenueSplitDashboard.tsx b/frontend/src/pages/RevenueSplitDashboard.tsx index 4a81ac5..8ac321f 100644 --- a/frontend/src/pages/RevenueSplitDashboard.tsx +++ b/frontend/src/pages/RevenueSplitDashboard.tsx @@ -238,7 +238,7 @@ export default function RevenueSplitDashboard() {
+
Contract-backed allocations, live balances, and indexed distributions
@@ -268,13 +268,13 @@ export default function RevenueSplitDashboard() {No allocation data loaded.
+No allocation data loaded.
) : (Total allocation must be exactly 100%.
Submission uses a signed contract call only after simulation passes.
No recipient distributions available yet.
+No recipient distributions available yet.
) : (No backend indexed distribution events found.
+No backend indexed distribution events found.
) : (| Date | Recipient | @@ -472,7 +472,7 @@ export default function RevenueSplitDashboard() { {event.txHash.slice(0, 10)}... ) : ( - N/A + N/A )}
|---|