Skip to content

Commit

Permalink
fix: total value
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv committed Jul 27, 2023
1 parent d3f5739 commit 97176d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/EarningAreaChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const EarningAreaChart: React.FC<Props> = ({ data, setHoverValue = EMPTY_FUNCTIO
tickLine={false}
stroke={theme.subText}
tickFormatter={(value: any, _index: number) => formatter(String(value))}
width={52}
width={54}
/>
<Customized component={KyberLogo} />
<Tooltip
Expand Down
4 changes: 2 additions & 2 deletions src/services/earning/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 97176d3

Please sign in to comment.