Here;s my painfully simple component. I tried the const Moralis = require … etc variations thereof . I had this working before so I know it works, but I can’t get the declaration right I think
import { useMoralis } from "react-moralis";
import React from "react";
//import ReactDOM from "react-dom";
export default function FormComponent() {
const { Moralis } = useMoralis();
const options = {
type: "erc20",
amount: Moralis.Units.Token("0.5", "18"),
receiver: "0x..",
contractAddress: "0x.."
}
const doClick = async () =>{
let result = await Moralis.transfer(options)
}
return(
<button onClick={doClick}>
Click me!
</button>
);
}