Skip to content

ConnectPanel.test.tsx never exercises the #283 wallet-address-mismatch warning banner #419

Closed

Description

@chonilius

Problem

src/app/connect/ConnectPanel.tsx renders a "Wallet address mismatch" warning banner, added to close #283 ("Nothing reconciles WalletContext's connected address against AuthUser.stellarAddress"):

{user?.stellarAddress && user.stellarAddress !== address && (
  <div role="alert" className="mt-3 rounded-lg bg-amber-50 px-4 py-3 text-sm text-amber-700 ring-1 ring-inset ring-amber-200">
    <p className="font-medium">Wallet address mismatch</p>
    <p className="mt-1">
      The connected wallet ({address.slice(0, 4)}...{address.slice(-4)}) differs from
      the payout address on file ({user.stellarAddress.slice(0, 4)}...{user.stellarAddress.slice(-4)}).
      Payouts will be sent to the address on file.
    </p>
  </div>
)}

src/app/connect/ConnectPanel.test.tsx has a describe("ConnectPanel — the four connection-state combinations") block testing "neither connected," "GitHub only," "wallet only," and "both connected" — but "both connected" only asserts both signed-in states render with no CTAs; it never sets user.stellarAddress to a different value than the connected address to exercise this banner. There is no test anywhere in the file that renders this banner at all, nor one confirming it's absent when the addresses match.

Impact

This is the one piece of UI in the entire app whose whole job is warning a user their connected wallet won't receive their payouts — arguably the single highest-consequence message ConnectPanel can show, added specifically because #283 identified silent address drift as a real risk. It has zero coverage: a regression that broke the mismatch condition (e.g. an accidental === instead of !==, or dropping the user?.stellarAddress && guard causing a crash when stellarAddress is null) would ship undetected.

Suggested fix

Add test cases to ConnectPanel.test.tsx's "both connected" scenarios: one where user.stellarAddress differs from the connected address (banner renders, with both truncated addresses visible), and one where they match (banner is absent).

Activity

  1. added
    bug
    testing
    on Sep 17, 2026
  2. Okorie2000-code commented on Sep 18, 2026

    @Okorie2000-code

    Hi, I’d be happy to take this on. The scope is clear, and I’m confident I can implement the required changes without introducing unnecessary complexity. I’ll handle the implementation, testing, and final verification so the PR is ready for review.

  3. added
    Stellar Wave
    on Sep 23, 2026
  4. Dreal-pyper commented on Sep 23, 2026

    @Dreal-pyper

    @Dreal-pyper has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello Sir, I will like to get on this issue and resolve it quickly with a clean PR, kindly assign

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

  5. Archive-000 commented on Sep 23, 2026

    @Archive-000

    @Archive-000 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Please can I work on this

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

  6. Bojest001 commented on Sep 23, 2026

    @Bojest001

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

    Hi Maintainer please I will like to work on this issue

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

  7. davidjhonsonmate commented on Sep 23, 2026

    @davidjhonsonmate
    Contributor

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

    please assign this issue to me

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

  8. drips-wave commented on Sep 23, 2026

    @drips-wave

    Congratulations, @davidjhonsonmate! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

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

  9. added 2 commits that reference this issue on Sep 25, 2026
  10. drips-wave commented on Sep 25, 2026

    @drips-wave

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

    😎 @davidjhonsonmate: 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.

  11. removed
    Stellar Wave
    on Oct 15, 2026
  12. added
    Stellar Wave
    on Oct 15, 2026
  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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar Wavebugtesting

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions