Moralis WalletConnect

Hi. Does anyone have working sample of Moralis WalletConnect integration? I am running into errors including high severity vulnerabilities detected during npm install, error message “Cannot read properties of undefined (reading ‘toLowerCase’)” message at authenticate time plus dead links where the moralis/wallet connect demo was reported to be available (https://github.com/MoralisWeb3/demo-apps/blob/main/walletconnect/index.html). Is there something up (e.g., waiting on security issues to be resolved before being able to use)?

Thanks!

Did you edit the code yourself or only downloaded and tried to use published Github files? Doing WalletConnect should work if you just go with what the documentation says. If you have a specific code, it would be easier to help

Hi Gry. Thanks for responding. Please do forward me the link to any example of working Moralis/WalletConnect code. My point was that the example link provided (https://github.com/MoralisWeb3/demo-apps/blob/main/walletconnect/index.html) no longer exists on github or anywhere else in the documentation that I could find. That is why I was suspecting something more had happened. Thanks again! Arv

Hi, I think the walletconnect stuff is now here
https://github.com/MoralisWeb3/react-moralis#enable-web3-via-walletconnect

Could not fetch a page which has walletconnect in realtime operation, but you can activate it simply by copypasting the code to your file mentioned in the link on the walletconnect part

Thank you for the follow-up Gry. Unfortunately, still getting same error, although in console log I am now noticing an additional showing up ahead of the initial error message reported which may provide additional insight. It is “Uncaught (in promise) Error: No RPC Url available for chainId: 99999”.

The code below is what I am using. The analogous code without “{provider: ‘walletconnect’}” works just fine in bringing up Metamask.

//
// Function to login via Keplr Wallet
//
async function loginViaKeplrWallet() {

user = new Object();
try {
user = Moralis.User.current();
console.log(‘Successfully fetched Moralis user object’);
}
catch (err) {
console.log(‘Moralis fetch of current user failed with error:’+err.message);
}

// Check if user exists
if (!user) {
console.log(‘Start Keplr wallet login via Moralis…’);
user = await Moralis.authenticate({provider: ‘walletconnect’});
console.log(‘Completed Keplr wallet login via Moralis…’);

}
else {
console.log(‘User already logged into Keplr wallet’);
}
}

If this is just something that is not supposed to work with Moralis right now, that’s fine. No use the two of us wasting any more time.

Thanks! Arv