Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] switchNetwork exposes project ID and stores it in user wallet (impersonating project) #3187

Open
vittominacori opened this issue Nov 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@vittominacori
Copy link

Link to minimal reproducible example

https://appkit-lab.reown.com/library/wagmi/

Summary

If a user wants to switch to a network that has not been added to their network list, the switchNetwork hook (or modal.switchNetwork) suggests the walletconnect rpc instead of the default rpcurl, exposing the project ID and storing it in the user's wallet.

Screenshot 2024-11-04 alle 10 16 38

This means that users will also use our project ID on other websites (or within MetaMask itself), impersonating our project, consuming our API rate limit, and polluting our stats.

I think this is really bad behavior.

Screenshot 2024-11-04 alle 10 31 57

List of related npm package versions

  • @reown/appkit v1.2.1
  • @reown/appkit-adapter-wagmi v1.2.1
@vittominacori vittominacori added bug Something isn't working needs review labels Nov 4, 2024
@vittominacori vittominacori changed the title [bug] addNetwork expose project id and store it in user wallet [bug] switchNetwork exposes project ID and stores it in user wallet (impersonating project) Nov 4, 2024
@vittominacori
Copy link
Author

vittominacori commented Nov 7, 2024

It also means that a custom rpc cannot be used for supported networks.

if (WC_HTTP_RPC_SUPPORTED_CHAINS.includes(caipNetworkId)) {
return getBlockchainApiRpcUrl(caipNetworkId, projectId)
}

https://github.com/orgs/reown-com/discussions/3170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants