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() {

Revenue Split Dashboard

-

+

Contract-backed allocations, live balances, and indexed distributions

@@ -268,13 +268,13 @@ export default function RevenueSplitDashboard() {

Current Allocation Splits

- + On-chain
{chartData.length === 0 ? ( -

No allocation data loaded.

+

No allocation data loaded.

) : (
@@ -379,7 +379,7 @@ export default function RevenueSplitDashboard() {
-
+

Total allocation must be exactly 100%.

Submission uses a signed contract call only after simulation passes.

@@ -403,7 +403,7 @@ export default function RevenueSplitDashboard() {

Live Recipient Balances

{recipientBalances.length === 0 ? ( -

No recipient distributions available yet.

+

No recipient distributions available yet.

) : (
{recipientBalances.map((row) => ( @@ -431,17 +431,17 @@ export default function RevenueSplitDashboard() {

Historical Distribution Events

{orgPublicKey ? ( - + Org: {orgPublicKey.slice(0, 6)}...{orgPublicKey.slice(-4)} ) : null}
{events.length === 0 ? ( -

No backend indexed distribution events found.

+

No backend indexed distribution events found.

) : (
- + @@ -472,7 +472,7 @@ export default function RevenueSplitDashboard() { {event.txHash.slice(0, 10)}... ) : ( - N/A + N/A )} diff --git a/frontend/src/pages/TransactionHistory.tsx b/frontend/src/pages/TransactionHistory.tsx index 43a2c75..04658cd 100644 --- a/frontend/src/pages/TransactionHistory.tsx +++ b/frontend/src/pages/TransactionHistory.tsx @@ -274,11 +274,13 @@ export default function TransactionHistory() {
-

No transactions found

+

+ {activeFilterCount > 0 ? 'No transactions found' : 'No transactions yet'} +

{activeFilterCount > 0 ? 'Try adjusting your filters.' - : 'No transaction history available yet.'} + : 'Your payroll history will appear here once payments are sent.'}

) : null}
Date Recipient