web3modal
web3modal copied to clipboard
[bug] wrong chainId param in request url
Link to minimal reproducible example
https://github.com/sakhro/reown-mwe/tree/main
There is one problem that occures in two scenarios. Problem is with request url params. When we try to do smth in evm network it will run request with chainId=solana params. We can we reproduce this in 2 cases:
- network switch between evm chains
- send evm transaction
If we remove solana from networks array in createAppKit config everything will work as expected.
Steps to Reproduce
Problem with network switch
- connect trust wallet via wallet connect
- try to switch network via switch button
- check console request params
Problem with evm transaction
- if u on mainnet network open modal and switch to solana and then to bnb (this is an only way u can switch between mainnet and bsc)
- try to send evm transaction
- check console request params
See attachment screencast
https://github.com/user-attachments/assets/8b60e340-4895-491e-987b-3ac24407d221
Summary
In summary switch between evm networks (and transactions) are not posible if we provide solana to networks array for createAppKit config.
List of related npm package versions
"dependencies": {
"@reown/appkit": "1.8.10",
"@reown/appkit-adapter-solana": "1.8.10",
"@reown/appkit-adapter-wagmi": "1.8.10",
"@solana/web3.js": "^1.98.0",
"@tanstack/react-query": "5.90.3",
"next": "15.3.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"viem": "2.38.1",
"wagmi": "^2.18.0"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^8",
"eslint-config-next": "15.1.3",
"typescript": "^5"
}
Node.js Version
v20.19.0
Package Manager
yarn 1.22.19