diff --git a/src/components/EarningAreaChart/index.tsx b/src/components/EarningAreaChart/index.tsx index 42887a2f94..5eef763884 100644 --- a/src/components/EarningAreaChart/index.tsx +++ b/src/components/EarningAreaChart/index.tsx @@ -115,7 +115,7 @@ const EarningAreaChart: React.FC = ({ data, setHoverValue = EMPTY_FUNCTIO tickLine={false} stroke={theme.subText} tickFormatter={(value: any, _index: number) => formatter(String(value))} - width={52} + width={54} /> { - const historicalEarning = (earningRes?.data as any)?.data?.[chainName]?.[pos.id] || {} + const historicalEarning = ((earningRes?.data as any)?.data?.[chainName]?.[pos.id] || []).reverse() return { ...pos, historicalEarning, @@ -112,7 +112,7 @@ const earningApi = createApi({ ...acc, [chainName]: { positions: positionData?.[chainName].positions.map(pos => { - const historicalEarning = (earningRes?.data as any)?.data?.[chainName]?.[pos.id] || {} + const historicalEarning = ((earningRes?.data as any)?.data?.[chainName]?.[pos.id] || []).reverse return { ...pos, historicalEarning,