Skip to content

Nothing reconciles WalletContext's connected address against AuthUser.stellarAddress, so the UI can show a wallet as "connected" that differs from the actual payout address on file #283

Closed

Description

@chonilius

There are two independent sources of truth for "which Stellar wallet is this user's":

  • AuthUser.stellarAddress (src/types/index.ts) — the address persisted on the
    backend, presumably what mergefi-backend actually pays a contributor out to.
  • WalletContext.address (src/context/WalletContext.tsx) — whichever address is
    currently connected in the browser via Freighter, cached in localStorage.

Nothing in the app ever compares these two. ConnectPanel.tsx renders
Connected: {address.slice(0, 4)}...{address.slice(-4)} purely from WalletContext,
with no reference to user.stellarAddress at all. A contributor who connects a
different Freighter account than the one on file — e.g. they have two accounts in the
extension and picked the wrong one this session, or (per the related "silent link
failure" bug) a previous connection's backend PATCH failed to persist — sees a
confident-looking "Connected: GXXX...XXXX" with no indication that this address and their
actual on-file payout address (AuthUser.stellarAddress) are different values entirely.

Since payouts are driven by whatever the backend has on file, not by whatever
WalletContext currently shows, this mismatch is exactly the kind of silent
discrepancy that could lead a contributor to believe they're set up to receive a payout
at an address that isn't actually the one registered for their account.

Suggested fix: after connecting (and periodically, e.g. on ConnectPanel mount), compare
address to user?.stellarAddress and surface a clear warning when they differ, rather
than only ever showing whichever one WalletContext happens to hold locally.

Activity

  1. added
    bug
    security
    architecture
    very hard
    on Aug 21, 2026
  2. added
    Stellar Wave
    on Aug 25, 2026
  3. khanavi272-spec commented on Aug 25, 2026

    @khanavi272-spec

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

    I would like to work on this issue

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

  4. MarcusDavidG commented on Aug 25, 2026

    @MarcusDavidG

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

    I can handle this issue and will like to work on it, Please assign thank you.

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

  5. SeveentWonder commented on Aug 25, 2026

    @SeveentWonder

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

    Gm Maintainer i will really like to fix this issue

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

  6. ghg001 commented on Aug 25, 2026

    @ghg001

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

    I’ve thoroughly reviewed the requirements and can work on fixing the issue while ensuring the implementation meets the acceptance criteria.

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

  7. ritaifeoluwa commented on Aug 25, 2026

    @ritaifeoluwa

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

    I would like to work on this issue

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

  8. mubking commented on Aug 25, 2026

    @mubking

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

    please i would like to work on this issue

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

  9. Martinsbab commented on Aug 25, 2026

    @Martinsbab

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

    Hi maintainer, I'll like to work on this issues

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

  10. Fang0067 commented on Aug 25, 2026

    @Fang0067

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

    I'm interested in taking this issue. I've gone through the requirements and have a clear understanding of the expected outcome. Comparing WalletContext.address against user?.stellarAddress after connecting (and periodically, e.g. on ConnectPanel mount), then surfacing a clear warning when they differ, instead of ConnectPanel silently trusting whichever address WalletContext happens to hold locally. I can handle the implementation, testing, and any necessary documentation, then submit a focused PR for review. I'm available to start right away.

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

  11. drips-wave commented on Aug 25, 2026

    @drips-wave

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

    🧑‍💻 @ritaifeoluwa: 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 🌊

  12. drips-wave commented on Aug 25, 2026

    @drips-wave

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

    😎 @ritaifeoluwa: You earned 200 Points for completing this issue! After the current Wave ends, 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.

  13. removed
    Stellar Wave
    on Oct 15, 2026
  14. added
    Stellar Wave
    on Oct 15, 2026
  15. removed
    Stellar Wave
    on Oct 15, 2026
  16. added
    Stellar Wave
    on Oct 15, 2026
  17. removed
    Stellar Wave
    on Oct 15, 2026
  18. added
    Stellar Wave
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar Wavearchitecturebugsecurityvery hard

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions