Description:
The Swap UI currently relies on static or manual data fetches. We need to integrate our Next.js frontend with the Aether-Swap-Backend API to fetch real-time liquidity pool reserves, ensuring users get accurate swap quotes.
Acceptance Criteria:
- Implement a data-fetching library like
SWR or @tanstack/react-query to poll the backend /api/reserves endpoint every 10-15 seconds.
- Update the token output estimation in the Swap UI dynamically as new reserve data comes in.
- Add a subtle loading spinner or skeleton state inside the input field while the latest quote is being fetched to prevent stale swaps.
Description:
The Swap UI currently relies on static or manual data fetches. We need to integrate our Next.js frontend with the
Aether-Swap-BackendAPI to fetch real-time liquidity pool reserves, ensuring users get accurate swap quotes.Acceptance Criteria:
SWRor@tanstack/react-queryto poll the backend/api/reservesendpoint every 10-15 seconds.