When I run the method on Etherscan or Remix, the amount is correct, and it displays with the token's symbol CSHIP
.
Yet for the life of me, I can't get the right amount to show up when I am implementing this in my javascript app. My code is below:
let amt = 1e16;
const hash = await web3React.library.provider.request({
method: "eth_sendTransaction",
params: [
{
from: web3React.account,
to: farmAddress,
data: shipContract.methods
.transfer(farmAddress, web3.utils.toHex(amt) + "")
.encodeABI(),
nonce: (await web3.eth.getTransactionCount(web3React.account, "latest")) + "",
},
],
});
And here is the result when that code is run:
Note that not only is the amount wrong, but the token symbol CSHIP
does not appear. What am I doing wrong?