mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
Backend: - Reorg detection in tx tracker (re-verify block hash, detect receipt disappearance) - Post-finalization safety margin (6 extra blocks before stopping tracking) - Server-side HSM co-signing (HSMProvider interface, server calls HSM directly) - Background intent expiry reaper (5-min sweep for stuck intents) - Domain-separated intent hashing (lux-mpc-intent:v1 prefix) - Backup rate limiting (max 3 active per wallet) - Default backup changed to 2-of-3 (iCloud + HSM + offline) for fault tolerance - All status transitions now use RecordTransition with proper actors Frontend: - Intents list page with status filter - Intent detail page with lifecycle progress bar, sign/co-sign actions - Settlements list page with status filter - Settlement detail page with lifecycle, HSM signatures, transfer agency - Enhanced transaction detail with on-chain confirmation, revert reason, status history - Wallet backup UI with Shamir shard visualization - Updated StatusBadge with all new status colors - Nav updated with Intents + Settlements links - Co-sign UI updated for server-side HSM flow (key_id only, no client signature)
46 lines
2.3 KiB
TypeScript
46 lines
2.3 KiB
TypeScript
const statusColors: Record<string, string> = {
|
|
active: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',
|
|
running: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',
|
|
signed: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',
|
|
approved: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',
|
|
enabled: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',
|
|
settled: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',
|
|
verified: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',
|
|
finalized: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',
|
|
co_signed: 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20',
|
|
pending: 'bg-amber-500/10 text-amber-400 border-amber-500/20',
|
|
pending_approval: 'bg-amber-500/10 text-amber-400 border-amber-500/20',
|
|
pending_sign: 'bg-amber-500/10 text-amber-400 border-amber-500/20',
|
|
matched: 'bg-amber-500/10 text-amber-400 border-amber-500/20',
|
|
signing: 'bg-blue-500/10 text-blue-400 border-blue-500/20',
|
|
processing: 'bg-blue-500/10 text-blue-400 border-blue-500/20',
|
|
settling: 'bg-blue-500/10 text-blue-400 border-blue-500/20',
|
|
hsm_signing: 'bg-blue-500/10 text-blue-400 border-blue-500/20',
|
|
confirming: 'bg-blue-500/10 text-blue-400 border-blue-500/20',
|
|
broadcast: 'bg-blue-500/10 text-blue-400 border-blue-500/20',
|
|
recorded: 'bg-blue-500/10 text-blue-400 border-blue-500/20',
|
|
expired: 'bg-zinc-500/10 text-zinc-400 border-zinc-500/20',
|
|
failed: 'bg-red-500/10 text-red-400 border-red-500/20',
|
|
rejected: 'bg-red-500/10 text-red-400 border-red-500/20',
|
|
cancelled: 'bg-red-500/10 text-red-400 border-red-500/20',
|
|
disabled: 'bg-zinc-500/10 text-zinc-400 border-zinc-500/20',
|
|
paused: 'bg-zinc-500/10 text-zinc-400 border-zinc-500/20',
|
|
inactive: 'bg-zinc-500/10 text-zinc-400 border-zinc-500/20',
|
|
}
|
|
|
|
interface StatusBadgeProps {
|
|
status: string
|
|
className?: string
|
|
}
|
|
|
|
export function StatusBadge({ status, className = '' }: StatusBadgeProps) {
|
|
const colorClasses = statusColors[status.toLowerCase()] ?? 'bg-zinc-500/10 text-zinc-400 border-zinc-500/20'
|
|
return (
|
|
<span
|
|
className={`inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium capitalize ${colorClasses} ${className}`}
|
|
>
|
|
{status.replace(/_/g, ' ')}
|
|
</span>
|
|
)
|
|
}
|