From fde90be5a2c275c8bedfbcd15c9ab62145d2a0d9 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Sat, 17 Sep 2022 15:01:45 -0500 Subject: [PATCH] fix resolve prob notification text --- web/pages/notifications.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx index 2f5c0bf9..15863919 100644 --- a/web/pages/notifications.tsx +++ b/web/pages/notifications.tsx @@ -971,13 +971,20 @@ function ContractResolvedNotification(props: { const { sourceText, data } = notification const { userInvestment, userPayout } = (data as ContractResolutionData) ?? {} const subtitle = 'resolved the market' + const resolutionDescription = () => { if (!sourceText) return
+ if (sourceText === 'YES' || sourceText == 'NO') { return } + if (sourceText.includes('%')) - return + return ( + + ) if (sourceText === 'CANCEL') return if (sourceText === 'MKT' || sourceText === 'PROB') return @@ -996,7 +1003,7 @@ function ContractResolvedNotification(props: { const description = userInvestment && userPayout !== undefined ? ( - {resolutionDescription()} + Resolved: {resolutionDescription()} Invested: {formatMoney(userInvestment)} Payout: @@ -1013,7 +1020,7 @@ function ContractResolvedNotification(props: { ) : ( - {resolutionDescription()} + Resolved {resolutionDescription()} ) if (justSummary) {