[bug] New network addition throws error
Link to minimal reproducible example
https://drive.google.com/file/d/1_j6mOUP3OVmvGOdUu-68Tvsi14GGw6av/view?usp=sharing
Summary
Plz watch the attached video.
When a new network is added through reown, first time it says connection declined, but then on retrying it connects. It should not throw connection declined in the first place.
List of related npm package versions
"@reown/appkit": "^1.7.4",
"@reown/appkit-adapter-bitcoin": "^1.7.4",
"@reown/appkit-adapter-ethers": "^1.7.4",
"@reown/appkit-adapter-solana": "^1.7.4",
Node.js Version
v22.11.0
Package Manager
10.9.0
I ran into the same issue in my project. Here's a screenshot showing the behavior: π https://imgur.com/a/1abyDaS
Can you please upgrade to latest and confirm whether you can still repro?
@arein Yes, I used version 1.7.8 and it still reproduces this error. The problem is MetaMask throws a wire error with the message "p is not a function," then refuses the connection. I think it's all good here and the MetaMask team should fix this error. https://github.com/MetaMask/metamask-extension/issues/33245
@arein
After updating viem, wagmi, and appkit to their latest versions, the wallet connection issue appears to be resolved. Weβre currently waiting for final confirmation from our tester, but everything seems to be working smoothly so far. β
π https://imgur.com/a/0iqKHcm
Updated Dependencies:
"dependencies": {
"@Beraborrowofficial/sdk": "file:../sdk",
"@emotion/react": "11.13.3",
"@emotion/styled": "11.13.0",
"@mui/icons-material": "5.16.7",
"@mui/material": "5.16.7",
"@reown/appkit": "1.7.15",
"@reown/appkit-adapter-wagmi": "1.7.15",
"@sentry/react": "8.50.0",
"@sentry/vite-plugin": "3.0.0",
"@tanstack/query-core": "5.59.6",
"@tanstack/react-query": "5.59.6",
"@wagmi/core": "2.17.3",
"axios": "1.8.1",
"jotai": "2.10.1",
"jotai-effect": "1.0.3",
"jotai-scope": "0.6.0",
"jotai-tanstack-query": "0.8.8",
"posthog-js": "1.170.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-error-boundary": "4.1.1",
"react-gtm-module": "2.0.11",
"react-router-dom": "6.27.0",
"viem": "2.31.3",
"vite-plugin-svgr": "^4.3.0",
"wagmi": "2.15.6"
},
"devDependencies": {
"@types/node": "22.7.6",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.1",
"@types/react-gtm-module": "2.0.3",
"@typescript-eslint/eslint-plugin": "8.9.0",
"@typescript-eslint/parser": "8.9.0",
"@typescript-eslint/utils": "8.9.0",
"@vitejs/plugin-react": "4.3.2",
"@vitejs/plugin-react-swc": "3.7.1",
"dotenv": "16.4.5",
"eslint": "9.12.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-react-refresh": "0.4.12",
"prettier": "3.3.3",
"sass": " 1.80.1",
"typescript": "5.6.3",
"vite": "5.4.9",
"vite-bundle-visualizer": "1.2.1",
"vite-plugin-pwa": "0.20.5"
},
Amazing