Hi, my object is execute some function after the transaction successfully perfect.
Flow is transfer BUSD --> BUSD transferred --> execute function.
Now I execute the function after txStatus like this
txStatus
.on("transactionHash", (hash) => {
// ......
})
.on("receipt", (receipt) => {
openNotification({
message: "📃 New Receipt",
description: `${receipt.transactionHash}`,
});
console.log("🔊 New Receipt: ", receipt);
setIsPending(false);
func()// execute function here
})
.on("error", (error) => {
// .....
});
Is that have a better and safer way to deal with this case?
And from the photo Does it has a way to check that transaction is perfectly successful from the receipt?