import { useListEscrows } from "@trustless-work/escrow/hooks/rest";
import { useQuery } from "@tanstack/react-query";
const { listEscrows } = useListEscrows();
const { data, isLoading } = useQuery({
queryKey: ["escrows", "mine", { status: "active" }],
queryFn: () =>
listEscrows({
scope: "mine",
status: "active",
limit: 20,
sort: "createdAt",
order: "desc",
}),
});
// data?.data → EscrowSummary[]
// data?.hasMore / data?.nextCursor → load more