Hi I am trying to implement a USD price column into the token balances table page, see code below. Do I need to include a useEffect hook for this? Any pointers with how to achieve this would be much appreciated. Thanks
function ERC20Balance(props) {
const { fetchTokenPrice, data: formattedData, error, isLoading, isFetching } = useTokenPrice(props);
const { data: assets } = useERC20Balances(props);
const { Moralis } = useMoralis();
const columns = [
{
title: “USD Value”,
dataIndex: [“balance”, “token_address”],
key: “balance”,
render: (value, item, address) =>
fetchTokenPrice({address:address, chain:“eth”}).usdPrice*parseFloat(Moralis.Units.FromWei(value, item.decimals).toFixed(6)),
},