'use client' import React from 'react' import { YStack, XStack, Text } from 'tamagui' import { StatusBadge } from './StatusBadge' import type { EscrowAccountWithPda } from '@descro/sdk' import { lamportsToSolString } from '@/util/lamports' function truncAddr(addr: string): string { return `${addr.slice(0, 4)}…${addr.slice(-4)}` } interface EscrowCardProps { item: EscrowAccountWithPda selected: boolean onSelect: () => void } export function EscrowCard({ item, selected, onSelect }: EscrowCardProps) { const { pda, account } = item const solAmount = lamportsToSolString(account.amount, 4) return ( #{account.escrowId.toString()} {solAmount} SOL Seller {truncAddr(account.seller)} Buyer {truncAddr(account.buyer)} PDA: {truncAddr(pda)} ) }