Uniswap / web3-react

A simple, maximally extensible, dependency minimized framework for building modern Ethereum dApps
https://web3-react-mu.vercel.app/
GNU General Public License v3.0
5.48k stars 1.51k forks source link

Compatibility Issue with @web3-react/walletconnect-v2 and Latest Versions of Next.js and React #894

Closed vm-achaylo closed 8 months ago

vm-achaylo commented 8 months ago

When using the @web3-react/walletconnect-v2 library and scanning the QR code on my phone, I encounter the following error in the application: "TypeError: Cannot assign to read-only property '0' of object '[object Array]'". Upon inspecting the code in the file /web3-react/blob/main/packages/walletconnect-v2/src/index.ts, I discovered that the issue arises in the catch block as shown below:

catch (error) { await this.deactivate(); cancelActivation(); throw error; }

My application utilizes the following versions: "next": "^13.0.6" and "react": "^18.2.0". However, I found that @web3-react/walletconnect-v2 works correctly when I downgrade the versions to "next": "12.1.0" and "react": "17.0.2" - in this case, there are no errors, and the connection is successfully established.

I would like to inquire if this issue is due to the current incompatibility of your library with the latest versions of Next.js and React. If so, could you please provide information about when a solution for this compatibility problem is expected to be available?

Thank you for your attention to this matter. I appreciate your efforts in maintaining the library and resolving this issue promptly. If there is any additional information or context needed, please let me know, and I'll be glad to provide it.