flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[Audit] Token-symbol resolution duplicated across three files with no single source of truth

Open K1NGD4VID opened this issue 3 months ago • 7 comments

Filed from the second-wave repository audit (issue 62/100). See the audit summary for full category context.

  • Location: frontend/src/lib/dashboard.ts:71-77, frontend/src/lib/api/streams.ts:36-42, frontend/src/app/streams/[id]/stream-details-content.tsx:50-54
  • Problem: Three independent resolveTokenLabel/TOKEN_SYMBOLS implementations exist; a new token added to TOKEN_ADDRESSES in lib/soroban.ts must be manually kept in sync with the third file's hardcoded map, or that page silently mis-renders the symbol.
  • Evidence: Three separate implementations of the same address→symbol mapping.
  • Suggested implementation: Extract one shared resolveTokenLabel util (deriving from TOKEN_ADDRESSES) and import it in all three locations.
  • Acceptance criteria: Adding a new token to TOKEN_ADDRESSES correctly resolves its symbol on all three surfaces with a single code change.
  • Difficulty: S
  • Expected impact: Removes a silent-drift bug source that only surfaces when a new token is added.

K1NGD4VID avatar Aug 29 '26 18:08 K1NGD4VID

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

please assign

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

enny791 avatar Aug 29 '26 19:08 enny791

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

Hi maintainer, Kindly assign. I can fix this issue

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

ayomustap avatar Aug 29 '26 19:08 ayomustap

Congratulations, @enny791! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.

🧑‍💻 @enny791: 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 Aug 29 '26 19:08 drips-wave[bot]

This issue has been removed from the Stellar Wave Program by the repository maintainers.

@enny791, you have been unassigned from this issue. If you have any questions, please reach out to the repo maintainers.

drips-wave[bot] avatar Nov 19 '26 12:11 drips-wave[bot]

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

i would love to work on this issue

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

pheelztech avatar Nov 20 '26 12:11 pheelztech

Congratulations, @pheelztech! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

🧑‍💻 @pheelztech: 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 Nov 20 '26 12:11 drips-wave[bot]

This issue has been completed by @pheelztech as part of the Stellar Wave Program's 11th Wave 🥳

😎 @pheelztech: 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 Nov 20 '26 16:11 drips-wave[bot]