Commit Graph

2049 Commits

Author SHA1 Message Date
James Grugett
99fcfa6be7 Add portfolio filter for limit bets. 2022-07-10 22:15:07 -05:00
James Grugett
9586e81e95 Show limit bets in bets table 2022-07-10 22:07:42 -05:00
James Grugett
fd7384a099 Hide referrals button on user page 2022-07-10 19:59:23 -05:00
James Grugett
67edc7b639 UserPage: Load user with getStatic props 2022-07-10 19:42:34 -05:00
James Grugett
5e1ed17cdf Load contracts at UserPage top level instead of in BetsList 2022-07-10 19:19:35 -05:00
James Grugett
f294189e20 Refactor notifications to use Pagination component 2022-07-10 18:50:59 -05:00
James Grugett
162e73912e Paginate bets list 2022-07-10 18:41:33 -05:00
James Grugett
5c6a143614 Change portfolio graph option labels 2022-07-10 18:26:06 -05:00
James Grugett
78ceac0659 Don't load user bets twice 👀 2022-07-10 18:22:21 -05:00
Marshall Polaris
4700ceb14c
Refactor some backend-related stuff (#639)
* web/lib/firebase/api-call -> common/api, web/lib/firebase/api

* Reuse `APIError` type in server code

* Reuse `getFunctionUrl` in server code
2022-07-10 15:03:15 -07:00
Marshall Polaris
6462d4a2ed
Migrate createUser function to v2 (#633) 2022-07-10 14:02:32 -07:00
Marshall Polaris
eb9b14d6d5
Migrate unsubscribe function to v2 (#637)
* Migrate unsubscribe function to v2

* Move Stripe import because I forgot to do it before
2022-07-10 13:46:00 -07:00
James Grugett
83c5f9b323 Fix unused var 2022-07-10 14:55:10 -05:00
James Grugett
f2df32e710 PseudoNumeric markets store resolveValue in resolved notification and render it 2022-07-10 14:52:31 -05:00
James Grugett
900fc75506 Add sourceContractId to bet_fill notification 2022-07-10 13:45:32 -05:00
James Grugett
4de22acb3e Tweak check for matching with pool 2022-07-10 13:24:54 -05:00
James Grugett
80ae551ca9
🧾 Limit orders! (#495)
* Simple limit order UI

* Update bet schema

* Restrict bet panel / bet row to only CPMMBinaryContracts (all binary DPM are resolved)

* Limit orders partway implemented

* Update follow leaderboard copy

* Change cpmm code to take some state instead of whole contract

* Write more of matching algorithm

* Fill in more of placebet

* Use client side contract search for emulator

* More correct matching

* Merge branch 'main' into limit-orders

* Some cleanup

* Listen for unfilled bets in bet panel. Calculate how the probability moves based on open limit orders.

* Simpler switching between bet & limit bet.

* Render your open bets (unfilled limit orders)

* Cancel bet endpoint.

* Fix build error

* Rename open bets to limit bets. Tweak payout calculation

* Limit probability selector to 1-99

* Deduct user balance only on each fill. Store orderAmount of bet. Timestamp of fills.

* Use floating equal to check if have shares

* Add limit order switcher to mobile bet dialog

* Support limit orders on numeric markets

* Allow CORS exception for Vercel deployments

* Remove console.logs

* Update user balance by new bet amount

* Tweak vercel cors

* Try another regexp for vercel cors

* Test another vercel regex

* Slight notifications refactor

* Fix docs edit link (#624)

* Fix docs edit link

* Update github links

* Small groups UX changes

* Groups UX on mobile

* Leaderboards => Rankings on groups

* Unused vars

* create: remove automatic setting of log scale

* Use react-query to cache notifications (#625)

* Use react-query to cache notifications

* Fix imports

* Cleanup

* Limit unseen notifs query

* Catch the bounced query

* Don't use interval

* Unused var

* Avoid flash of page nav

* Give notification question priority & 2 lines

* Right justify timestamps

* Rewording

* Margin

* Simplify error msg

* Be explicit about limit for unseen notifs

* Pass limit > 0

* Remove category filters

* Remove category selector references

* Track notification clicks

* Analyze tab usage

* Bold more on new group chats

* Add API route for listing a bets by user (#567)

* Add API route for getting a user's bets

* Refactor bets API to use /bets

* Update /markets to use zod validation

* Update docs

* Clone missing indexes from firestore

* Minor notif spacing adjustments

* Enable tipping on group chats w/ notif (#629)

* Tweak cors regex for vercel

* Your limit bets

* Implement selling shares

* Merge branch 'main' into limit-orders

* Fix lint

* Move binary search to util file

* Add note that there might be closed form

* Add tooltip to explain limit probability

* Tweak

* Cancel your limit orders if you run out of money

* Don't show amount error in probability input

* Require limit prob to be >= .1% and <= 99.9%

* Fix focus input bug

* Simplify mobile betting dialog

* Move mobile limit bets list into bet dialog.

* Small fixes to existing sell shares client

* Lint

* Refactor useSaveShares to actually read from localStorage, use less bug-prone interface.

* Fix NaN error

* Remove TODO

* Simple bet fill notification

* Tweak wording

* Sort limit bets by limit prob

* Padding on limit bets

* Match header size

Co-authored-by: Ian Philips <iansphilips@gmail.com>
Co-authored-by: ahalekelly <ahalekelly@gmail.com>
Co-authored-by: mantikoros <sgrugett@gmail.com>
Co-authored-by: Ben Congdon <ben@congdon.dev>
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-07-10 13:05:44 -05:00
mantikoros
fc06b03af8 fix getCpmmLiquidityPoolWeights 2022-07-09 22:39:26 -04:00
mantikoros
d063e209dd Revert "expand search bar when typing on mobile"
This reverts commit 43b1096313.
2022-07-09 22:04:50 -04:00
Marshall Polaris
480b3e7c54
Make referral stuff not busted (#632) 2022-07-09 14:38:23 -07:00
mantikoros
43b1096313 expand search bar when typing on mobile 2022-07-09 17:27:39 -04:00
Marshall Polaris
67a05c2f1b
Migrate transact function to v2 (#635) 2022-07-09 13:54:15 -07:00
Marshall Polaris
581a42f288
Migrate stripeWebhook and createCheckoutSession to v2 (#636) 2022-07-09 13:43:18 -07:00
mantikoros
e7e686d579 return creator liquidity after resolution 2022-07-09 13:53:50 -04:00
Marshall Polaris
c1ca1471a1
Migrate createAnswer function to v2 (#634)
* Migrate createAnswer function to v2

* Remove unhelpful toString on APIError
2022-07-09 00:26:56 -07:00
Marshall Polaris
fdde73710e
Migrate claimManalink function to v2 (#628)
* Implement helpful `toString` on client `APIError`

* Migrate claimManalink function to v2
2022-07-08 15:28:04 -07:00
Marshall Polaris
d9f42caa6a
Migrate addLiquidity and withdrawLiquidity functions to v2 (#627) 2022-07-08 15:08:17 -07:00
Marshall Polaris
ed0544212d
Migrate changeUserInfo function to v2 (#626) 2022-07-08 15:00:03 -07:00
mantikoros
93b293ca0e remove quick betting for FR markets 2022-07-08 12:50:46 -04:00
mantikoros
50c5f8b6eb reenable fees on share sales; rename getCpmmFees() 2022-07-08 12:34:16 -04:00
Ian Philips
b1b016f9e0
Enable tipping on group chats w/ notif (#629) 2022-07-07 17:23:13 -06:00
Ian Philips
d6136a9937 Minor notif spacing adjustments 2022-07-07 17:17:10 -06:00
Austin Chen
53ddb1243b Clone missing indexes from firestore 2022-07-07 15:41:44 -07:00
Ben Congdon
c3bc25a4b9
Add API route for listing a bets by user (#567)
* Add API route for getting a user's bets

* Refactor bets API to use /bets

* Update /markets to use zod validation

* Update docs
2022-07-07 15:36:02 -07:00
Ian Philips
999c1cd8e3 Bold more on new group chats 2022-07-07 15:52:28 -06:00
Ian Philips
e456b9a855 Analyze tab usage 2022-07-07 15:24:13 -06:00
Ian Philips
3eee4a4103 Track notification clicks 2022-07-07 15:06:29 -06:00
Ian Philips
3ff8b26312 Remove category selector references 2022-07-07 14:55:28 -06:00
Ian Philips
d6e808e1a3 Remove category filters 2022-07-07 14:45:26 -06:00
Ian Philips
cfbb78af48
Use react-query to cache notifications (#625)
* Use react-query to cache notifications

* Fix imports

* Cleanup

* Limit unseen notifs query

* Catch the bounced query

* Don't use interval

* Unused var

* Avoid flash of page nav

* Give notification question priority & 2 lines

* Right justify timestamps

* Rewording

* Margin

* Simplify error msg

* Be explicit about limit for unseen notifs

* Pass limit > 0
2022-07-07 14:41:50 -06:00
mantikoros
a22b29ad6d create: remove automatic setting of log scale 2022-07-07 12:36:34 -04:00
Ian Philips
7f8617832f Unused vars 2022-07-07 07:05:12 -06:00
Ian Philips
b8748fd49a Leaderboards => Rankings on groups 2022-07-07 06:54:00 -06:00
Ian Philips
93b2900015 Groups UX on mobile 2022-07-07 06:53:14 -06:00
Ian Philips
a23c744c3e Small groups UX changes 2022-07-06 17:24:53 -06:00
ahalekelly
2591655269
Fix docs edit link (#624)
* Fix docs edit link

* Update github links
2022-07-06 15:41:13 -06:00
Ian Philips
e969540c72 Slight notifications refactor 2022-07-06 15:06:41 -06:00
Ian Philips
54b4f97a84 Move timestamp to same line 2022-07-06 13:45:31 -06:00
Ian Philips
de20ee9fb9
Show tip notifications (#623)
* Show tip notifications

* Optimizing notifications for mobile

* Unused vars

* Move income reason logic to income notif

* Remove unnecessary icons

* Unused vars
2022-07-06 13:30:51 -06:00
Austin Chen
2d1e76eae8 When duplicating, add the original link in description 2022-07-06 10:39:19 -07:00