Commit Graph

1418 Commits

Author SHA1 Message Date
Austin Chen
583a797a61 WIP: Try a toast that counts down before betting
There's some weird timing/React hook error that sometimes allows this thing to bet twice? IDK, my brain is fried trying to understand it.

Also, progress bar that scrolls down might be cooler than a number countdown? See https://www.npmjs.com/package/react-toastify, although the API for that is more unwieldy/less Tailwind-friendly?
2022-05-22 14:05:44 -07:00
Austin Chen
139902f15e Install react-hot-toaster 2022-05-22 14:02:25 -07:00
Austin Chen
668d111973 FR: "MULTI" => "MANY", single => "TOP" 2022-05-22 12:09:05 -07:00
Austin Chen
31e1f4ba28 Improve click targets 2022-05-22 12:08:30 -07:00
Austin Chen
f3092892d8 Show "M$20" on hover, hide arrows when closed 2022-05-21 19:52:50 -07:00
Austin Chen
1adfb874c3 Fix bet width, remove "chance/expected" 2022-05-21 17:03:59 -07:00
Austin Chen
3aad05e2a6 Clean up hover areas 2022-05-21 16:30:50 -07:00
Austin Chen
13de5de24d Default large nums to 2 sigfigs 2022-05-21 16:28:47 -07:00
Austin Chen
1cfbd86bd0 Fix down triangle & padding 2022-05-21 15:48:47 -07:00
Austin Chen
ba9411161d Set correct hover states the arrows 2022-05-21 15:34:18 -07:00
Austin Chen
fd49ccea39 Use triangles instead of planes 2022-05-21 14:33:10 -07:00
Austin Chen
1b17d3a102 Fix Free Response card layouts 2022-05-21 13:50:34 -07:00
Austin Chen
98510f233d Hide liquidity injection star, for now 2022-05-21 13:32:57 -07:00
Austin Chen
d1fab9937f Align bet icons with the percentages 2022-05-21 13:26:34 -07:00
Austin Chen
3d368216b2 Play with using 3 icons for 1-click usage 2022-05-21 11:58:22 -07:00
James Grugett
c5660ab762 Prevent flash of "No markets found" on search load 2022-05-21 13:51:41 -04:00
James Grugett
688ebb797a Add "Last updated" sort option 2022-05-21 13:44:55 -04:00
Marshall Polaris
98c5329e03
Fix up API CORS header processing (#277)
* Fix ultra embarrassing bug not restricting CORS origins

* Put CORS origin regexps in common

* Static types so I don't muck it up again

* Fixup CORS regex to be more strict

* Fix sloppy imports to actually work
2022-05-20 19:34:26 -07:00
Marshall Polaris
540476f65a
Public API improvements (#266)
* Remove needless wrappers from API requests and responses

* Return real HTTP status codes instead of status field

* More robustly handle API errors

* Fix broken error handling in NumericResolutionPanel warmup
2022-05-20 14:58:14 -07:00
Austin Chen
03a13248a4 Limit large numbers to 3 sig figs 2022-05-20 15:25:32 -04:00
Austin Chen
52ad4c42b0 Persist homepage sort 2022-05-20 15:08:00 -04:00
Austin Chen
4c93da3cc0 Use a blue bar for Numeric types 2022-05-20 14:00:22 -04:00
Austin Chen
5d96fdafd6 Add padding to homepage 2022-05-20 13:53:12 -04:00
mantikoros
6f1a569797 back to M$ — the worst option except for all the others 2022-05-19 22:28:38 -04:00
James Grugett
1616ffc817 Make filter for isResolved work in all cases 2022-05-19 22:13:58 -04:00
mantikoros
e9fee04761 ante for free FR market now come from house 2022-05-19 22:06:50 -04:00
mantikoros
99c41b6112 bug fix: use new placeBet api in numeric bet panel 2022-05-19 20:39:23 -04:00
Sinclair Chen
4c7836abc7
Show embed view of normal market links in iframes (#254) 2022-05-19 17:34:08 -07:00
SirSaltyy
a0db1b806a
Add trevor project charity (#258) 2022-05-19 17:08:21 -07:00
Marshall Polaris
20f4b97d8b
Rewrite client for new public APIs to use fetch instead of callables (#241)
* Rename `lib/firebase/api-call` -> `lib/firebase/fn-call`

This relieves ambiguity now that we will be using our actual
public API in the client.

* Rewrite client API calls to createContract, placeBet

* Tiny fixup for client market creation code
2022-05-19 15:04:34 -07:00
James Grugett
d4a49789d1 Add daily signups 2022-05-19 17:13:30 -04:00
James Grugett
a275b3a9c2 Fix analytics 2022-05-19 16:53:49 -04:00
James Grugett
4396456ed1 Add tooltip to analytics charts 2022-05-19 16:14:27 -04:00
mantikoros
be3d4d7735 exclude antes from bets list 2022-05-19 15:26:44 -04:00
James Grugett
76f27d1a93
Numeric range markets!! (#146)
* Numeric contract type

* Create market numeric type

* Add numeric graph (coded without testing)

* Outline of numeric bet panel

* Update bet panel logic

* create numeric contracts

* remove batching for antes for numeric markets

* Remove focus

* numeric market range [1, 100]

* Zoom graph

* Hide bet panels

* getNumericBets

* Add numeric resolution panel

* Use getNumericBets in bet panel calc

* Switch bucket count to 100

* Parallelize ante creation

* placeBet for numeric markets

* halve std of numeric bets

* Update resolveMarket with numeric type

* Set min and max for contract

* lower std for numeric bets

* calculateNumericDpmShares: use sorted order

* Use min and max to map the input

* Fix probability calc

* normpdf variance mislabeled

* range input

* merge

* change numeric graph color

* fix getNewContract params

* bet panel labels

* validation

* number input

* fix bucketing

* bucket input, numeric resolution panel

* outcome label

* merge

* numeric bet panel on mobile

* Make text underneath filled green answer bar selectable

* Default to 'all' feed category when loading page.

* fix numeric resolution panel

* fix numeric bet panel calculations

* display numeric resolution

* don't render NumericBetPanel for non numeric markets

* numeric bets: store shares, bet amounts across buckets in each bet object

* restore your bets for numeric markets

* numeric pnl calculations

* remove hasUserHitManaLimit

* contrain contract type

* handle undefined allOutcomeShares

* numeric ante bet amount

* use correct amount for numeric dpm payouts

* change numeric graph/outcome color

* numeric constants

* hack to show correct numeric payout in calculateDpmPayoutAfterCorrectBet

* remove comment

* fix ante display in bet list

* halve bucket count

* cast to NumericContract

* fix merge imports

* OUTCOME_TYPES

* typo

* lower bucket count to 200

* store raw numeric value with bet

* store raw numeric resolution value

* number input max length

* create page: min, max to undefined if not numeric market

* numeric resolution formatting

* expected value for numeric markets

* expected value for numeric markets

* rearrange lines for readability

* move normalpdf to util/math

* show bets tab

* check if outcomeMode is undefined

* remove extraneous auto-merge cruft

* hide comment status for numeric markets

* import

Co-authored-by: mantikoros <sgrugett@gmail.com>
2022-05-19 12:42:03 -05:00
Ian Philips
7d8ccb78a4
Remove unused bets (redemptions, antes) and sort by desc in query (#264)
* Remove unused bets and sort in query

* remove console

* Explicitly ignore or include redemptions

* Pass options from parent function

* Fix let=>const
2022-05-19 10:03:37 -06:00
Ian Philips
8013862f15 Center question button on lg 2022-05-19 09:20:38 -06:00
Ian Philips
6935f8865d Move comment btn to its own row on xs 2022-05-18 21:34:59 -06:00
Ian Philips
e6dabf97d9
Show prob at time of comment on binary markets (#255)
* Show prob at time of comment on binary markets

* unused import
2022-05-18 19:38:02 -06:00
James Grugett
6a30a41b10 Make analytics show data up to current hour 2022-05-18 18:53:53 -04:00
James Grugett
e9ee7e2355 Truncate user link 2022-05-18 17:08:46 -04:00
James Grugett
1f3f800a57 Show close time in cards on close date sort 2022-05-18 17:08:46 -04:00
Ian Philips
6d3aaf71d4 Any question => anything 2022-05-18 13:47:53 -06:00
Sinclair Chen
e2b03f31e9 Style current page on mobile nav bar 2022-05-18 15:45:08 -04:00
Sinclair Chen
f7c1d98221 Add Sinclair to admins 2022-05-18 15:04:06 -04:00
Ian Philips
daf6cadea9 Remove border from sidebar buttons 2022-05-18 10:52:00 -06:00
Austin Chen
7b3c8ea046 Revert "back to M$ — playtime is over"
This reverts commit ed41d99484.
2022-05-18 12:09:24 -04:00
Ian Philips
ca9e93fe47 Show loading indicator on comment submit 2022-05-18 10:08:42 -06:00
Austin Chen
f17675bbcf Fix typo 2022-05-18 12:07:36 -04:00
Austin Chen
44c53ae96d Kill the ugly "Sign in" button 2022-05-18 12:06:41 -04:00