Allow customizing starting balance & antes
This commit is contained in:
parent
8fdc44f7f3
commit
9839b7b5a4
|
@ -10,12 +10,9 @@ import {
|
|||
import { User } from './user'
|
||||
import { LiquidityProvision } from './liquidity-provision'
|
||||
import { noFees } from './fees'
|
||||
import { ENV_CONFIG } from './envs/constants'
|
||||
|
||||
export const FIXED_ANTE = 100
|
||||
|
||||
// deprecated
|
||||
export const PHANTOM_ANTE = 0.001
|
||||
export const MINIMUM_ANTE = 50
|
||||
export const FIXED_ANTE = ENV_CONFIG.fixedAnte ?? 100
|
||||
|
||||
export const HOUSE_LIQUIDITY_PROVIDER_ID = 'IPTOzEqrpkWmEzh6hwvAyY9PqFb2' // @ManifoldMarkets' id
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ENV_CONFIG } from './envs/constants'
|
||||
|
||||
export type User = {
|
||||
id: string
|
||||
createdTime: number
|
||||
|
@ -38,8 +40,9 @@ export type User = {
|
|||
referredByContractId?: string
|
||||
}
|
||||
|
||||
export const STARTING_BALANCE = 1000
|
||||
export const SUS_STARTING_BALANCE = 10 // for sus users, i.e. multiple sign ups for same person
|
||||
export const STARTING_BALANCE = ENV_CONFIG.startingBalance ?? 1000
|
||||
// for sus users, i.e. multiple sign ups for same person
|
||||
export const SUS_STARTING_BALANCE = ENV_CONFIG.startingBalance ?? 10
|
||||
export const REFERRAL_AMOUNT = 500
|
||||
export type PrivateUser = {
|
||||
id: string // same as User.id
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Spacer } from 'web/components/layout/spacer'
|
|||
import { useUser } from 'web/hooks/use-user'
|
||||
import { Contract, contractPath } from 'web/lib/firebase/contracts'
|
||||
import { createMarket } from 'web/lib/firebase/api-call'
|
||||
import { FIXED_ANTE, MINIMUM_ANTE } from 'common/antes'
|
||||
import { FIXED_ANTE } from 'common/antes'
|
||||
import { InfoTooltip } from 'web/components/info-tooltip'
|
||||
import { Page } from 'web/components/page'
|
||||
import { Row } from 'web/components/layout/row'
|
||||
|
@ -156,7 +156,6 @@ export function NewContract(props: {
|
|||
question.length > 0 &&
|
||||
ante !== undefined &&
|
||||
ante !== null &&
|
||||
ante >= MINIMUM_ANTE &&
|
||||
ante <= balance &&
|
||||
// closeTime must be in the future
|
||||
closeTime &&
|
||||
|
|
Loading…
Reference in New Issue
Block a user