From a4216929f6d8dfb196a069445413e42e09d90c36 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Fri, 6 May 2022 16:10:42 -0400 Subject: [PATCH] Allow M$ limit for markets --- common/calculate.ts | 1 + common/contract.ts | 2 ++ common/new-contract.ts | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common/calculate.ts b/common/calculate.ts index 06820edc..c42eaaa7 100644 --- a/common/calculate.ts +++ b/common/calculate.ts @@ -161,6 +161,7 @@ export function getContractBetMetrics(contract: Contract, yourBets: Bet[]) { return { invested: Math.max(0, currentInvested), + currentInvested, payout, netPayout, profit, diff --git a/common/contract.ts b/common/contract.ts index 82a330b5..3434d6d6 100644 --- a/common/contract.ts +++ b/common/contract.ts @@ -31,6 +31,8 @@ export type FullContract< closeEmailsSent?: number + manaLimitPerUser?: number + volume: number volume24Hours: number volume7Days: number diff --git a/common/new-contract.ts b/common/new-contract.ts index b86ebb71..764d32d3 100644 --- a/common/new-contract.ts +++ b/common/new-contract.ts @@ -22,7 +22,8 @@ export function getNewContract( initialProb: number, ante: number, closeTime: number, - extraTags: string[] + extraTags: string[], + manaLimitPerUser: number ) { const tags = parseTags( `${question} ${description} ${extraTags.map((tag) => `#${tag}`).join(' ')}` @@ -64,6 +65,7 @@ export function getNewContract( liquidityFee: 0, platformFee: 0, }, + manaLimitPerUser, }) return contract as Contract