Skip to content

Commit

Permalink
fix(rewards): summ all user strategies for the rewards pills
Browse files Browse the repository at this point in the history
  • Loading branch information
FiboApe committed Jan 29, 2025
1 parent fb2fbc8 commit 2ee909d
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,15 @@ export const portfolioColumnConfigs: StrategyColumnConfig<StrategiesTableVariant
</ContainerBox>
<Typography variant="bodyExtraSmall" color={({ palette: { mode } }) => colors[mode].typography.typo2}>
$
{data[0].balances
.filter((balance) => balance.token.address !== data[0].strategy.asset.address)
.reduce((acc, balance) => acc + (Number(balance.amount.amountInUSD) ?? 0), 0)
{data
.reduce(
(accBalance, strategy) =>
accBalance +
strategy.balances
.filter((balance) => balance.token.address !== data[0].strategy.asset.address)
.reduce((acc, balance) => acc + (Number(balance.amount.amountInUSD) ?? 0), 0),
0
)
.toFixed(2)}
</Typography>
</StyledRewardsPill>
Expand Down

0 comments on commit 2ee909d

Please sign in to comment.