Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

88
Visualizações
Mobile metamask does not work on dapp site

There is a website with a built-in dapp. There are two buttons: {account info} and {contract info}. When you click on the first button, the code implies loading addresses and balance through window.ethereum.request({ method: "eth_requestAccounts" }) and window.ethereum.request({ method: "eth_getBalance", params: [selectedAccount] }). On the computer it works great: image1

But on mobile metamask browser not working (button is not pressed): image2

Second button works fine both on computer and mobile (contains vanilla text without functions). Earlier I used web3.js and with functions that loaded when loading the page was not problems. Now, I use window.ethereum and think the problem can be from the window onload, with whom I do not know how to contact. Hook provider:

const provider = await detectEthereumProvider()

  if (provider) {
    web3 = new Web3(window.ethereum);
    document.getElementById("status_connect").innerHTML = ""
  } else {
    document.querySelector("#status_wallet").style.display = "block";
  }

I do not know what the problem is, tell me, please

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda