flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[fix] Calculate GraphQL balances from unique accrued streams

Open K1NGD4VID opened this issue 1 month ago • 4 comments

Labels: bug, backend, high-priority, points: 150 File/location: backend/src/graphql/resolvers/stream.resolver.ts:110

Description: accountOverview labels deposited-withdrawn across both sent and received streams as totalClaimable. This includes unvested deposits and outgoing funds that the wallet cannot withdraw. Self-directed streams also appear in both queries and are counted twice.

Acceptance Criteria:

  • [ ] Compute totalClaimable from the wallet's incoming accrued funds, honoring inactive and paused state rather than counting all unwithdrawn deposits.
  • [ ] Deduplicate streams that have the same sender and recipient before aggregating deposited/withdrawn amounts and active counts.
  • [ ] Cover an outgoing-only wallet, an unvested incoming stream, and a self-directed stream with concrete expected totals.

Notes: Executed the resolver: an outgoing-only 1000-unit deposit returned totalClaimable=1000; a single self-directed stream returned activeStreams=2.

Audited commit: 649b6976a100fd964ce191428eef1faeb50aaa39. Closest prior issues reviewed: #1467. This report concerns the specific failure or uncovered test paths described above, rather than repeating the original feature request.

K1NGD4VID avatar Oct 21 '26 17:10 K1NGD4VID

@xtep103 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hi there, I’ve carefully reviewed the issue details and I’m confident I can provide a clean, efficient, and maintainable solution.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @xtep103 to this issue.

xtep103 avatar Oct 21 '26 21:10 xtep103

@0takuc0mrade has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hi maintainer, I can work on this

ℹ️ Repo Maintainers: To accept this application, review their application or assign @0takuc0mrade to this issue.

0takuc0mrade avatar Oct 21 '26 21:10 0takuc0mrade

Congratulations, @0takuc0mrade! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

🧑‍💻 @0takuc0mrade: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Oct 21 '26 21:10 drips-wave[bot]

This issue has been completed by @0takuc0mrade as part of the Stellar Wave Program's 10th Wave 🥳

😎 @0takuc0mrade: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Oct 21 '26 21:10 drips-wave[bot]