Skip to content

Implement wallet connection flow #6

Description

@Nemenwa

Implement the wallet connection UI and logic. Support Freighter and xBull wallets.
Components to build:

WalletConnectButton — "Connect Wallet" button in the nav
WalletModal — modal with wallet options
WalletProvider — React context providing wallet state throughout the app
useWallet hook — { address, isConnected, connect, disconnect, signTransaction, signMessage }

Flow:

User clicks "Connect Wallet"
Modal shows: Freighter, xBull, "More coming soon"
User clicks their wallet
Wallet browser extension triggers (if not installed, show install link)
User approves connection
App calls GET /api/auth to get a challenge
App asks wallet to sign the challenge
App submits signed challenge to POST /api/auth to get JWT
JWT stored in an httpOnly cookie (not localStorage)
UI updates to show connected address (truncated: GABCD...WXYZ)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions