Skip to content

Commit

Permalink
handle for netSpent as 0
Browse files Browse the repository at this point in the history
  • Loading branch information
JP Angelle committed Sep 11, 2023
1 parent cafba49 commit 9b0e47d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion centrifuge-app/src/pages/Loan/HoldingsValues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ export function HoldingsValues({ pool, transactions }: Props) {
/>
<LabelValueStack
label="Average settle price"
value={`${formatBalance(new CurrencyBalance(netSpent.div(currentFace), 6), pool.currency.symbol, 2, 2)}`}
value={
netSpent.isZero()
? '-'
: `${formatBalance(new CurrencyBalance(netSpent.div(currentFace), 6), pool.currency.symbol, 2, 2)}`
}
/>
</>
)
Expand Down

0 comments on commit 9b0e47d

Please sign in to comment.