I wrote a smart contract for an ERC 20 token. I created a UI (React.js) to interact with it using ethers.js I am able to read data from the contract and display on the webpage. However,When I try to use the transfer function to send some of the tokens to another address,Metamask displays 0 tokens as the value of what I am trying to send. How do I get around this? Thanks.
The Value you see in the metamask is msg.value, which is the ether you are sending in the transaction.
So In your case, while transfering token , you are just transfering token from one address to another & you are not sending any msg.value or ether with the transaction. that's why you are seeing 0 in the metamask.