From 97176d378f71a82378927a09e9abfeb1000fa98a Mon Sep 17 00:00:00 2001 From: viet-nv Date: Thu, 27 Jul 2023 10:45:04 +0700 Subject: [PATCH] fix: total value --- src/components/EarningAreaChart/index.tsx | 2 +- src/services/earning/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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,