Skip to content

feat: add Connect Wallet Modal for Sign In page#282

Merged
A6dulmalik merged 2 commits intoMindBlockLabs:mainfrom
akintewe:feature/connect-wallet-modal
Feb 25, 2026
Merged

feat: add Connect Wallet Modal for Sign In page#282
A6dulmalik merged 2 commits intoMindBlockLabs:mainfrom
akintewe:feature/connect-wallet-modal

Conversation

@akintewe
Copy link
Contributor

Summary

This PR implements the Connect Wallet Modal for the Sign In page, replacing the previous direct wallet connection flow with a polished, accessible modal that lists all available wallet options.

Changes

  • frontend/components/ui/wallet/WalletIcons.tsx — SVG icon components for all five wallets: Phantom (purple), MetaMask (fox), Coinbase Wallet (blue circle), Trust (shield), and Freighter (black logotype)
  • frontend/components/ui/wallet/WalletOption.tsx — Reusable wallet row component displaying the wallet icon, name, and a "Detected" badge when the wallet extension is present in the browser
  • frontend/components/ui/WalletModal.tsx — Main modal component featuring:
    • Dark card (bg-[#0A1628]) on a blurred overlay (bg-black/60 backdrop-blur-sm)
    • Close via X button, backdrop click, or Escape key
    • Focus trap for full keyboard navigation
    • ARIA attributes (role="dialog", aria-modal, aria-labelledby) for screen reader accessibility
    • Body scroll lock while open
    • Auto-detects installed wallets via window.freighter / window.ethereum.* flags and shows "Detected" badge accordingly
  • frontend/hooks/useWalletModal.ts — Minimal hook exposing { isOpen, openModal, closeModal } to control modal state
  • frontend/app/auth/signin/page.tsx — Updated "Connect Wallet" button to open the modal instead of triggering auth directly; handleWalletSelect routes Freighter selections to the existing useStellarWalletAuth flow and shows a "Coming Soon" info toast for Phantom, MetaMask, Coinbase, and Trust

Test plan

  • Click "Connect Wallet" on /auth/signin — modal opens
  • Press Escape — modal closes
  • Click the backdrop — modal closes
  • Click the X button — modal closes
  • Tab through modal options — focus stays trapped inside modal
  • Select Freighter — triggers existing wallet auth flow (connect → sign → verify)
  • Select any other wallet — shows "Coming Soon" info toast and closes modal
  • Install/uninstall Freighter extension and verify "Detected" badge appears/disappears
  • Verify modal is fully responsive on mobile and desktop
  • Verify styling matches existing auth page (bg-[#050C16], blue accents, rounded-2xl)

Closes #249

- Create WalletModal component with backdrop blur, Escape key, focus trap, and ARIA accessibility
- Create WalletOption component showing wallet name and Detected badge
- Create WalletIcons with SVG components for Phantom, MetaMask, Coinbase, Trust, and Freighter
- Add useWalletModal hook for open/close state management
- Update Sign In page to open modal on Connect Wallet click; only Freighter triggers real auth flow, others show Coming Soon toast
- Fix useReducedMotionCheck to import usePrefersReducedMotion from local hooks, not framer-motion
- Fix usePrefersReducedMotion return type by coalescing null to false so boolean is satisfied
@A6dulmalik A6dulmalik merged commit ca5f1a8 into MindBlockLabs:main Feb 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FRONTEND - CONNECT WALLET MODAL

2 participants