import { AlertTriangle, CheckCircle2, ExternalLink, Loader2, } from 'lucide-react' import type { SweepResult } from '../lib/sweeper' const EXPLORER_BASE = 'https://bananablocks.com/tx/' function TxLink({ label, txid }: { label: string; txid: string }) { return (
{label} View
{txid}
) } interface Props { sweeping: boolean progress: string result: SweepResult | null } export function SweepProgress({ sweeping, progress, result }: Props) { if (sweeping) { return (

{progress}

Do not close this page.

) } if (!result) return null const hasErrors = result.errors.length > 0 const hasTxids = result.bsvTxid || result.ordinalTxids.length > 0 || result.bsv21Txids.length > 0 return (
{hasErrors ? ( ) : ( )} {hasErrors && !hasTxids ? 'Failed' : hasErrors ? 'Completed with Errors' : 'Complete'}
{result.bsvTxid && } {result.ordinalTxids.map((txid) => ( ))} {result.bsv21Txids.map((txid) => ( ))} {result.errors.map((err) => (

{err}

))}
) }