fix: populate config endpoints with chain and token data #33

Merged
shoko merged 2 commits from fix/issue-27 into main 2026-04-09 08:23:44 +02:00
Owner

Summary

  • Fix `/api/config/chains` to return `{"chains": ["bsc"]}` as only BNB chain is supported for Phase 1
  • Fix `/api/config/tokens` to query AVE Cloud API to get available tokens

Changes

  • `src/backend/app/api/config.py`:
    • `get_chains()`: returns `{"chains": ["bsc"]}`
    • `get_tokens()`: now async, queries AVE Cloud API for tokens on BSC chain

Closes #27

## Summary - Fix \`/api/config/chains\` to return \`{"chains": ["bsc"]}\` as only BNB chain is supported for Phase 1 - Fix \`/api/config/tokens\` to query AVE Cloud API to get available tokens ## Changes - \`src/backend/app/api/config.py\`: - \`get_chains()\`: returns \`{"chains": ["bsc"]}\` - \`get_tokens()\`: now async, queries AVE Cloud API for tokens on BSC chain Closes #27
shoko added 1 commit 2026-04-09 08:04:07 +02:00
han reviewed 2026-04-09 08:16:02 +02:00
@@ -14,0 +15,4 @@
async def get_tokens():
settings = get_settings()
client = AveCloudClient(api_key=settings.AVE_API_KEY, plan=settings.AVE_API_PLAN)
tokens = await client.get_tokens(chain="bsc", limit=100)
First-time contributor

actually I'd like to limit the tokens to 20 for now. its okay to hardcode for now, we will adjust later if needed

actually I'd like to limit the tokens to 20 for now. its okay to hardcode for now, we will adjust later if needed
han requested changes 2026-04-09 08:16:14 +02:00
Dismissed
han left a comment
First-time contributor

change the tokens limit from 100 to 20

change the tokens limit from 100 to 20
shoko added 1 commit 2026-04-09 08:18:34 +02:00
han approved these changes 2026-04-09 08:23:09 +02:00
han left a comment
First-time contributor

lgtm

lgtm
shoko merged commit feb65131fa into main 2026-04-09 08:23:44 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/randebu#33