Skip to content

[Backend] claimable.service.ts cache key does not include token address, so streams with the same id across tokens could collide #1021

Description

@grantfox-oss

Join our community: https://t.me/+DOylgFv1jyJlNzM0

Why this matters

claimable.service.ts derives its cache key primarily from streamId; if two streams ever share the same numeric id across different token deployments the cache could serve a stale claimable amount for the wrong token, silently corrupting displayed balances.

Acceptance criteria

  • Audit the cache key construction in claimable.service.ts
  • Include tokenAddress in the cache key if it is not already uniquely scoped
  • Add a unit test with two same-id streams on different tokens asserting independent cache entries

Files to touch

  • backend/src/services/claimable.service.ts

Out of scope

Does not change the underlying claimable calculation formula.

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions