diff --git a/components/layout/Economics/ChainBreakdown.tsx b/components/layout/Economics/ChainBreakdown.tsx index ed99bebc..2a8022f5 100644 --- a/components/layout/Economics/ChainBreakdown.tsx +++ b/components/layout/Economics/ChainBreakdown.tsx @@ -313,6 +313,23 @@ export default function ChainBreakdown({ }, [data, master]); //Get an array of potential data availabilities for this page + const maxRevenue = useMemo(() => { + let retValue = 0; + //Loop through for each chain + Object.keys(data).forEach((key) => { + const dataIndex = data[key][selectedTimespan].revenue.types.indexOf( + showUsd ? "usd" : "eth", + ); + + retValue = + data[key][selectedTimespan].revenue.total[dataIndex] > retValue + ? data[key][selectedTimespan].revenue.total[dataIndex] + : retValue; + }); + + return retValue; + }, [selectedTimespan, data, showUsd]); + function formatNumber(x: number) { return (