From b082c09ab1a9b75f5103e32a19aea662adf99b18 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Mon, 10 Oct 2022 17:06:44 -0500 Subject: [PATCH] info table --- .../contract/contract-info-dialog.tsx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/web/components/contract/contract-info-dialog.tsx b/web/components/contract/contract-info-dialog.tsx index 385b4570..e1c36901 100644 --- a/web/components/contract/contract-info-dialog.tsx +++ b/web/components/contract/contract-info-dialog.tsx @@ -54,6 +54,7 @@ export function ContractInfoDialog(props: { outcomeType, id, elasticity, + pool, } = contract const typeDisplay = @@ -171,10 +172,25 @@ export function ContractInfoDialog(props: { + Liquidity subsidies - {mechanism === 'cpmm-1' ? 'Liquidity pool' : 'Betting pool'} + {mechanism === 'cpmm-1' + ? formatMoney(contract.totalLiquidity) + : formatMoney(100)} + + + + + Pool + + {mechanism === 'cpmm-1' && outcomeType === 'BINARY' + ? `${Math.round(pool.YES)} YES, ${Math.round(pool.NO)} NO` + : mechanism === 'cpmm-1' && outcomeType === 'PSEUDO_NUMERIC' + ? `${Math.round(pool.YES)} HIGHER, ${Math.round( + pool.NO + )} LOWER` + : contractPool(contract)} - {contractPool(contract)} {/* Show a path to Firebase if user is an admin, or we're on localhost */}