Skip to content

Integrate Real-Time Pool Reserve Polling from Backend API #3

Description

@Alhaji-naira

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions