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. (˘・_・˘)