import { Routes, Route, Navigate } from 'react-router-dom'; import { useAuth } from './contexts/AuthContext'; import LoginPage from './pages/LoginPage'; import DashboardPage from './pages/DashboardPage'; import AccountsPage from './pages/AccountsPage'; import TreasuryPage from './pages/TreasuryPage'; import ReportingPage from './pages/ReportingPage'; import CompliancePage from './pages/CompliancePage'; import SettlementsPage from './pages/SettlementsPage'; import TransactionsPage from './pages/TransactionsPage'; import PortalLayout from './components/portal/PortalLayout'; import LiveChainBanner from './components/portal/LiveChainBanner'; import App from './App'; function ProtectedRoute({ children }: { children: React.ReactNode }) { const { isAuthenticated, loading } = useAuth(); if (loading) { return (
Initializing secure session...
); } if (!isAuthenticated) { return ; } return <>{children}; } export default function Portal() { const { isAuthenticated, loading } = useAuth(); if (loading) { return (
Initializing secure session...
); } return ( : } /> } />
} /> } /> } /> } /> } /> } /> } /> } /> } /> } />
); } function SettingsPage() { const { user, wallet } = useAuth(); return (

Settings

Portal configuration and user preferences

Profile

Display Name {user?.displayName || '—'}
Role {user?.role?.replace('_', ' ') || '—'}
Institution {user?.institution || '—'}
Department {user?.department || '—'}
Wallet Address {wallet?.address || '—'}
Chain ID {wallet?.chainId || '—'}

Permissions

{user?.permissions?.map(p => ( {p} )) || No permissions}

Reporting Preferences

Default Standard IFRS
Base Currency USD
Fiscal Year End December 31
Auto-generate Reports Monthly

Enterprise Controls

Multi-signature Required Yes (2-of-3)
Transaction Limit $10,000,000
Approval Workflow Dual Authorization
Session Timeout 30 minutes
Audit Logging Enabled (Full)
); }