(dApp) My dapp doesn't interact with the MetaMask

  initWeb3: function() {
    if (typeof web3 !== 'undefined') {
      App.web3Provider = web3.currentProvider;
      web3 = new Web3(web3.currentProvider);
    } else {
      App.web3Provider = new web3.providers.HttpProvider('http://localhost:8545');
      web3 = new Web3(App.web3Provider); // 새로운 오브젝트 생성
    }

    return App.initContract();
  },

This is part of my app.js

I am currently studying dapp while working on a project that is a little past time.

The problem I face is that when I press the button through the code I set, I have to interact with the MetaMask, but I can’t.

I think it’s a problem with the version compatibility.

Has anyone ever solved this problem or knows how to fix it?

I am a dapp beginner. I beg to all. (˘・_・˘)

Hello! Welcome to the MetaMask community! I’ll dig later tonight to see if I can find help for you, but for the time being wanted to share the MetaMask docs in case it helps: Introduction | MetaMask Docs

I solved this problem. Thank you for your answer. Have a nice day!.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.