Show negative payouts

This commit is contained in:
Ian Philips 2022-09-15 15:50:26 -06:00
parent 7628713c4b
commit 61c672ce4c

View File

@ -989,7 +989,7 @@ function ContractResolvedNotification(props: {
} }
const description = const description =
userInvestment && userPayout ? ( userInvestment && userPayout !== undefined ? (
<Row className={'gap-1 '}> <Row className={'gap-1 '}>
{resolutionDescription()} {resolutionDescription()}
Invested: Invested:
@ -1002,7 +1002,7 @@ function ContractResolvedNotification(props: {
)} )}
> >
{formatMoney(userPayout)} {formatMoney(userPayout)}
{` (${userPayout > 0 ? '+' : '-'}${Math.round( {` (${userPayout > 0 ? '+' : ''}${Math.round(
((userPayout - userInvestment) / userInvestment) * 100 ((userPayout - userInvestment) / userInvestment) * 100
)}%)`} )}%)`}
</span> </span>