Skip to content

IssueActions and MilestoneActions never read WalletContext's own error state, discarding a specific Freighter failure reason in favor of a generic message #235

Closed

Description

@chonilius

src/context/WalletContext.tsx#connect already computes a specific, useful error and
stores it in its own error state — e.g. "Wallet access was not granted.",
"Unable to read wallet address.", or a Freighter-SDK-provided message.

src/app/issues/[id]/IssueActions.tsx#withWallet and
src/app/milestones/MilestoneActions.tsx#handleFund/#handleDeposit all call connect()
but destructure only address, connect, connecting from useWallet() — never error:

// IssueActions.tsx
const { address, connect, connecting } = useWallet();
...
const walletAddress = address ?? (await connect());
if (!walletAddress) {
  setError("Connect a Stellar wallet to continue.");
  return;
}

Since WalletContext#connect catches its own failures internally and resolves to null
rather than rejecting, await connect() here never throws — it simply returns null on
failure, and each of these components' own generic fallback message
("Connect a Stellar wallet to continue.", "Connect a Stellar wallet to fund this
milestone.", "Connect a Stellar wallet to deposit.") is shown instead, regardless of
why the connection actually failed. WalletContext's own, more specific error — the
one piece of state built specifically to explain the failure (extension not installed,
access denied, address unreadable) — is computed, stored, and then never read by any of
the three components that trigger the connection in the first place.

Suggested fix: destructure error from useWallet() in each of these components and
prefer it over the generic fallback message when it's set immediately after a failed
connect() call, so users see the specific reason instead of a one-size-fits-all
prompt.

Activity

  1. added
    bug
    very hard
    help wanted
    enhancement
    on Aug 21, 2026
  2. added
    Stellar Wave
    on Aug 24, 2026
  3. M2u0i0z commented on Aug 24, 2026

    @M2u0i0z

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

    I'd be glad to handle this issue. I'll keep the implementation concise, maintainable, and well-documented. .

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

  4. Elizabeth-dev270 commented on Aug 24, 2026

    @Elizabeth-dev270

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

    Pls i would like to fix this issue urgently

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

  5. presidojay1 commented on Aug 24, 2026

    @presidojay1
    Contributor

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

    Hi Maintainer, I’d be glad to take on this issue

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

  6. damilare0813 commented on Aug 24, 2026

    @damilare0813

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

    Interested in working on this. I'll ensure the implementation is clean, tested, and aligned with project standards.

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

  7. akinboyewaSamson commented on Aug 24, 2026

    @akinboyewaSamson

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

    Hello maintainer, I would love to work on this issue

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

  8. Yasir-TechGuy commented on Aug 24, 2026

    @Yasir-TechGuy

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

    Hi Maintainer, i will like to work on this issue

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

  9. drips-wave commented on Aug 24, 2026

    @drips-wave

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

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

  10. drips-wave commented on Aug 25, 2026

    @drips-wave

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

    😎 @presidojay1: 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

Assignees

Labels

Stellar Wavebugenhancementhelp wantedvery hard

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions