From dd6edc3b7a91514b9d202469e20a4b18ea1184d4 Mon Sep 17 00:00:00 2001 From: jahooma Date: Mon, 10 Jan 2022 11:38:44 -0600 Subject: [PATCH] Use sale amount for sold bets. Round one more item in the feed. --- web/components/contract-feed.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/components/contract-feed.tsx b/web/components/contract-feed.tsx index c44f58ef..b2418085 100644 --- a/web/components/contract-feed.tsx +++ b/web/components/contract-feed.tsx @@ -47,7 +47,7 @@ function FeedComment(props: { activityItem: any }) { {person.name} {' '} - placed M$ {amount} on {' '} + placed {formatMoney(amount)} on {' '}

@@ -286,7 +286,7 @@ function toFeedBet(bet: Bet) { contractId: bet.contractId, userId: bet.userId, type: 'bet', - amount: bet.amount, + amount: bet.sale ? -bet.sale.amount : bet.amount, outcome: bet.outcome, createdTime: bet.createdTime, date: dayjs(bet.createdTime).fromNow(), @@ -299,7 +299,7 @@ function toFeedComment(bet: Bet, comment: Comment) { contractId: bet.contractId, userId: bet.userId, type: 'comment', - amount: bet.amount, + amount: bet.sale ? -bet.sale.amount : bet.amount, outcome: bet.outcome, createdTime: bet.createdTime, date: dayjs(bet.createdTime).fromNow(),