Skip to content

Commit

Permalink
fix(Positions): added extra flags to prevent bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdt committed Mar 17, 2021
1 parent 6572e89 commit edf8527
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Market/PositionsCard/PositionsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ const Position: React.FC<TokenProps> = ({ option }) => {
return balances
}, [isPut, entity, option, option.long, option.redeem])

if (getScaledBalances().redeem === '0' && getScaledBalances().long === '0')
return null
return (
<StyledPosition onClick={handleClick}>
<StyledPrice>
Expand All @@ -93,7 +95,7 @@ const Position: React.FC<TokenProps> = ({ option }) => {
<LineItem
label={`short options`}
data={
getScaledBalances().long !== '0'
getScaledBalances().redeem !== '0'
? numeral(getScaledBalances().redeem).format('0.0000a')
: '--'
}
Expand Down

0 comments on commit edf8527

Please sign in to comment.