Commit Graph

101 Commits

Author SHA1 Message Date
James Grugett
db541cb63b Show investment in market resolve email 2022-02-24 01:04:24 -06:00
James Grugett
64223e5ff1 Show answer in email for comment on free response markets 2022-02-24 00:36:27 -06:00
James Grugett
dcd3bc759a Add bet amount and outcome to new comment email 2022-02-23 18:52:22 -06:00
James Grugett
cb7c8ba7c2 Send email to market creator on new answer 2022-02-23 00:05:04 -06:00
James Grugett
cc375256a1 Linkify question in emails for market resolution and market close 2022-02-22 22:07:23 -06:00
James Grugett
d3ffc7d786 Fix non-circular avatar in comment email 2022-02-22 22:05:54 -06:00
James Grugett
571a319c10 Commit html email templates 2022-02-22 20:35:07 -06:00
James Grugett
7522b6af3c Send emails for new comments on markets you commented on or created. 2022-02-22 20:35:07 -06:00
mantikoros
39cc2026f1 welcome email formatting 2022-02-22 16:35:53 -06:00
James Grugett
f5ab60b2df You can sell your ante on a new answer. Minimum is M$ 1 instead of M$ 10 2022-02-20 17:02:00 -06:00
James Grugett
fd846254a0 Implement resolving to multiple answers, weighted by probability 2022-02-20 01:26:33 -06:00
James Grugett
693652935d Switch to pool size instead of volume for creator leaderboard. 2022-02-19 12:14:45 -06:00
James Grugett
26bbb75ccd Change to sequential user metrics update instead of doing them all in parallel 2022-02-18 19:10:02 -06:00
James Grugett
b2501d8145
Free response (#47)
* Answer datatype and MULTI outcome type for Contract

* Create free answer contract

* Automatically sort Tailwind classes with Prettier (#45)

* Add Prettier Tailwind plugin

* Autoformat Tailwind classes with Prettier

* Allow for non-binary contracts in contract page and related components

* logo with white inside, transparent bg

* Create answer

* Some UI for showing answers

* Answer bet panel

* Convert rest of calcuate file to generic multi contracts

* Working betting with ante'd NONE answer

* Numbered answers. Layout & calculation tweaks

* Can bet. More layout tweaks!

* Resolve answer UI

* Resolve multi market

* Resolved market UI

* Fix feed and cards for multi contracts

* Sell bets. Various fixes

* Tweaks for trades page

* Always dev mode

* Create answer bet has isAnte: true

* Fix  card showing 0% for multi contracts

* Fix grouped bets feed for multi outcomes

* None option converted to none of the above label at bottom of list. Button to resolve none.

* Tweaks to no answers yet, resolve button layout

* Show ante bets on new answers in the feed

* Update placeholder text for description

* Consolidate firestore rules for subcollections

* Remove Contract and Bet type params. Use string type for outcomes.

* Increase char limit to 10k for answers. Preserve line breaks.

* Don't show resolve options after answer chosen

* Fix type error in script

* Remove NONE resolution option

* Change outcomeType to include 'MULTI' and 'FREE_RESPONSE'

* Show bet probability change and payout when creating answer

* User info change: also change answers

* Append answers to contract field 'answers'

* sort trades by resolved

* Don't include trailing !:,.; in links

* Stop flooring inputs into formatMoney

* Revert "Stop flooring inputs into formatMoney"

This reverts commit 2f7ab18429.

* Consistently floor user.balance

* Expand create panel on focus

From Richard Hanania's feedback

* welcome email: include link to manifold

* Fix home page in dev on branches that are not free-response

* Close emails (#50)

* script init for stephen dev

* market close emails

* order of operations

* template email

* sendMarketCloseEmail: handle unsubscribe

* remove debugging

* marketCloseEmails: every hour

* sendMarketCloseEmails: check undefined

* marketCloseEmails: "every hour" => "every 1 hours"

* Set up a read API using Vercel serverless functions (#49)

* Set up read API using Vercel serverless functions

Featuring:
/api/v0/markets
/api/v0/market/[contractId]
/api/v0/slug/[contractSlug]

* Include tags in API

* Tweaks. Remove filter for only binary contract

* Fix bet probability change for NO bets

* Put back isProd calculation

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
Co-authored-by: mantikoros <sgrugett@gmail.com>
Co-authored-by: mantikoros <95266179+mantikoros@users.noreply.github.com>
2022-02-17 17:00:19 -06:00
mantikoros
6701bfca0d marketCloseEmails: "every hour" => "every 1 hours" 2022-02-17 12:50:47 -06:00
mantikoros
1036c2df0d sendMarketCloseEmails: check undefined 2022-02-17 12:34:57 -06:00
mantikoros
dcbdc66df5
Close emails (#50)
* script init for stephen dev

* market close emails

* order of operations

* template email

* sendMarketCloseEmail: handle unsubscribe

* remove debugging

* marketCloseEmails: every hour
2022-02-17 12:18:02 -06:00
mantikoros
482a72f4e1 welcome email: include link to manifold 2022-02-16 22:42:52 -06:00
mantikoros
2d66be5208 resolve market: fix probability bounds 2022-02-12 00:19:45 -06:00
James Grugett
d02611a37a Add id field to markets api endpoint 2022-02-10 16:35:20 -06:00
Austin Chen
66624ff92c Send a welcome email to new users 2022-02-08 03:26:33 -08:00
mantikoros
4f0b94150c sellBet: handle case where bettor equals market creator 2022-02-06 17:18:30 -06:00
mantikoros
03f36cf954
User profile (#44)
* add id, userId to comment

* change user info cloud function and script; move cleanUsername to common

* change user info script

* fix rules

* add fund button: useLocation hook

* profile page

* merge

* profile stuff

* avatar uploading to storage bucket

* changeUserInfo: use transaction

* Styles for profile page

* Edit mode for profile, and more styles

Co-authored-by: James Grugett <jahooma@gmail.com>
2022-02-03 21:04:56 -06:00
James Grugett
75fd870d69 Put back old leaderboard calculation. Use totalDeposits field 2022-02-02 00:21:39 -06:00
James Grugett
473534bc35 Catch user update 2022-02-01 21:35:41 -06:00
James Grugett
ca29a43da9 Calculate global leaderboard from contract bets 2022-02-01 21:30:43 -06:00
James Grugett
0eac8d9c5c
Yarn workspaces (#42)
* Try yarn workspaces

* Add versions to sub package.json files
2022-02-01 15:25:51 -06:00
James Grugett
7c50b55331 Match lowercase tags for folds 2022-02-01 12:29:14 -06:00
mantikoros
f06ca8305c
Resolve prob (#41)
* rename MKT to PROB; show resolved probability; move format utilities to common

* ProbabilitySelector

* resolve to PROB

* prob and mkt labels
2022-01-30 15:51:30 -06:00
James Grugett
83f4fd3555 Scripts: Init admin 2022-01-30 15:11:01 -06:00
jahooma
6696ac2a15 Make about optional for folds 2022-01-27 12:57:36 -06:00
jahooma
9764a03189 Add create market to top of fold activity. Auto-adds the primary tag of the fold. 2022-01-27 12:45:35 -06:00
jahooma
2e7a8210bb No symbols in fold primary tag. Limit Name to 140 chars 2022-01-26 17:45:07 -06:00
jahooma
348c8d565a Fold delete 2022-01-26 14:56:15 -06:00
jahooma
ef8157025f Compute fold follower count from cloud function. 2022-01-26 14:27:16 -06:00
jahooma
c3f49c44a0 Cardify folds in fold list 2022-01-26 12:44:16 -06:00
Austin Chen
29b946671b Expand backup documentation 2022-01-25 15:27:44 -06:00
Austin Chen
a52b2992af Back up comments and bets subcollections too 2022-01-25 15:13:11 -06:00
James Grugett
8b9d0e5dba
New fold page UI with tabs (#37)
* Tabbed fold page

* Implement market, leaderboard tab views for fold. And edit dialog

* Add about field to Fold
2022-01-25 14:47:25 -06:00
jahooma
705d5cada7 Add lowercaseTags field to contracts. ante / closeTime non-optional in new contract code 2022-01-24 16:33:10 -06:00
Austin Chen
7534847e8d Back up Firestore tables to cloud bucket 2022-01-24 13:26:19 -06:00
jahooma
aa1022546d Implement leaderboards for folds! 2022-01-22 17:59:50 -06:00
James Grugett
60f68b178d
Folds (#34)
* Fold type, fold page, query for fold contracts

* Tsconfig: target esnext, nounused locals: false

* Store tags in field on contract. Script to update contract tags

* Show tags on fold page

* Load all fold comments server-side to serve better feed

* Fix the annoying firebase already initialized error!

* Add links to /edit and /leaderboards for fold

* Page with list of folds

* UI for creating a fold

* Create a fold

* Edit fold page
2022-01-21 17:21:46 -06:00
jahooma
5ce23c0bdb Add userId to email template so users can unsubscribe 2022-01-19 12:43:12 -06:00
mantikoros
4528615863
Private user (#32)
* PrivateUser

* createUser: create private user; detect multiple signups

* include user properties in private user

* script: create private users

* unsubscribing from market resolution emails

* track total deposits
2022-01-18 21:36:46 -06:00
mantikoros
908c8c03e6
Create user cloud function (#31)
* createUser cloud function; change User object

* initial commit

* listenForLogin: avoid race condition

* createUser: allow capital letters in username

* remove debugging

* leaderboard: empty url for undefined avatar image
2022-01-18 01:18:38 -06:00
jahooma
56c7e2597d Schedule cloud function to update user metrics: totalPnL, creatorVolume 2022-01-17 15:39:34 -06:00
mantikoros
8331e7afc5 migration script now re-simulates individual markets specified in command line 2022-01-16 15:53:40 -06:00
Austin Chen
6e92e3fba1 DX: Cloud Functions tooling 2022-01-16 01:59:05 -05:00
jahooma
f6079e68d0 Choose random hot contracts from top 16 every 5 minutes. 2022-01-15 00:44:33 -06:00