From 61c672ce4c959f26451158219086b98faccc2f39 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Thu, 15 Sep 2022 15:50:26 -0600 Subject: [PATCH] Show negative payouts --- web/pages/notifications.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx index 14f14ea4..a0c1ede5 100644 --- a/web/pages/notifications.tsx +++ b/web/pages/notifications.tsx @@ -989,7 +989,7 @@ function ContractResolvedNotification(props: { } const description = - userInvestment && userPayout ? ( + userInvestment && userPayout !== undefined ? ( {resolutionDescription()} Invested: @@ -1002,7 +1002,7 @@ function ContractResolvedNotification(props: { )} > {formatMoney(userPayout)} - {` (${userPayout > 0 ? '+' : '-'}${Math.round( + {` (${userPayout > 0 ? '+' : ''}${Math.round( ((userPayout - userInvestment) / userInvestment) * 100 )}%)`}