Skip to content

Commit

Permalink
fix: correct wallet balance (#1334)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjeatt authored Jun 23, 2023
1 parent 019777a commit dc2ffd6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ const WalletInsights = ({ balances }: WalletInsightsProps): JSX.Element => {
);

const totalBalance = rawBalance
?.add(accountLendingStatistics?.supplyAmountUSD || 0)
.sub(accountLendingStatistics?.borrowAmountUSD || 0)
?.sub(accountLendingStatistics?.borrowAmountUSD || 0)
.add(accountPools?.accountLiquidityUSD || 0);

const totalBalanceLabel = totalBalance ? formatUSD(totalBalance.toNumber(), { compact: true }) : '-';
Expand Down

1 comment on commit dc2ffd6

@vercel
Copy link

@vercel vercel bot commented on dc2ffd6 Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.