Files
openlaunch/app/package.json
Kevin CodexandClaude Fable 5.1 d09606ced2 wallet: a real connect picker; Coinbase Smart Wallet was never reachable
Every "Connect wallet" button looked for a connector with id "coinbaseWallet",
but wagmi's Coinbase connector registers as "coinbaseWalletSDK". The lookup
never matched, so the app always fell through to the generic injected
connector. Coinbase Smart Wallet could not be chosen, and in a browser with
no wallet extension the click failed with ProviderNotFound and no UI reacted:
a dead button. That also hid that @coinbase/wallet-sdk (an optional peer of
wagmi) was not installed; the production bundle carried a "Cannot find
module" stub in its place.

- lib/wallet-connectors.ts: pure module choosing which wallets to offer
  (browser-announced EIP-6963 wallets first, the generic browser wallet only
  when something is injected without announcing itself, Coinbase always) and
  turning connect failures into plain text without echoing raw errors.
- components/WalletPicker.tsx: the connect dialog on the existing Sheet, one
  in-flight request at a time, errors shown inline with role=alert, closes on
  success. components/ConnectWallet.tsx: a button in the caller's styling
  that opens it.
- Header, trade panel, launch form, posts composer and the /me dashboard all
  connect through the picker; no component calls useConnect any more except
  the picker, and a test pins that.
- @coinbase/wallet-sdk ^4.3.7 installed (registry tarball, integrity matches,
  no eval or script/iframe injection; its origins were already in the CSP).

Verified in headless Chrome against the dev server: no wallet shows Coinbase
plus guidance and the Coinbase row waits on its popup; a fake EIP-6963 wallet
is listed, connects, and the header shows the address chip; a bare
window.ethereum is offered as "Browser wallet". Lint, typecheck, 279 tests
and a production build pass.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0146kzimBSuHTErfKYhMCaic
2026-09-10 10:46:50 +08:00

49 lines
1.2 KiB
JSON

{
"name": "openlaunch",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint",
"typecheck": "tsc --noEmit",
"test": "tsx --conditions=react-server --tsconfig tsconfig.test.json --test \"src/**/*.test.ts\"",
"migrate": "node scripts/migrate.mjs"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.1127.0",
"@base-ui/react": "^1.8.0",
"@coinbase/wallet-sdk": "^4.3.7",
"@tanstack/react-query": "^5.91.3",
"clsx": "^2.1.1",
"lightweight-charts": "^5.2.1",
"lucide-react": "^1.42.0",
"motion": "^13.2.0",
"next": "^16.3.4",
"next-themes": "^0.4.6",
"postgres": "^3.4.9",
"react": "19.2.3",
"react-dom": "19.2.3",
"server-only": "^0.0.1",
"sharp": "^0.35.4",
"tailwind-merge": "^3.6.0",
"viem": "^2.47.6",
"wagmi": "^3.5.0"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "^16.3.4",
"tailwindcss": "^4",
"tsx": "^4.23.13",
"typescript": "^5"
},
"overrides": {
"use-sync-external-store": "^1.4.0"
}
}