diff --git a/common/envs/constants.ts b/common/envs/constants.ts index 7092d711..463f3293 100644 --- a/common/envs/constants.ts +++ b/common/envs/constants.ts @@ -2,6 +2,7 @@ import { escapeRegExp } from 'lodash' import { DEV_CONFIG } from './dev' import { EnvConfig, PROD_CONFIG } from './prod' import { THEOREMONE_CONFIG } from './theoremone' +import { SALEM_CENTER_CONFIG } from './salemcenter' export const ENV = process.env.NEXT_PUBLIC_FIREBASE_ENV ?? 'PROD' @@ -9,6 +10,7 @@ const CONFIGS: { [env: string]: EnvConfig } = { PROD: PROD_CONFIG, DEV: DEV_CONFIG, THEOREMONE: THEOREMONE_CONFIG, + SALEM_CENTER: SALEM_CENTER_CONFIG, } export const ENV_CONFIG = CONFIGS[ENV] diff --git a/common/envs/prod.ts b/common/envs/prod.ts index 5bd12095..2cad4203 100644 --- a/common/envs/prod.ts +++ b/common/envs/prod.ts @@ -18,6 +18,7 @@ export type EnvConfig = { faviconPath?: string // Should be a file in /public navbarLogoPath?: string newQuestionPlaceholders: string[] + whitelistCreators?: string[] // Currency controls fixedAnte?: number diff --git a/common/envs/salemcenter.ts b/common/envs/salemcenter.ts new file mode 100644 index 00000000..b520f6c0 --- /dev/null +++ b/common/envs/salemcenter.ts @@ -0,0 +1,24 @@ +import { EnvConfig, PROD_CONFIG } from './prod' + +export const SALEM_CENTER_CONFIG: EnvConfig = { + domain: 'salemcenter.manifold.markets', + firebaseConfig: { + apiKey: 'AIzaSyBxisXMHPJDtM7ZseaOOlLAM_T7QHP_QvA', + authDomain: 'salem-center-manifold.firebaseapp.com', + projectId: 'salem-center-manifold', + region: 'us-central1', + storageBucket: 'salem-center-manifold.appspot.com', + messagingSenderId: '522400938664', + appId: '1:522400938664:web:300eaedb8446818d61a09d', + measurementId: 'G-Y3EZ1WNT6E', + }, + cloudRunId: 'fm35sk365q', // TODO: fill in real ID for T1 + cloudRunRegion: 'uc', + adminEmails: [...PROD_CONFIG.adminEmails, 'richardh0828@gmail.com'], + moneyMoniker: 'S$', + visibility: 'PRIVATE', + faviconPath: '/salem-center/logo.ico', + navbarLogoPath: '/salem-center/salem-center-logo.svg', + newQuestionPlaceholders: [], + whitelistCreators: ['RichardHanania', 'SalemCenter'], +} diff --git a/firestore.indexes.json b/firestore.indexes.json index 12e88033..1d09265c 100644 --- a/firestore.indexes.json +++ b/firestore.indexes.json @@ -22,6 +22,20 @@ } ] }, + { + "collectionGroup": "bets", + "queryScope": "COLLECTION_GROUP", + "fields": [ + { + "fieldPath": "isFilled", + "order": "ASCENDING" + }, + { + "fieldPath": "userId", + "order": "ASCENDING" + } + ] + }, { "collectionGroup": "bets", "queryScope": "COLLECTION_GROUP", diff --git a/functions/.env b/functions/.env index 0c4303df..ef65897f 100644 --- a/functions/.env +++ b/functions/.env @@ -1,3 +1,3 @@ # This sets which EnvConfig is deployed to Firebase Cloud Functions -NEXT_PUBLIC_FIREBASE_ENV=PROD +NEXT_PUBLIC_FIREBASE_ENV=SALEM_CENTER diff --git a/web/components/amount-input.tsx b/web/components/amount-input.tsx index 426a9371..7a1b81d5 100644 --- a/web/components/amount-input.tsx +++ b/web/components/amount-input.tsx @@ -4,7 +4,6 @@ import { useUser } from 'web/hooks/use-user' import { formatMoney } from 'common/util/format' import { Col } from './layout/col' import { Spacer } from './layout/spacer' -import { SiteLink } from './site-link' import { ENV_CONFIG } from 'common/envs/constants' export function AmountInput(props: { @@ -61,16 +60,7 @@ export function AmountInput(props: { {error && (