Skip to content

🔄 [MEDIUM] v1 API Lottery Route Points to v2 Implementation #1000

Description

@ayomideadeniran

Description

In backend/src/routes/api.js, the v1 lottery router is mapped to the v2 lottery implementation.

Location

backend/src/routes/api.js line 49:

v1Router.use(/lottery, v2Lottery);

Impact

  • API versioning is misleading: consumers calling /api/v1/lottery/ get v2 behavior
  • If v1 and v2 diverge in the future, this will cause unexpected behavior changes
  • Clients relying on v1 stability may break when v2 changes

Required Fix

Either:

  1. Create a separate v1 lottery implementation and use it here
  2. Or, if the lottery implementation is identical for v1/v2, document this decision clearly
  3. Add a deprecation notice for the v1 endpoint if it should be migrated to v2

Reference

Identified during full codebase audit of soroban-playground.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend related issuesbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions