import React, { useState, useEffect } from 'react'; import { Building2, RefreshCw, Activity, Search, History, ExternalLink, MoreHorizontal, ArrowUpRight, ArrowDownRight, X, Loader2, Fingerprint, User, ShieldCheck, Mail, Phone, MapPin, Globe, Terminal, CreditCard } from 'lucide-react'; import { apiClient } from '../services/api.ts'; import { InternalAccount, CustomerProfileResponse } from '../types/index.ts'; import { TableRowSkeleton, Skeleton } from '../components/Skeleton.tsx'; const InternalAccounts: React.FC = () => { const [loading, setLoading] = useState(false); const [accounts, setAccounts] = useState([]); const [isModalOpen, setIsModalOpen] = useState(false); const [connecting, setConnecting] = useState(false); const [newBank, setNewBank] = useState('Wells Fargo'); const [isProfileOpen, setIsProfileOpen] = useState(false); const [fetchingProfile, setFetchingProfile] = useState(false); const [activeProfile, setActiveProfile] = useState(null); const fetchAccounts = async () => { setLoading(true); try { const mappedAccounts = await apiClient.getRegistryNodes(); setAccounts(mappedAccounts); } catch (e) { console.error(e); } finally { setLoading(false); } }; const handleViewProfile = async (accountId: string) => { setIsProfileOpen(true); setFetchingProfile(true); setActiveProfile(null); try { const data = await apiClient.getCustomerProfile(accountId); // Brief aesthetic pause for "neural verification" await new Promise(r => setTimeout(r, 800)); setActiveProfile(data); } catch (err) { console.error(err); } finally { setFetchingProfile(false); } }; useEffect(() => { fetchAccounts(); }, []); return (

Internal Registry

Managed Corporate Nodes & Citi-Sync v2.0.0

Real-time Node Status

{loading ? ( <> ) : accounts.map(node => ( ))}
Node Identity Host Institution Sync Status Balance (USD) Action
{node.productName.toLowerCase().includes('card') ? : }

{node.productName}

{node.displayAccountNumber}

{node.institutionName}

Ref: {node.connectionId}

{node.status}

${node.currentBalance.toLocaleString()}

Available: ${node.availableBalance.toLocaleString()}

{/* Account Profile Modal */} {isProfileOpen && (

Identity Vault

Compliance Level: FDX v6.0

{fetchingProfile ? (

Requesting Profile Node...

) : activeProfile ? (

Legal Name Registry

{activeProfile.customer.title} {activeProfile.customer.firstName} {activeProfile.customer.lastName}

{activeProfile.customer.companyName}

Verified Signals

{activeProfile.contacts.emails.map((email, i) => (

{email}

))}

Geospatial Registry

{activeProfile.contacts.addresses.map((addr, i) => (

{addr.addressLine1}

{addr.city}, {addr.region} {addr.postalCode}

))}

Node Metadata

PROTOCOL: FDX_V6_NATIVE
ACTOR: PARTNER_USER
TRUST_SCORE: 100/100

) : null}
)}
); }; export default InternalAccounts;