Skip to content

Connect Freighter Wallet to WalletProvider #436

Closed

Description

@Luluameh
  • Difficulty: Medium
  • Labels: feature, web3, wallet, stellar

Description

Currently, our WalletProvider.tsx uses simulated wallet states. We need to hook this provider up to the official @stellar/freighter-api to fetch the user's real address, request transaction signatures, and track network changes.

Technical Scope & Steps

  1. Import @stellar/freighter-api into src/providers/WalletProvider.tsx.
  2. Replace mock connection states with isConnected(), getPublicKey(), and signTransaction().
  3. Handle state updates when a user changes networks in the Freighter extension settings (e.g., alert them if they are on Mainnet instead of Testnet).
  4. Implement local storage caching to persist connection across page reloads.

Acceptance Criteria

  • Clicking "Connect Wallet" opens the Freighter browser prompt.
  • Navbar correctly displays the abbreviated real public key (e.g., GB3A...2F4G) upon connection.
  • Changing networks in Freighter is detected and handled by the UI.

Activity

  1. jahrulezfrancis commented on Jul 23, 2026

    @jahrulezfrancis
    Contributor

    I'd like to take this issue. I'll replace the mocked state in WalletProvider.tsx with real Freighter calls — isConnected()/requestAccess()/getAddress() for connection and the Navbar public key, signTransaction() for signing, and getNetwork() to detect and handle network changes (warning if the user is on Mainnet when Testnet is expected). Connection state persists via localStorage, re-validated on load to avoid stale state. I'll also handle missing extension, rejected prompts, and revoked access.

  2. grantfox-oss commented on Jul 26, 2026

    @grantfox-oss

    🦊 GrantFox — @jahrulezfrancis has been assigned to this issue as part of the Official Campaign | FWC26 campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #436)
    2. Your PR will be reviewed by the LightForgeHub maintainers

    Good luck! Track your progress on GrantFox.

  3. grantfox-oss commented on Jul 29, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!

    @jahrulezfrancis's PR #445 was approved and merged by @Luluameh.

    🏆 @jahrulezfrancis: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (379 total points). Track your full progress on GrantFox.

    👏 Great work, @jahrulezfrancis! Keep contributing to LightForgeHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions