When I use 'approveAndCall' to transfer tokens to a contract, the MetaMask verification screen doesn't show the amount, or the token name.
let contract = new web3.eth.Contract(gsERC20abi, '0x1f0735E0CaA3e2dc0f6C213274981FbF9D8F4CDA');
contract.methods.approveAndCall("0x9AF3BC7541D38B729F46fdd47B403AF5B229f6CF", 6, web3.utils.fromAscii("0")).send({from: "0xaBd70Cb55617EBC738607E0786aBE76Ad61e2f37"})
.on('transactionHash', function(hash){
console.log(hash);
});
The MetaMask verification screen shows "0" as the amount for the "APPROVE AND CALL" process, and doesn't show the token name. The tokens are successfully transferred from the active account to the contract, but the MetaMask verification screen doesn't show what is about to happen. That is not good!
However, when I instead transfer tokens to an account, the MetaMask verification screen correctly shows the amount and the token name:
let contract = new web3.eth.Contract(gsERC20abi, '0x1f0735E0CaA3e2dc0f6C213274981FbF9D8F4CDA');
contract.methods.transfer("0x2f4Edafe16509913198950226Bf148616D91BeE3", 3).send({from: "0xaBd70Cb55617EBC738607E0786aBE76Ad61e2f37"})
.on('transactionHash', function(hash){
console.log(hash);
});