From 8c2f3c56d36ee60a803de2268927bf05b3ef4f77 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 16 Aug 2022 15:51:04 -0500 Subject: [PATCH] Limit orders: Subtract fees from "profit if both filled" --- web/components/bet-panel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index d5f88d43..54aa961d 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -448,8 +448,6 @@ function LimitOrderPanel(props: { const yesAmount = shares * (yesLimitProb ?? 1) const noAmount = shares * (1 - (noLimitProb ?? 0)) - const profitIfBothFilled = shares - (yesAmount + noAmount) - function onBetChange(newAmount: number | undefined) { setWasSubmitted(false) setBetAmount(newAmount) @@ -559,6 +557,8 @@ function LimitOrderPanel(props: { ) const noReturnPercent = formatPercent(noReturn) + const profitIfBothFilled = shares - (yesAmount + noAmount) - yesFees - noFees + return (