Metamask and Coinbase wallets

Hi all,
I need to implement support for both Metamask and Coinbase wallets in my dapp. Iโ€™m using javascript and the issue is that when i have both wallets installed in my browser, Coinbase is always picked up with priority. I cant find anywhere an example how to initialize Coinbase wallet (such as the walletconnect example) and im very confusedโ€ฆ

    async function login() {
        let user = Moralis.User.current();
        if (!user) {
            user = await Moralis.authenticate({ signingMessage: "My custom message" }, { provider:'injected' });
            await Moralis.enableWeb3();
        }
        console.log("logged in user:", user);
    }

Please help ;o

Hi see the other thread. You also do not need enableWeb3 when using authenticate.

1 Like