reown-com / appkit

The full stack toolkit to build onchain app UX
https://reown.com/appkit
Apache License 2.0
4.9k stars 1.39k forks source link

[bug] #1140

Closed King7474 closed 1 year ago

King7474 commented 1 year ago

Link to minimal reproducible example

Wallet connect

Summary

after the upgrade setting up wallet connect have been so difficult i am using walletconnect/web-provider i need full manual set up on how to get the new wallet modal and connect working perfectly i have tried installing using the npm i and all but still not working wagim issue, typescript issue on devdepend.... even with npm i --force errors please i need full manual guide from A-Z on how to get it set up and the package json required for it

List of related npm package versions

{ "name": "TC PRO", "version": "0.1.5", "private": true, "scripts": { "start": "GENERATE_SOURCEMAP=false PORT=80 react-app-rewired start", "build": "GENERATE_SOURCEMAP=false react-app-rewired build", "test": "react-app-rewired test" }, "dependencies": { "@coinbase/wallet-sdk": "^3.7.1", "@web3modal/ethereum": "^2.6.2", "@web3modal/react": "^2.6.2", "buffer": "^6.0.3", "ethereumjs-tx": "^1.3.7", "ethers": "^5.7.2", "jquery": "^3.7.0", "node-fetch": "^3.2.10", "react": "^18.2.0", "react-app-rewired": "^2.2.1", "react-dom": "^18.2.0", "react-router": "^6.4.0", "universal-cookie": "^4.0.4", "viem": "^1.2.7", "wagmi": "^1.3.3", "web3": "^1.10.0", "web3modal": "^1.9.12" }, "devDependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@rollup/plugin-commonjs": "22.0.2", "@rollup/plugin-node-resolve": "13.3.0", "@types/node": "18.7.3", "@types/sinon": "10.0.13", "@typescript-eslint/eslint-plugin": "5.33.0", "@typescript-eslint/parser": "5.33.0", "assert": "^2.0.0", "crypto-browserify": "^3.12.0", "https-browserify": "^1.0.0", "lerna": "5.5.2", "os-browserify": "^0.3.0", "prettier": "2.7.1", "rollup": "2.78.0", "rollup-plugin-esbuild": "4.9.3", "sinon": "14.0.0", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "url": "^0.11.1", "vitest": "^0.22.1" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }

xzilja commented 1 year ago

I don't think we can help here due to amount of conflicting dependencies provided, plus issue template is not addressed. Best I can suggest is to decide on a path forward, either with

ethereum-provider approach (simplest to migrate to, uses simple WalletConnectModal) https://docs.walletconnect.com/2.0/web/providers/ethereum

Or via wagmi using Web3Modal https://docs.walletconnect.com/2.0/web/about-web3modal

We also have a migration guide https://docs.walletconnect.com/2.0/advanced/migration-from-v1.x/overview

I'd start by cleaning up you dependencies i.e.

"web3": "^1.10.0",
"web3modal": "^1.9.12"

should not be there / used and you probably don't need viem and ethers together either?

xzilja commented 1 year ago

We also have quiet a few examples available at https://github.com/WalletConnect/web3modal-examples

King7474 commented 1 year ago

ok thank you can you help me clean it up and send me a new one that will work so i can can just paste it on my pckage json

King7474 commented 1 year ago

SEE THE ERRORS

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: react-scripts@5.0.1 npm ERR! Found: typescript@5.1.6 npm ERR! node_modules/typescript npm ERR! peerOptional typescript@">=5.0.4" from @wagmi/core@1.3.4 npm ERR! node_modules/@wagmi/core npm ERR! peer @wagmi/core@">=1" from @web3modal/ethereum@2.6.2 npm ERR! node_modules/@web3modal/ethereum npm ERR! @web3modal/ethereum@"^2.6.2" from the root project npm ERR! @wagmi/core@"1.3.4" from wagmi@1.3.5 npm ERR! node_modules/wagmi npm ERR! wagmi@"^1.3.3" from the root project npm ERR! peerOptional typescript@">=5.0.4" from viem@1.2.9 npm ERR! node_modules/viem npm ERR! viem@"^1.2.7" from the root project npm ERR! peer viem@">=1" from @web3modal/ethereum@2.6.2 npm ERR! node_modules/@web3modal/ethereum npm ERR! @web3modal/ethereum@"^2.6.2" from the root project npm ERR! 4 more (@wagmi/core, wagmi, @wagmi/connectors, @safe-global/safe-apps-sdk) npm ERR! 5 more (wagmi, tsutils, @wagmi/chains, @wagmi/connectors, abitype) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1 npm ERR! node_modules/react-scripts npm ERR! peer react-scripts@">=2.1.3" from react-app-rewired@2.2.1 npm ERR! node_modules/react-app-rewired npm ERR! react-app-rewired@"^2.2.1" from the root project npm ERR! npm ERR! Conflicting peer dependency: typescript@4.9.5 npm ERR! node_modules/typescript npm ERR! peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1 npm ERR! node_modules/react-scripts npm ERR! peer react-scripts@">=2.1.3" from react-app-rewired@2.2.1 npm ERR! node_modules/react-app-rewired npm ERR! react-app-rewired@"^2.2.1" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR!