i have issue on web3 = new web3 (web3.currentProvider);
below is the code. it said web3 is not a constructor. is it like the capital letter issues?
the version of my web3 is "^1.3".
var contract = "";
if (typeof web3 !== 'undefined') {
console.log('inside web3')
Web3 = new Web3 (Web3.currentProvider);
} else {
console.log('else web3');
var web3 = new Web3(new
Web3.providers.HttpProvider('http://127.0.0.1:4444/'));
}
window.ethereum.enable()
.then(function (accounts) {
console.log(accounts[0]);
web3.eth.defaultAccount = web3.eth.getAccounts();
var contractabi = new web3.eth.contract([
{ABI}])