MoralisWeb3 / Moralis-JS-SDK-v1

Moralis Official Javascript SDK v1 (see https://github.com/MoralisWeb3/Moralis-JS-SDK for the latest version)
Other
8 stars 6 forks source link

WalletConnect v2 modal does not take chains as array #41

Open KornOse opened 1 year ago

KornOse commented 1 year ago

New Feature Request

WalletConnect v2

Checklist

Current Limitation

Currently there is no possibility of passing chains as array into moralis integration of web3 modal, this raises an issue where i get the error...: Mismatched networks. Please switch XXX Wallet current network to chainId=1 ...when tying to connect WC wallet on different network than the one i provide before connecting.

Feature / Enhancement Description

This is purely limitation of Moralis code, WC v2 modal supports chains input as an array and i dont have issues connecting with any chain and so no errors are present

Example Use Case

in file WalletConnectWeb3Connector.js there is this line of code: chains: [providedChainId ? Number(providedChainId) : 1],. It would be nice to pass providedChainId as array of chainIds. I believe that this was not intentionally set to just one id and it would require more work to implement on other parts of moralis code. I also know that this package is already deprecated, it would just be nice to have some explanation

Alternatives / Workarounds

There are no possible workarounds as far as i know