Hi, iâm trying to make use of maralis for my webpage. My code that detect user has metamask. if it doesnât, it will make use of walletconnect as provider (mainly for mobile user).
it works as expected on desktop with metamask. When I try to authenticate via mobile with walletconnect. I have this âdoes not have a registered handlerâ error on chrome inspection windows. Can someone please assist. Following is my function that handle authentication: -
async function authenticate() {
const ethereum = window.ethereum;
if ( !ethereum || !ethereum.on ) {
try {
user = await Moralis.Web3.authenticate({signingMessage:"authenticate", provider: 'walletconnect'});
web3 = await Moralis.Web3.enable({provider: 'walletconnect'});
logged_in(true);
} catch (error) {
console.log('authenticate failed', error);
}
} else {
try {
Moralis.authenticate({signingMessage:"authenticate"}).then(function (muser) {
user = muser;
logged_in(true);
});
} catch(error) {
console.log('authenticate failed', error);
}
}
}