diff --git a/src/app/profile/[address]/page.tsx b/src/app/profile/[address]/page.tsx index 1c347be..c85d17c 100644 --- a/src/app/profile/[address]/page.tsx +++ b/src/app/profile/[address]/page.tsx @@ -656,9 +656,9 @@ function ProfileStatsRow({ const totalReaders = storylines?.reduce((sum, s) => sum + (s.view_count ?? 0), 0) ?? 0; const donationsTotal = donationsData?.reduce((sum, d) => sum + BigInt(d.amount), BigInt(0)) ?? BigInt(0); const combinedEarnings = (totalRoyalties ?? BigInt(0)) + donationsTotal; - const earningsStr = combinedEarnings > BigInt(0) - ? `${formatPrice(formatUnits(combinedEarnings, 18))} ${RESERVE_LABEL}` - : "—"; + const earningsPlot = Number(formatUnits(combinedEarnings, 18)); + const earningsUsd = plotUsdPrice ? earningsPlot * plotUsdPrice : null; + const earningsPlotStr = earningsPlot > 0 ? `${formatPrice(formatUnits(combinedEarnings, 18))} ${RESERVE_LABEL}` : null; const balanceStr = plotBalance != null ? formatCompact(Number(formatUnits(plotBalance, 18))) : "—"; @@ -674,7 +674,12 @@ function ProfileStatsRow({