// RequestsList — pending contact requests inbox. // // Each row shows the requester (identity if known + DC address + fee paid) // and their intro message. Accept publishes ACCEPT_CONTACT on-chain, // adds the peer to the local contacts store, and optimistically drops // the row. Reject (Block) publishes BLOCK_CONTACT; subsequent requests // from the same sender are refused by the node. import React, { useState } from 'react'; import { useStore } from '@/lib/store'; import { buildAcceptContactTx, buildBlockContactTx, buildLinkDeviceTx, submitTx, humanizeTxError, } from '@/lib/tx'; import { upsertContact as persistContact, markDeviceRegistered, isDeviceRegistered } from '@/lib/storage'; import { getIdentity, fetchDevices, type ContactRequestRaw } from '@/lib/api'; import { shortAddr } from '@/lib/crypto'; export function RequestsList({ requests, onChanged, }: { requests: ContactRequestRaw[]; onChanged: () => void; }): React.ReactElement { if (requests.length === 0) { return (