In my case, I am using magic link as my authentication, and when I try to transfer a token
Error: invalid hash (argument=“value”, value=null, code=INVALID_ARGUMENT, version=providers/5.6.0)
this error,
and my transfer token code
const handleTransfer = async () => {
const options: any = {
type: "erc20",
amount: Moralis.Units.Token(2000, 18),
receiver: "0x9c9691367A02F77970C49f258FB83c4425A40BF9",
contractAddress: "0x1c668fDe99B318E37Bbd69753942F2598231299E",
awaitReceipt: false,
};
await Moralis.transfer(options)
.then((e) => {
alert("sucesfully transfered");
})
.catch((e) => {
alert(e);
console.log(e);
});
await fetchTokenBalances();
};
magic auth code
const handleCustomLogin = async () => {
if (!isAuthenticated) {
await authenticate({
provider: "magicLink",
email: email,
apiKey: "pk_live_4423", // Enter API key from Magic Dashboard https://dashboard.magic.link/
network: "binance smart chain",
});
}
console.log("user already logged");
};