Commit Graph

70 Commits

Author SHA1 Message Date
Austin Chen
0a98ffe05c Remove sold bets from Your Trades 2022-02-25 16:57:28 -08:00
mantikoros
c24007012c bets list: show message if no active bets 2022-02-22 16:55:06 -06:00
James Grugett
858ce10b49 Re-order sell button and sale price to be first in bets table 2022-02-21 14:22:36 -06:00
James Grugett
6d3fb8f4ae Remove balance from your trades page (looks better on mobile, cleaner) 2022-02-21 12:55:26 -06:00
James Grugett
c32442ab41 Fix trades sort by newest 2022-02-21 12:42:51 -06:00
James Grugett
793742b499 Trades page: Wait for all bets / contract data to load with loading indicator 2022-02-20 22:26:22 -06:00
mantikoros
8e33c2b639 for sales, show change in implied probability 2022-02-17 18:24:10 -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
d3fdd4cd1f bets list: comment out expectation 2022-02-17 16:49:00 -06:00
mantikoros
3609255342 sort trades by value 2022-02-17 16:44:33 -06:00
Austin Chen
515676f885 Consistently floor user.balance 2022-02-16 19:19:11 -08:00
mantikoros
95242d94ac sort trades by resolved 2022-02-16 00:08:16 -06:00
Austin Chen
95fbfb7db0 Tweak padding 2022-02-14 15:39:59 -08:00
Austin Chen
86b4b1a907 Use badges in Your Trades 2022-02-14 15:29:29 -08:00
mantikoros
443acdbcf8 beautify trades page 2022-02-14 16:00:46 -06:00
mantikoros
a8abd4ecbb trades page: show pnl 2022-02-14 13:00:20 -06:00
Austin Chen
0e640bf53b Show the current % instead of "MKT" in Your Trades 2022-02-13 18:20:46 -08:00
Austin Chen
7338bdd47a
Automatically sort Tailwind classes with Prettier (#45)
* Add Prettier Tailwind plugin

* Autoformat Tailwind classes with Prettier
2022-02-11 10:40:22 -08:00
James Grugett
b0a1da62d2 Add sort options for /trades. Can sort by
profit or newest!
2022-02-08 23:28:20 -06:00
James Grugett
e66564cd1f Add current prob to trades items 2022-02-08 22:52:09 -06:00
James Grugett
552e6e6c3a
Custom feed (#43)
* Show custom feed of contracts from folds your follow or have bet on.

* Add tw-elements UI library

* Add loading spinner while feed loads

* Switch from onSnapshot to our listenForValues, which doesn't set with partial cached values

* Change home tags to communities

* Remove tw-elements for now
2022-02-03 18:13:04 -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
jahooma
f2c4d3e9c1 Change to white backgrounds for content. Remove page's margin, set individually. 2022-01-27 16:37:43 -06:00
mantikoros
1b5e33ca54 no ante selling 2022-01-19 16:36:55 -06:00
mantikoros
a16d35974f fix displayed sale amount 2022-01-15 16:51:09 -06:00
jahooma
1683a3842b Link to user from feed mentions. Show name instead of username in card. 2022-01-13 15:16:47 -06:00
mantikoros
9d5490cf9a
Switch to new dpm mechanism (#26)
* initial commit

* antes

* rename path, compute to contractPath, contractMetrics

* merge

* Include antes as bets; more calculations

* fees on estimated winnings

* mkt payout calculation

* contract: remove startPool, add phantomShares

* Merge branch 'main' into new-dpm

* dpm migration script

* my service account
2022-01-12 13:01:04 -06:00
mantikoros
b97a65cf2c refactor data structures, calculations to common directory 2022-01-10 15:07:57 -06:00
jahooma
829c8a4b75 Disallow selling after close time! Enforce no trading after close on server. 2022-01-10 10:33:02 -06:00
mantikoros
0b8ad76b0f global warming: warm up all cloud functions on client 2022-01-05 12:30:16 -06:00
mantikoros
7d5b4359f8 align sales price 2022-01-03 23:56:56 -06:00
jahooma
4d0646a200 Add payout if MKT. Current value uses MKT payout. 2022-01-03 23:44:58 -06:00
jahooma
24e873b6de Show "sold for" under sale price / payout column. Outcome label to new file 2022-01-03 12:56:02 -06:00
jahooma
f7d4926d22 Update to show sale price in column 2022-01-03 00:57:25 -06:00
mantikoros
907acec601
Mkt resolution 2: Enable MKT resolution (#16)
* new standard resolution; contract.totalBets; MKT resolution

* recalculate script

* enable resolve MKT

* different approach to resolve MKT

* comment out init

* Count payouts for bets with exluded sales

Co-authored-by: jahooma <jahooma@gmail.com>
2022-01-02 00:27:58 -06:00
jahooma
0b9b2396f1 Est. Max Payout => Shares in bet table 2021-12-31 14:13:06 -06:00
jahooma
a902dfebca Fit long names on mobile 2021-12-24 16:29:24 -05:00
mantikoros
f48ae0170b
Sell bets (#12)
* sell bet

* dev mode

* single-pot no-refund payoff; bet selling

* Increase default fetch size 25 -> 99

* Fix about page numbering

* Don't flash no markets when loading on tag page.

* Change Title to use body font

* Make a bunch of predictions at once (#9)

* Set up a page to make bulk predictions

* Integrate preview into the same card

* List created predictions

* Make changes per James's comments

* Increase the starting balance (#11)

* Remove references to paying for our Mantic Dollars

* Update simulator to use new calculations

* Change simulator random to be evenly random again

* Sell bet UI

* Migrate contracts and bets script

* Add comment to script

* bets => trades; exclude sold bets

* change sale formula

* Change current value to uncapped sell value.

* Disable sell button while selling

* Update some 'bet' to 'trade'

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
Co-authored-by: jahooma <jahooma@gmail.com>
2021-12-24 15:06:01 -06:00
jahooma
4b3b6436a0 Improve navbar styles. Create Page component with navbar and page structure. 2021-12-19 22:06:30 -06:00
jahooma
6efdf46bb3 Don't show "No markets found" when loading markets 2021-12-19 14:40:54 -06:00
jahooma
b87e751b2d Improve spacing on landing-page, about faq. 2021-12-18 23:44:08 -06:00
jahooma
77291956bc Display N/A instead of cancel 2021-12-18 18:37:37 -06:00
jahooma
86e323bf25 Fix collapse carrot positioning... 2021-12-18 18:11:40 -06:00
jahooma
5be7ce5f8f Standardize spacing across pages. 2021-12-18 17:42:06 -06:00
Austin Chen
1851b20f42 Fix /bets page 2021-12-18 02:37:26 -08:00
Austin Chen
802f376042 Add a message for empty markets and bets 2021-12-18 02:28:01 -08:00
Austin Chen
77e15e3aa8 Denormalize username to each contract 2021-12-17 23:27:29 -08:00
jahooma
112a42406e Add simple bets page 2021-12-17 17:40:20 -06:00
mantikoros
03a3df261c contract slugs 2021-12-17 17:16:42 -06:00
jahooma
1c4a834696 Bring back collapse animation by moving padding from card. 2021-12-16 22:27:22 -06:00