diff --git a/README.md b/README.md index f6e85007..12eda2ec 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ This [monorepo][] has basically everything involved in running and operating Manifold. + ## Getting started 0. Make sure you have [Yarn 1.x][yarn] diff --git a/common/envs/atlas3.ts b/common/envs/atlas3.ts new file mode 100644 index 00000000..b5f0c2f7 --- /dev/null +++ b/common/envs/atlas3.ts @@ -0,0 +1,37 @@ +import { EnvConfig } from './prod' + +export const ATLAS3_CONFIG: EnvConfig = { + domain: 'atlas3.manifold.markets', + firebaseConfig: { + apiKey: 'AIzaSyAAsJPN_4HAvmWtsdW2EIY2iRRbyTxEZQI', + authDomain: 'atlas3-manifold.firebaseapp.com', + projectId: 'atlas3-manifold', + storageBucket: 'atlas3-manifold.appspot.com', + messagingSenderId: '453445191752', + appId: '1:453445191752:web:f7a899553e702d6d48b07d', + measurementId: 'G-0F3F5X37YN', + }, + + cloudRunId: 'o7zdjo5hka', + cloudRunRegion: 'uc', + + adminEmails: [ + 'akrolsmir@gmail.com', + 'ricki.heicklen@gmail.com', + 'ross@ftx.org', + 'gpimpale29@gmail.com', + ], + whitelistEmail: '', + moneyMoniker: '📎', + fixedAnte: 250, + startingBalance: 500, + referralBonus: 0, + visibility: 'PRIVATE', + navbarLogoPath: '/atlas/atlas-logo-white.svg', + newQuestionPlaceholders: [ + 'Will we have at least 5 new team members by the end of this quarter?', + 'Will we meet or exceed our goals this sprint?', + 'Will we sign on 3 or more new clients this month?', + 'Will Paul shave his beard by the end of the month?', + ], +} diff --git a/common/envs/constants.ts b/common/envs/constants.ts index 7092d711..d3db041a 100644 --- a/common/envs/constants.ts +++ b/common/envs/constants.ts @@ -1,4 +1,5 @@ import { escapeRegExp } from 'lodash' +import { ATLAS3_CONFIG } from './atlas3' import { DEV_CONFIG } from './dev' import { EnvConfig, PROD_CONFIG } from './prod' import { THEOREMONE_CONFIG } from './theoremone' @@ -9,6 +10,7 @@ const CONFIGS: { [env: string]: EnvConfig } = { PROD: PROD_CONFIG, DEV: DEV_CONFIG, THEOREMONE: THEOREMONE_CONFIG, + ATLAS3: ATLAS3_CONFIG, } export const ENV_CONFIG = CONFIGS[ENV] 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/firestore.rules b/firestore.rules index 0f28ca80..45286937 100644 --- a/firestore.rules +++ b/firestore.rules @@ -8,9 +8,9 @@ service cloud.firestore { function isAdmin() { return request.auth.token.email in [ 'akrolsmir@gmail.com', - 'jahooma@gmail.com', - 'taowell@gmail.com', - 'manticmarkets@gmail.com' + 'ricki.heicklen@gmail.com', + 'ross@ftx.org', + 'gpimpale29@gmail.com' ] } diff --git a/functions/.env b/functions/.env index 0c4303df..5e9a52d5 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=ATLAS3 diff --git a/functions/package.json b/functions/package.json index f8657516..786a0e97 100644 --- a/functions/package.json +++ b/functions/package.json @@ -5,7 +5,7 @@ "firestore": "dev-mantic-markets.appspot.com" }, "scripts": { - "build": "yarn compile && rm -rf dist && mkdir -p dist/functions && cp -R ../common/lib dist/common && cp -R lib/src dist/functions/src && cp ../yarn.lock dist && cp package.json dist && cp .env dist", + "build": "yarn compile && rm -rf dist && mkdir dist && mkdir dist\\functions && cp -R ../common/lib dist/common && cp -R lib/src dist/functions/src && cp ../yarn.lock dist && cp package.json dist && cp .env dist", "compile": "tsc -b", "watch": "tsc -w", "shell": "yarn build && firebase functions:shell", diff --git a/web/components/nav/manifold-logo.tsx b/web/components/nav/manifold-logo.tsx index ec15d54b..35a68f39 100644 --- a/web/components/nav/manifold-logo.tsx +++ b/web/components/nav/manifold-logo.tsx @@ -17,16 +17,23 @@ export function ManifoldLogo(props: { return ( - + {!ENV_CONFIG.navbarLogoPath && ( + + )} {!hideText && (ENV_CONFIG.navbarLogoPath ? ( - + ) : twoLine ? (
txn.fromId).length - const mostRecentDonor = await getUser(txns[txns.length - 1].fromId) + const donorId = last(txns)?.fromId + const mostRecentDonor = donorId ? await getUser(donorId) : undefined return { props: { @@ -90,7 +92,7 @@ export default function Charity(props: { matches: { [charityId: string]: number } txns: Txn[] numDonors: number - mostRecentDonor: User + mostRecentDonor?: User }) { const { totalRaised, charities, matches, numDonors, mostRecentDonor } = props @@ -149,8 +151,8 @@ export default function Charity(props: { }, { name: 'Most recent donor', - stat: mostRecentDonor.name ?? 'Nobody', - url: `/${mostRecentDonor.username}`, + stat: mostRecentDonor?.name ?? 'Nobody', + url: `/${mostRecentDonor?.username}`, }, ]} /> diff --git a/web/pages/create.tsx b/web/pages/create.tsx index ec86a277..bf15cfd9 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -255,8 +255,8 @@ export function NewContract(props: { }} choicesMap={{ 'Yes / No': 'BINARY', - 'Free response': 'FREE_RESPONSE', - Numeric: 'PSEUDO_NUMERIC', + // 'Free response': 'FREE_RESPONSE', + // Numeric: 'PSEUDO_NUMERIC', }} isSubmitting={isSubmitting} className={'col-span-4'} diff --git a/web/public/atlas/atlas-logo-white.svg b/web/public/atlas/atlas-logo-white.svg new file mode 100644 index 00000000..d90f3006 --- /dev/null +++ b/web/public/atlas/atlas-logo-white.svg @@ -0,0 +1 @@ + \ No newline at end of file