Skip to content

[TAS-5562] ♻️ Make app detection SSR-ready and conditionally load wallet connectors#885

Merged
williamchong merged 1 commit intolikecoin:developfrom
williamchong:feature/walletconnect
Mar 30, 2026
Merged

[TAS-5562] ♻️ Make app detection SSR-ready and conditionally load wallet connectors#885
williamchong merged 1 commit intolikecoin:developfrom
williamchong:feature/walletconnect

Conversation

@williamchong
Copy link
Copy Markdown
Member

  • Check user-agent header on server via useRequestHeaders for SSR app detection
  • Remove MetaMask connector and @metamask/connect-evm dependency
  • Only add Coinbase Wallet connector in embedded webview contexts
  • Pass isApp flag to wagmi config to gate connector setup

- Check user-agent header on server via useRequestHeaders for SSR app detection
- Remove MetaMask connector and @metamask/connect-evm dependency
- Only add Coinbase Wallet connector in embedded webview contexts
- Pass isApp flag to wagmi config to gate connector setup
@williamchong williamchong requested review from a team, Copilot and nwingt March 27, 2026 14:15
@williamchong williamchong changed the title ♻️ Make app detection SSR-ready and conditionally load wallet connectors [TAS-5562] ♻️ Make app detection SSR-ready and conditionally load wallet connectors Mar 27, 2026
@notion-workspace
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes app/environment detection usable during SSR and uses that signal to reduce wallet-connector setup (notably removing the MetaMask connector and only adding Coinbase Wallet in specific embedded contexts).

Changes:

  • Update useAppDetection() to detect the app user-agent on the server via useRequestHeaders.
  • Remove MetaMask connector usage and gate Coinbase Wallet connector setup based on isApp + embedded webview heuristics.
  • Pass isApp into the wagmi config from the Nuxt wagmi plugin.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
wagmi.ts Drops MetaMask connector, adds isApp param, conditionally pushes Coinbase Wallet connector in embedded contexts.
plugins/wagmi.ts Reads isApp from useAppDetection() and passes it into createWagmiConfig().
composables/use-app-detection.ts Makes app detection SSR-capable by reading user-agent header server-side.
package.json Removes direct dependency on @metamask/connect-evm.
package-lock.json Updates lockfile to reflect dependency changes (but still contains @metamask/connect-evm entries).

@williamchong williamchong merged commit 4646cb5 into likecoin:develop Mar 30, 2026
5 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.

3 participants