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