UNPKG

@reservoir0x/relay-kit-ui

Version:

Relay is the Fastest and Cheapest Way to Bridge and Transact Across Chains.

19 lines 698 B
import { useQuery } from '@tanstack/react-query'; export default () => { const queryKey = ['useCexAddresses']; const response = useQuery({ queryKey: queryKey, queryFn: () => { const url = new URL(`https://raw.githubusercontent.com/reservoirprotocol/relay-kit/refs/heads/main/assets/cexAddresses.json`); return fetch(url.href) .then((response) => response.json()) .then((response) => { return response; }); }, staleTime: 1000 * 60 * 60 * 24, //24 hours gcTime: 1000 * 60 * 60 * 24 //24 hours }); return response; }; //# sourceMappingURL=useCexAddresses.js.map