web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

[bug] Can not switch to Goerli

Open zhangjing28 opened this issue 2 years ago • 3 comments

Link to minimal reproducible example

https://github.com/zhangjing28/bridge-wallet-connect-demo

Summary

Steps to Reproduce

  • Click "connect wallet" to open wallet connect modal
  • Click "Wallet Connect" in popup and using Metamask app to scan the qrcode
  • Click "switch to goerli"

Detail Error Message

Details: {"code":-32602,"message":"May not specify default MetaMask chain."}
Version: [email protected]

### List of related npm package versions

{ "name": "bridge-wallet-connect-demo", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@web3modal/wagmi": "^3.2.0", "next": "14.0.1", "react": "^18", "react-dom": "^18", "viem": "^1.18.1", "wagmi": "^1.4.5" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "autoprefixer": "^10.0.1", "eslint": "^8", "eslint-config-next": "14.0.1", "postcss": "^8", "tailwindcss": "^3.3.0", "typescript": "^5" } }

zhangjing28 avatar Oct 31 '23 10:10 zhangjing28

hi, can you try importing them from 'viem/chains' ?

import * as allChains from "viem/chains";

glitch-txs avatar Oct 31 '23 11:10 glitch-txs

hi, can you try importing them from 'viem/chains' ?

import * as allChains from "viem/chains";

Thanks for your quick reply, but it's not working. Got the same error as before

zhangjing28 avatar Oct 31 '23 13:10 zhangjing28

hi, can you try importing them from 'viem/chains' ? import * as allChains from "viem/chains";

Thanks for your quick reply, but it's not working. Got the same error as before

any solutions?

kolirt avatar Jan 25 '24 14:01 kolirt

Please upgrade to Viem v2

glitch-txs avatar Jun 06 '24 07:06 glitch-txs