Hello, everyone.
I have some issues due to version upgrade of Moralis(0.0.118 to 1.3.2) and react-moralis(0.2.8 to 1.3.1) libraries.
For example:
const tx = await Moralis.executeFunction({ awaitReceipt: false, …options });
tx.on(“transactionHash”, (hash) => {
openNotification({
message: “ New Transaction”,
description: 📃 Tx Hash: ${hash}
,
type: “success”
});
})
.on(“receipt”, (receipt) => {
openNotification({
message: “ New Receipt”,
description: 📃 Receipt: ${receipt.transactionHash}
,
type: “success”
});
})
.on(“error”, (error) => {
openNotification({
message: “ Error”,
description: 📃 Receipt: ${error.toString()}
,
type: “error”
});
console.log(error);
});
In this code, there comes an error that tx.on is not a function.
If you can fix them, please help me.
Thank you for paying attention to this post.