Skip to content

Commit

Permalink
Fix undefined bug in portfolio (#2053)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn authored Mar 26, 2024
1 parent b0175ff commit 327bb18
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function AssetAllocation({ address }: { address?: string }) {
const poolIndex = filteredPools.findIndex((p) => p.id === balance.poolId)
const price =
filteredPools[poolIndex]?.tranches.find((t) => t.id === balance.trancheId)?.tokenPrice?.toDecimal() ?? Dec(0)
const asset = metas[poolIndex].data?.pool?.asset?.class
const asset = metas[poolIndex]?.data?.pool?.asset?.class
const value = balance.balance.toDecimal().mul(price)
total = total.add(value)
valueByClass[asset!] = valueByClass[asset!]?.add(value)
Expand Down

0 comments on commit 327bb18

Please sign in to comment.