Compare commits

...

23 Commits
main ... atlas3

Author SHA1 Message Date
nicholascc
0ad3a893e0 Removed previously committed placeholder text. 2022-07-27 16:07:30 -07:00
nicholascc
429eaece5f Merge branch 'atlas3' of github.com:manifoldmarkets/manifold into atlas3 2022-07-25 18:10:39 -07:00
nicholascc
a190082fe4 Decreased join bonus to 250 clips. 2022-07-25 18:10:12 -07:00
Austin Chen
9e7e2bbde6 Use null instead of undefined 2022-07-25 17:18:26 -07:00
nicholascc
c74f178bcb Added a description for limit orders. 2022-07-25 16:49:50 -07:00
nicholascc
d929ba5ff5 Decreased ante to 25 clips. 2022-07-25 16:04:10 -07:00
nicholascc
ec479a6eda Merge branch 'atlas3' of github.com:manifoldmarkets/manifold into atlas3 2022-07-22 17:18:33 -07:00
nicholascc
9ebf350d10 Fixed 'yarn build' in functions/ for my Windows machine. 2022-07-22 17:17:22 -07:00
RickiHeicklen
7ca8fe15b9 reversing testing 2022-07-22 14:01:54 -07:00
RickiHeicklen
37048dcbe3 Ricki testing commiting 2022-07-22 13:04:20 -07:00
Austin Chen
963f1c156a Fix undefined mostRecentDonor 2022-07-19 13:59:24 -07:00
Austin Chen
a992773a65 Merge branch 'main' into atlas3 2022-07-19 13:17:20 -07:00
Austin Chen
b91e848deb Disable FR and numeric markets 2022-07-19 02:56:21 -07:00
Austin Chen
e59e8b1025 Merge branch 'main' into atlas3 2022-07-19 02:54:13 -07:00
Austin Chen
c2dc4a3e4f Merge branch 'main' into atlas3 2022-07-19 02:50:25 -07:00
Austin Chen
2130320586 Set cloudRunid 2022-07-19 01:55:48 -07:00
Austin Chen
c2a6e80d6e Disable referral bonus for Atlas 3 instance 2022-07-18 23:30:48 -07:00
Austin Chen
6a2dec8d99 Merge branch 'main' into atlas3 2022-07-18 23:29:41 -07:00
Austin Chen
4edb16a1b4 Show Atlas logo 2022-07-18 23:24:40 -07:00
Austin Chen
86a85ba065 Fix domain config 2022-07-18 23:23:33 -07:00
Austin Chen
2cc3350f4d Start users with 500; ante is 250 2022-07-18 23:18:53 -07:00
Austin Chen
88cea63f12 Update firestore.indexes.json 2022-07-18 23:17:37 -07:00
Austin Chen
5318e2d923 Set up Atlas3 instance 2022-07-18 18:28:08 -07:00
13 changed files with 91 additions and 18 deletions

View File

@ -2,6 +2,7 @@
This [monorepo][] has basically everything involved in running and operating Manifold. This [monorepo][] has basically everything involved in running and operating Manifold.
## Getting started ## Getting started
0. Make sure you have [Yarn 1.x][yarn] 0. Make sure you have [Yarn 1.x][yarn]

37
common/envs/atlas3.ts Normal file
View File

@ -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: 25,
startingBalance: 250,
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?',
],
}

View File

@ -1,4 +1,5 @@
import { escapeRegExp } from 'lodash' import { escapeRegExp } from 'lodash'
import { ATLAS3_CONFIG } from './atlas3'
import { DEV_CONFIG } from './dev' import { DEV_CONFIG } from './dev'
import { EnvConfig, PROD_CONFIG } from './prod' import { EnvConfig, PROD_CONFIG } from './prod'
import { THEOREMONE_CONFIG } from './theoremone' import { THEOREMONE_CONFIG } from './theoremone'
@ -9,6 +10,7 @@ const CONFIGS: { [env: string]: EnvConfig } = {
PROD: PROD_CONFIG, PROD: PROD_CONFIG,
DEV: DEV_CONFIG, DEV: DEV_CONFIG,
THEOREMONE: THEOREMONE_CONFIG, THEOREMONE: THEOREMONE_CONFIG,
ATLAS3: ATLAS3_CONFIG,
} }
export const ENV_CONFIG = CONFIGS[ENV] export const ENV_CONFIG = CONFIGS[ENV]

View File

@ -22,6 +22,20 @@
} }
] ]
}, },
{
"collectionGroup": "bets",
"queryScope": "COLLECTION_GROUP",
"fields": [
{
"fieldPath": "isFilled",
"order": "ASCENDING"
},
{
"fieldPath": "userId",
"order": "ASCENDING"
}
]
},
{ {
"collectionGroup": "bets", "collectionGroup": "bets",
"queryScope": "COLLECTION_GROUP", "queryScope": "COLLECTION_GROUP",

View File

@ -8,9 +8,9 @@ service cloud.firestore {
function isAdmin() { function isAdmin() {
return request.auth.token.email in [ return request.auth.token.email in [
'akrolsmir@gmail.com', 'akrolsmir@gmail.com',
'jahooma@gmail.com', 'ricki.heicklen@gmail.com',
'taowell@gmail.com', 'ross@ftx.org',
'manticmarkets@gmail.com' 'gpimpale29@gmail.com'
] ]
} }

View File

@ -1,3 +1,3 @@
# This sets which EnvConfig is deployed to Firebase Cloud Functions # This sets which EnvConfig is deployed to Firebase Cloud Functions
NEXT_PUBLIC_FIREBASE_ENV=PROD NEXT_PUBLIC_FIREBASE_ENV=ATLAS3

View File

@ -5,7 +5,7 @@
"firestore": "dev-mantic-markets.appspot.com" "firestore": "dev-mantic-markets.appspot.com"
}, },
"scripts": { "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", "compile": "tsc -b",
"watch": "tsc -w", "watch": "tsc -w",
"shell": "yarn build && firebase functions:shell", "shell": "yarn build && firebase functions:shell",

View File

@ -262,9 +262,17 @@ function BuyPanel(props: {
return ( return (
<> <>
{isLimitOrder && (
<>
<p> Place a limit order to add to the order book rather than trade directly. Your orders will be filled over time if others trade with them at the prices you set. </p>
<br/>
</>
)}
<div className="my-3 text-left text-sm text-gray-500"> <div className="my-3 text-left text-sm text-gray-500">
{isPseudoNumeric ? 'Direction' : 'Outcome'} {isPseudoNumeric ? 'Direction' : 'Outcome'}
</div> </div>
<YesNoSelector <YesNoSelector
className="mb-4" className="mb-4"
btnClassName="flex-1" btnClassName="flex-1"

View File

@ -17,16 +17,23 @@ export function ManifoldLogo(props: {
return ( return (
<Link href={user ? '/home' : '/'}> <Link href={user ? '/home' : '/'}>
<a className={clsx('group flex flex-shrink-0 flex-row gap-4', className)}> <a className={clsx('group flex flex-shrink-0 flex-row gap-4', className)}>
<img {!ENV_CONFIG.navbarLogoPath && (
className="transition-all group-hover:rotate-12" <img
src={darkBackground ? '/logo-white.svg' : '/logo.svg'} className="transition-all group-hover:rotate-12"
width={45} src={darkBackground ? '/logo-white.svg' : '/logo.svg'}
height={45} width={45}
/> height={45}
/>
)}
{!hideText && {!hideText &&
(ENV_CONFIG.navbarLogoPath ? ( (ENV_CONFIG.navbarLogoPath ? (
<img src={ENV_CONFIG.navbarLogoPath} width={245} height={45} /> <img
className="rounded-md bg-gradient-to-r from-cyan-500 to-sky-600 p-2"
src={ENV_CONFIG.navbarLogoPath}
width={350}
height={80}
/>
) : twoLine ? ( ) : twoLine ? (
<div <div
className={clsx( className={clsx(

View File

@ -6,6 +6,7 @@
"dev": "concurrently -n NEXT,TS -c magenta,cyan \"next dev -p 3000\" \"yarn ts --watch\"", "dev": "concurrently -n NEXT,TS -c magenta,cyan \"next dev -p 3000\" \"yarn ts --watch\"",
"devdev": "cross-env NEXT_PUBLIC_FIREBASE_ENV=DEV concurrently -n NEXT,TS -c magenta,cyan \"cross-env FIREBASE_ENV=DEV next dev -p 3000\" \"cross-env FIREBASE_ENV=DEV yarn ts --watch\"", "devdev": "cross-env NEXT_PUBLIC_FIREBASE_ENV=DEV concurrently -n NEXT,TS -c magenta,cyan \"cross-env FIREBASE_ENV=DEV next dev -p 3000\" \"cross-env FIREBASE_ENV=DEV yarn ts --watch\"",
"dev:dev": "yarn devdev", "dev:dev": "yarn devdev",
"dev:atlas3": "cross-env NEXT_PUBLIC_FIREBASE_ENV=ATLAS3 concurrently -n NEXT,TS -c magenta,cyan \"cross-env FIREBASE_ENV=ATLAS3 next dev -p 3000\" \"cross-env FIREBASE_ENV=ATLAS3 yarn ts --watch\"",
"dev:the": "cross-env NEXT_PUBLIC_FIREBASE_ENV=THEOREMONE concurrently -n NEXT,TS -c magenta,cyan \"cross-env FIREBASE_ENV=THEOREMONE next dev -p 3000\" \"cross-env FIREBASE_ENV=THEOREMONE yarn ts --watch\"", "dev:the": "cross-env NEXT_PUBLIC_FIREBASE_ENV=THEOREMONE concurrently -n NEXT,TS -c magenta,cyan \"cross-env FIREBASE_ENV=THEOREMONE next dev -p 3000\" \"cross-env FIREBASE_ENV=THEOREMONE yarn ts --watch\"",
"dev:emulate": "cross-env NEXT_PUBLIC_FIREBASE_EMULATE=TRUE yarn devdev", "dev:emulate": "cross-env NEXT_PUBLIC_FIREBASE_EMULATE=TRUE yarn devdev",
"ts": "tsc --noEmit --incremental --preserveWatchOutput --pretty", "ts": "tsc --noEmit --incremental --preserveWatchOutput --pretty",

View File

@ -6,6 +6,7 @@ import {
sortBy, sortBy,
debounce, debounce,
uniqBy, uniqBy,
last,
} from 'lodash' } from 'lodash'
import { useState, useMemo } from 'react' import { useState, useMemo } from 'react'
import { charities, Charity as CharityType } from 'common/charity' import { charities, Charity as CharityType } from 'common/charity'
@ -36,7 +37,8 @@ export async function getStaticProps() {
]) ])
const matches = quadraticMatches(txns, totalRaised) const matches = quadraticMatches(txns, totalRaised)
const numDonors = uniqBy(txns, (txn) => txn.fromId).length const numDonors = uniqBy(txns, (txn) => txn.fromId).length
const mostRecentDonor = await getUser(txns[txns.length - 1].fromId) const donorId = last(txns)?.fromId
const mostRecentDonor = donorId ? await getUser(donorId) : null
return { return {
props: { props: {
@ -89,7 +91,7 @@ export default function Charity(props: {
matches: { [charityId: string]: number } matches: { [charityId: string]: number }
txns: Txn[] txns: Txn[]
numDonors: number numDonors: number
mostRecentDonor: User mostRecentDonor?: User | null
}) { }) {
const { totalRaised, charities, matches, numDonors, mostRecentDonor } = props const { totalRaised, charities, matches, numDonors, mostRecentDonor } = props
@ -140,8 +142,8 @@ export default function Charity(props: {
}, },
{ {
name: 'Most recent donor', name: 'Most recent donor',
stat: mostRecentDonor.name ?? 'Nobody', stat: mostRecentDonor?.name ?? 'Nobody',
url: `/${mostRecentDonor.username}`, url: `/${mostRecentDonor?.username}`,
}, },
]} ]}
/> />

View File

@ -246,8 +246,8 @@ export function NewContract(props: {
}} }}
choicesMap={{ choicesMap={{
'Yes / No': 'BINARY', 'Yes / No': 'BINARY',
'Free response': 'FREE_RESPONSE', // 'Free response': 'FREE_RESPONSE',
Numeric: 'PSEUDO_NUMERIC', // Numeric: 'PSEUDO_NUMERIC',
}} }}
isSubmitting={isSubmitting} isSubmitting={isSubmitting}
className={'col-span-4'} className={'col-span-4'}

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 443.37"><defs><style>.d{fill:#fff;}</style></defs><g id="a"/><g id="b"><g id="c"><g><g><path class="d" d="M500.26,351.29v-78.83h50.58v5.93h-43.31v30.08h40.92v5.93h-40.92v36.9h-7.28Z"/><path class="d" d="M570.89,351.29v-78.83h51.78v5.93h-44.62v29.96h42.11v5.93h-42.11v31.08h44.62v5.93h-51.78Z"/><path class="d" d="M645.57,351.29v-78.83h7.28v72.68h43.9v6.15h-51.18Z"/><path class="d" d="M715.36,351.29v-78.83h7.28v72.68h43.9v6.15h-51.18Z"/><path class="d" d="M815.09,352.19c-7.72,0-14.38-1.64-19.98-4.92-5.61-3.28-9.94-7.94-13-13.98-3.06-6.04-4.59-13.19-4.59-21.47s1.51-15.43,4.53-21.47c3.02-6.04,7.36-10.68,13-13.92,5.65-3.24,12.33-4.86,20.04-4.86s14.49,1.62,20.1,4.86c5.61,3.24,9.94,7.87,13,13.86,3.06,6,4.59,13.14,4.59,21.41s-1.53,15.54-4.59,21.58c-3.06,6.04-7.42,10.7-13.06,13.98-5.65,3.28-12.33,4.92-20.04,4.92Zm0-6.26c9.46,0,16.82-2.98,22.07-8.94,5.25-5.96,7.87-14.35,7.87-25.16s-2.61-19.18-7.81-25.1c-5.21-5.93-12.59-8.89-22.13-8.89s-16.8,2.98-22.01,8.94c-5.21,5.96-7.81,14.31-7.81,25.05s2.6,19.1,7.81,25.1c5.21,6,12.54,9,22.01,9Z"/><path class="d" d="M897.76,351.29l-29.23-78.83h7.64l25.17,68.65,25.41-68.65h6.2l25.41,69.1,25.41-69.1h7.4l-29.23,78.83h-6.92l-25.17-68.43-25.41,68.43h-6.68Z"/><path class="d" d="M1037.11,352.19c-6.52,0-12.39-.8-17.6-2.4-5.21-1.6-9.72-3.97-13.54-7.1l2.86-5.7c4.13,3.06,8.37,5.31,12.71,6.76,4.33,1.45,9.52,2.18,15.57,2.18,7.55,0,13.22-1.38,17-4.14,3.78-2.76,5.67-6.37,5.67-10.85,0-3.73-1.37-6.63-4.12-8.72-2.74-2.09-7.26-3.73-13.54-4.92l-12.05-2.35c-7.48-1.41-13.06-3.8-16.76-7.16s-5.55-7.83-5.55-13.42c0-4.55,1.25-8.53,3.76-11.96,2.51-3.43,5.98-6.09,10.44-7.99,4.45-1.9,9.58-2.85,15.39-2.85,11.61,0,20.88,3.28,27.8,9.84l-2.86,5.59c-3.66-3.2-7.48-5.53-11.45-6.99-3.98-1.45-8.47-2.18-13.48-2.18-6.68,0-12.03,1.49-16.05,4.47-4.02,2.98-6.02,6.97-6.02,11.96,0,3.95,1.27,7.06,3.82,9.34,2.54,2.27,6.64,3.93,12.29,4.98l12.17,2.35c8.03,1.57,14,3.9,17.9,6.99,3.9,3.09,5.85,7.32,5.85,12.69,0,4.25-1.21,7.99-3.64,11.24-2.43,3.24-5.91,5.78-10.44,7.6-4.53,1.83-9.9,2.74-16.1,2.74Z"/><path class="d" d="M1089.24,351.29v-78.83h7.28v35.78h53.68v-35.78h7.28v78.83h-7.28v-36.9h-53.68v36.9h-7.28Z"/><path class="d" d="M1185.4,351.29v-78.83h7.28v78.83h-7.28Z"/><path class="d" d="M1220.59,351.29v-78.83h31.73c8.99,0,15.85,2.01,20.58,6.04,4.73,4.03,7.1,9.77,7.1,17.22s-2.37,13.1-7.1,17.16c-4.73,4.06-11.59,6.09-20.58,6.09h-24.46v32.31h-7.28Zm7.28-38.35h23.86c13.92,0,20.88-5.74,20.88-17.22s-6.96-17.33-20.88-17.33h-23.86v34.55Z"/></g><path class="d" d="M231.33,216.67L126.1,6.2c-1.9-3.8-5.79-6.2-10.03-6.2s-8.13,2.4-10.03,6.2L2.21,213.83c-.7,1.14-2.14,3.81-2.21,7.5-.07,3.48,1.11,6.08,1.74,7.26l104.29,208.57c1.9,3.8,5.79,6.2,10.03,6.2h.01c4.25,0,8.14-2.41,10.03-6.22l103.4-207.83c.73-1.26,1.81-3.47,2.19-6.43,.34-2.66-.02-4.86-.36-6.22ZM58.72,150.99h114.69l29.63,59.27H29.08l29.63-59.27ZM116.06,36.3l46.13,92.26H69.93L116.06,36.3Zm-.03,370.72l-46.08-92.15h64.99c6.49,0,11.75-5.02,11.75-11.22s-5.26-11.22-11.75-11.22H58.74l-29.87-59.74H202.77l-86.73,174.33Z"/><g><path class="d" d="M271.65,232.48l72.08-159.3h23.72l72.08,159.3h-29.37l-15.82-36.83h-77.73l-15.59,36.83h-29.37Zm83.6-127.89l-28.7,68.01h57.84l-28.7-68.01h-.45Z"/><path class="d" d="M500.32,232.48V97.36h-54.68v-24.18h138.28v24.18h-54.68V232.48h-28.92Z"/><path class="d" d="M624.81,232.48V73.18h28.92V207.85h76.37v24.63h-105.29Z"/><path class="d" d="M753.83,232.48l72.08-159.3h23.72l72.08,159.3h-29.37l-15.82-36.83h-77.73l-15.59,36.83h-29.37Zm83.6-127.89l-28.7,68.01h57.84l-28.7-68.01h-.45Z"/><path class="d" d="M1014.8,234.74c-12.5,0-24.1-1.62-34.8-4.86-10.7-3.24-19.74-7.64-27.11-13.22l8.81-22.82c7.38,5.27,15.48,9.34,24.29,12.2,8.81,2.86,18.41,4.29,28.81,4.29,11.9,0,20.56-1.99,25.98-5.99,5.42-3.99,8.13-9.15,8.13-15.48,0-5.27-1.92-9.41-5.76-12.43-3.84-3.01-10.43-5.5-19.77-7.46l-24.85-5.2c-28.32-6.02-42.48-20.56-42.48-43.61,0-9.94,2.63-18.6,7.91-25.98,5.27-7.38,12.58-13.1,21.92-17.17,9.34-4.07,20.11-6.1,32.31-6.1,10.85,0,21.01,1.62,30.5,4.86,9.49,3.24,17.4,7.8,23.72,13.67l-8.81,21.69c-12.51-10.54-27.72-15.82-45.64-15.82-10.39,0-18.53,2.19-24.4,6.55-5.87,4.37-8.81,10.09-8.81,17.17,0,5.42,1.81,9.76,5.42,12.99,3.62,3.24,9.79,5.76,18.53,7.57l24.63,5.2c14.91,3.16,26.02,8.13,33.33,14.91,7.3,6.78,10.96,15.82,10.96,27.11,0,9.49-2.56,17.85-7.68,25.08-5.12,7.23-12.39,12.84-21.8,16.83-9.42,3.99-20.53,5.99-33.33,5.99Z"/></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 4.3 KiB