I just start using moralis & create some function transfer on polygon mainnet but its not working
code
const { Moralis } = useMoralis();
const [tx, setTx] = useState();
const [amount, setAmount] = useState();
const [isPending, setIsPending] = useState(false);
useEffect(() => {
amount? setTx({ amount}) : setTx();
}, [amount]);
async function transfer() {
const { amount} = tx;
let options = {};
{
options = {
native: "native",
amount: Moralis.Units.ETH(amount),
receiver: "0xd...........( example receiver address)"
};
}
await Moralis.transfer(options);
}
metamask call errors :
pls help thanks