Connect Metamask in Mobile using Metamask application from any mobile web browser. How that possible? (Magento 2)

Viewed 804

I am trying Metamask connect on mobile Metamask application. But i am not getting properly solutions for that. It's working fine in Web browser Metamask Extension.

The following code used for Web browser in Magento 2. But, not working with Mobile application. I am trying also using detectEthereumProvider. But, it's also not working with mobile Metamask. I had also used Provide window ethereum. But, it's also not working.

require([
    'jquery',
    'Magento_Theme/js/view/messages',
    'mage/url',
    'web3'
    ], function($,messages,url,web3){
        let accounts;
        let contract;
        let contractAddress;

        const getData  = async () => {
            var web3 = new Web3(window.ethereum); /* initialize web3 object */
            const { ethereum } = window;

            var web3 = new Web3(window.ethereum);
            if (typeof window.ethereum !== 'undefined') {
                console.log('MetaMask is installed!');
            }
        }

        getData();
    }
);

I am also using vanilla js using wallet connect with Web3model but also not working. Because, It's said Web3Modal NPM Package must be use for Web3model but it's possible on magento 2?

0 Answers
Related