I am using web3js to create a local account using the following function
function makeaccount() {
var account = web3.eth.accounts.create();
console.log(account);
var walletprivate = account["privateKey"];
var phppasswallet = "THE_PASSWORD";
}
This functions generates an account locally but I can even access the balance of this address from Already Deployed Contract Token using
contract.methods.balanceOf(address).call().then(function (balance) {
$("#balance").html(balance);
});
However when I try to send tokens from Metamask to this address. It keeps spinning and balance of the address created using makeaccount is always zero. I am using a private network and have setup metamask and web3js to use the localhost network.