Commit Graph

261 Commits

Author SHA1 Message Date
James Grugett
3283b2b24b Add note that there might be closed form 2022-07-09 15:22:53 -05:00
James Grugett
09181f806f Move binary search to util file 2022-07-09 15:01:58 -05:00
James Grugett
f90b367688 Fix lint 2022-07-09 14:49:09 -05:00
James Grugett
c30515b9a2 Merge branch 'main' into limit-orders 2022-07-09 14:46:48 -05:00
James Grugett
89ac26417b Merge branch 'main' into limit-orders 2022-07-09 14:42:46 -05:00
James Grugett
5be2ea8583 Implement selling shares 2022-07-09 14:26:23 -05:00
mantikoros
e7e686d579 return creator liquidity after resolution 2022-07-09 13:53:50 -04:00
mantikoros
50c5f8b6eb reenable fees on share sales; rename getCpmmFees() 2022-07-08 12:34:16 -04:00
James Grugett
f0a7b9591f Tweak cors regex for vercel 2022-07-07 18:54:23 -05:00
Ian Philips
f171462d0d Enable tipping on group chats w/ notif (#629) 2022-07-07 18:52:04 -05:00
Ian Philips
b1b016f9e0
Enable tipping on group chats w/ notif (#629) 2022-07-07 17:23:13 -06:00
James Grugett
74952d741e Test another vercel regex 2022-07-06 23:51:25 -05:00
James Grugett
6d3aff4836 Try another regexp for vercel cors 2022-07-06 23:48:58 -05:00
James Grugett
070fd7eda7 Tweak vercel cors 2022-07-06 23:41:57 -05:00
James Grugett
d8202cb029 Remove console.logs 2022-07-06 23:33:34 -05:00
James Grugett
05a2ada858 Allow CORS exception for Vercel deployments 2022-07-06 23:33:06 -05:00
James Grugett
ada6df0fbb Use floating equal to check if have shares 2022-07-06 22:27:38 -05:00
James Grugett
34b80074a3 Deduct user balance only on each fill. Store orderAmount of bet. Timestamp of fills. 2022-07-06 17:49:17 -05:00
James Grugett
a2a655063a Merge branch 'main' into limit-orders 2022-07-06 15:36:16 -05: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
6cd8b04bd0 Nit: Fix spacing 2022-07-05 16:53:00 -07:00
Ian Philips
3a6d28e2c2
Bold groups with recent chat activity (#621)
* Bold groups with recent chat activity

* Cleanup

* Cleanup
2022-07-05 17:18:37 -06:00
Marshall Polaris
4d1c50a6cc
Redemption refactoring (#614)
* Refactor share redemption code into a few sensible functions

* Put very general share redemption code into common
2022-07-05 12:35:39 -07:00
Marshall Polaris
9bff858696
Fix up lint configuration, lint line endings (#615)
* Make sure we ignore all built code in common and functions

* Add lint for Unix line endings

* Fix line endings in withdraw-liquidity.ts
2022-07-05 12:25:44 -07:00
Ian Philips
b26648c1ce
Daily trading bonuses (#618)
* first commit, WIP

* Give trading bonuses & paginate notifications

* Move read & update into transaction

* Move request bonus logic to notifs icon
2022-07-05 11:29:26 -06:00
James Grugett
e88e7a604a Listen for unfilled bets in bet panel. Calculate how the probability moves based on open limit orders. 2022-07-03 23:28:32 -04:00
Austin Chen
579dcd81dc Update env config template 2022-07-03 16:46:45 -07:00
Austin Chen
9839b7b5a4 Allow customizing starting balance & antes 2022-07-03 16:46:15 -07:00
James Grugett
71401c4482 Some cleanup 2022-07-03 18:17:40 -04:00
James Grugett
3d4f993998 Merge branch 'main' into limit-orders 2022-07-03 15:57:09 -04:00
mantikoros
1a6afaf44f
Pseudo numeric market (#609)
* create pseudo-numeric contracts

* graph and bet panel for pseudo numeric

* pseudo numeric market layout, quick betting

* Estimated value

* sell panel

* fix graph

* pseudo numeric resolution

* bets tab

* redemption for pseudo numeric markets

* create log scale market, validation

* log scale

* create: initial value can't be min or max

* don't allow log scale for ranges with negative values (b/c of problem with graph library)

* prettier delenda est

* graph: handle min value of zero

* bet labeling

* validation

* prettier

* pseudo numeric embeds

* update disclaimer

* validation

* validation
2022-07-02 14:37:59 -05:00
James Grugett
e1af87900a More correct matching 2022-07-02 14:03:18 -04:00
James Grugett
746ba5e802 Merge branch 'main' into limit-orders 2022-07-01 12:07:44 -04:00
Ian Philips
3165e42119
Referrals (#592)
* add trigger for updated user

* Add referral bonuses and notifications for them

* Cleanup

* Add share group button, cleanup

* Cleanup

* Add referrals list to user profile

* Remove unused

* Referral bonus => constant

* Refactor

* Add referral txn to helper fn

* Move reads into firebase transaction

* Use effects to write referral info

* Flex-wrap profile objects

* Small ui changes

* Restrict referral user to one update

* Remove rogue semicolon

* Note about group referral query details

* Track referrals, add them to settings list
2022-07-01 07:47:19 -06:00
Marshall Polaris
fc7f19e785
Finalize v2 resolvemarket migration (#598)
* Update resolve-market to be a v2 function

* Cleanup API error responses

* Update frontend to use v2 version of resolvemarket

* Appease ESLint

* Address review comments

* Appease ESLint

* Remove unnecessary auth check

* Fix logic bug in FR market validation

* Make it so you can specify runtime opts for v2 functions

* Cleanup to resolve market API resolutions input, fixes

* Fix up tiny lint

* Last minute cleanup to resolvemarket FR API input validation

Co-authored-by: Benjamin <ben@congdon.dev>
2022-06-29 16:47:06 -07:00
James Grugett
fe0b26669a Fill in more of placebet 2022-06-28 19:24:09 -05:00
SirSaltyy
63528aa0f3
Add CES charity (#591)
Added CES charity to the charity page.
2022-06-28 17:19:58 -05:00
Forrest Wolf
7f9b0557c4
Reorganize verify scripts (#589)
* Update verify to match check for functions

* Give each subdirectory a verify:dir script
2022-06-28 12:46:25 -07:00
James Grugett
53e2ff7327 Merge branch 'main' into limit-orders 2022-06-28 11:02:12 -05:00
Marshall Polaris
0b585d1c98
Typescript project references take 2 (#586)
* More liberal .gitignores on TS output directories

* Use project references for Typescript functions project

* Use /dist dir for Cloud Functions deployment payload

* Fix Github actions functions tsc job
2022-06-27 13:32:24 -07:00
James Grugett
1e904f567a Revert "Use Typescript project references, improve functions build/deploy (#575)"
This reverts commit 4edad9f19b.
2022-06-27 12:30:22 -05:00
Marshall Polaris
0067bee94b
Compute stats in Firebase instead of Vercel (#584)
* Add stats updating cloud function

* Read stats from database on client instead of computing them

* Improve logging for stats updater

* Tidying up
2022-06-26 14:42:42 -07:00
Marshall Polaris
4edad9f19b
Use Typescript project references, improve functions build/deploy (#575)
* More liberal .gitignores on TS output directories

* Use project references for Typescript projects

* Use /dist dir for Cloud Functions deployment payload

* Disable `next build` typechecking

* Fiddle with GitHub tsc jobs
2022-06-24 22:41:30 -07:00
Marshall Polaris
4f9e303daa
Clean up definition of v2 cloud function URLs (#562) 2022-06-23 16:46:49 -07:00
Austin Chen
6cc2d8af58
Manalink: Send mana to anyone via link (#114)
* Set up Firestore structure for mana bounty links

* Split up manalinks into successes and failures

* Allow clients to create manalinks

* Track txnId and successful users

* Store custom amounts in the link

* List all manalinks you've created

* Support backend for claiming manalinks

* Add some more error handling

* Tweak readme

* Fix typescript breakage

* Revert "Convert common imports in functions to be absolute"

This reverts commit c03518e906.

* Scaffolding so `claimManalink` works

* Clean up imports

* Barebones endpoint to claim mana

* Fix rules to only allow link creators to query

* Design out claim giftcard

* List all claimed transactions

* Style in a more awesome card

* Fix import

* Padding tweak

* Fix useManalinkTxns hook

* /send -> /link

* Tidy up some details

* Do a bunch of random manalinks work

* Fix up LinksTable to build

* Clean up LinksTable an absurd amount

* Basic details functionality on manalinks table

* Work on manalink claim stuff

* Fix up some merge mess

* Not-signed-in flow implemented

* Better manalinks table

* Only show outstanding links in table

* Use new `ManalinkTxn` type

* /link -> /links

* Change manalinks page UI to use nice looking tabs

* Many fixes to manalinks UI

* Default to 1 use

* Tidying up

* Some copy changes based on feedback

* Add required index

Co-authored-by: Marshall Polaris <marshall@pol.rs>
2022-06-23 01:07:52 -07:00
James Grugett
f22216dd22 Write more of matching algorithm 2022-06-22 18:56:14 -05:00
James Grugett
011bbf013b Change cpmm code to take some state instead of whole contract 2022-06-22 18:54:51 -05:00
Justin
4ea7b6692a
add resolutionProbability to LiteMarket (#546) 2022-06-22 15:28:11 -07:00
Ian Philips
6a35d3bf2d Remove group details cache, update group directly 2022-06-22 17:19:17 -05:00
James Grugett
a0d1662a35 Merge branch 'main' into limit-orders 2022-06-22 16:17:42 -05:00