Estoy intentando conectar Metamask en la aplicación móvil Metamask. Pero no estoy obteniendo soluciones adecuadas para eso. Funciona bien en el navegador web Metamask Extension.
El siguiente código se usa para el navegador web en Magento 2. Pero no funciona con la aplicación móvil. También estoy intentando usar detectEthereumProvider . Pero tampoco funciona con Metamask móvil. También había usado Provide window ethereum . Pero, tampoco está funcionando.
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(); } );También estoy usando vanilla js usando wallet connect con Web3model pero tampoco funciona. Porque, se dice que el paquete Web3Modal NPM debe usarse para Web3model, pero ¿es posible en magento 2?