Skip to content

Commit

Permalink
Merge pull request #516 from primitivefinance/develop
Browse files Browse the repository at this point in the history
fix(Positions): added extra flags to prevent bug
  • Loading branch information
zachdt authored Mar 17, 2021
2 parents 147c910 + edf8527 commit acfbd52
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

1 comment on commit acfbd52

@vercel
Copy link

@vercel vercel bot commented on acfbd52 Mar 17, 2021

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.