Skip to content

feat: Create an endpoint to fetch dynamic system configuration variables #65

@AlAfiz

Description

@AlAfiz

Description

The frontend needs to know certain global variables (like the current default slippage, supported networks, or maintenance mode status) immediately upon loading.
Hardcoding these in the frontend means we have to deploy a new React build every time a parameter changes.
We need a /api/v1/config endpoint that returns a JSON object containing these global system settings.
This allows us to control the frontend behavior entirely from the backend environment variables.

Requirements

  • Create a GET route at /api/v1/config.
  • Construct a JSON payload containing: defaultSlippage, maxTradeSize, maintenanceMode, and supportedNetworks.
  • Populate these values using either .env variables or static defaults.
  • Ensure the route returns a fast 200 OK response with caching enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions