Commit Graph

25 Commits

Author SHA1 Message Date
Marshall Polaris
b7cbd2a431 More robust functions deploy script 2022-06-24 22:44:41 -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
0820cc8f4d
Clean some API stuff up and instrument placeBet with a bunch of logging (#521)
* Hoist some variables out of functions

* Use built in CORS processing machinery

* Instrument `placebet` with a bunch of logging
2022-06-16 20:57:03 -07:00
mantikoros
fb10e9cddc server side tracking; track M$ purchases 2022-06-15 21:29:53 -05:00
James Grugett
879ab272e0
Following and follower list (#456)
* Create following button that opens follow list in modal.

* Move react query deps to web package.json

* UseFollowers hook

* Following and followers button, dialog with tabs.

* Fix line endings

* Remove carriage return from default vscode eol

* Add placeholder message if no users followed / no followers

* Tweak spacing
2022-06-07 22:24:18 -05:00
Marshall Polaris
33ddd86add
Switch to Google Secret Manager for function secrets (#418)
* Upgrade firebase-functions 3.16.0 -> 3.21.2

* Use Secret Manager instead of config

* Small refactoring on new stripe/mailgun initialization

* Teach README about new secrets workflow
2022-06-04 14:39:25 -07:00
Forrest Wolf
b89753e1fe
Add yarn verify script (#378)
* Add yarn check script

* Rename

* Add verify script to subdirectories for convenience
2022-06-03 15:10:14 -07:00
Marshall Polaris
5217270073
Serious business API validation & big cleanup of createContract, placeBet (#302)
* Add the great Zod as a dependency to help us

* Tweak eslint

* Rewrite a ton of stuff in createContract and placeBet

* Clean up error reporting in API

* Make sure the UI is enforcing validated limits on lengths

* Remove unnecessary Math.abs

* Better type on `BetInfo`

* Kill `manaLimitPerUser`

* Clean up hacky parameters on bet info functions

* Validate `closeTime` as a valid timestamp in the future
2022-05-26 14:37:51 -07:00
Marshall Polaris
0803a15902
Set up eslint for common, functions packages (#290)
* Move common dev dependencies to workspace top level

* Add .eslintrc.js for functions and common packages

* Add more linting to check workflow
2022-05-22 00:35:43 -07:00
Marshall Polaris
cd7efb03ca
Implement onRequest versions of createContract, placeBet functions (#227)
* Reimplement createContract and placeBet cloud functions

* Fix broken warmup function error handling
2022-05-16 21:43:40 -07:00
mantikoros
9a4e5763f5
Categories (#132)
* basic market categories

* use tags to store market category

* display category in market

* display full category

* category selector component on feed

* Move feed data fetching to new file

* Decrease batch size for updating feed to prevent out-of-memory error

* Compute and update category feeds!

* Show feeds based on category tabs

* Add react-query package!

* Use react query to cache contracts

* Remove 'other' category

* Add back personal / friends to feed categories

* Show scrollbar temporarily for categories

* Remove 5 categories, change geopolitics to world

* finance => economics

* Show categories on two lines on larger screens

Co-authored-by: James Grugett <jahooma@gmail.com>
2022-05-12 10:07:10 -05:00
Marshall Polaris
1ca634be3b Move @types/module-alias to a dev dependency
My bad, I accidentally did `yarn add` and it went to the wrong spot.
2022-05-10 21:43:57 -07:00
Marshall Polaris
c82a56af09
Make absolute imports work with functions project (#168)
* Use a silly hack to make absolute imports work with Firebase tools

* Use absolute import for common module in functions code
2022-05-10 13:59:38 -07:00
Boa
1e2f9fc099
Support local firestore emulation (#91)
* Support local firestore emulation

* Update readme

* Update readme
2022-04-25 09:46:35 -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
Austin Chen
6e92e3fba1 DX: Cloud Functions tooling 2022-01-16 01:59:05 -05:00
mantikoros
0fef0eeccb functions: change entry point after adding common directory 2022-01-11 13:30:00 -06:00
James Grugett
af6387bbf3
Stripe (#22)
* basic working payments

* Select funds amount and prettier funds button / dialog

* Add funds page and nav menu option

* Format funds amount. Use ghost button for back.

* Add mantic dollars description

* Improve styles of add funds page

* about styling

* change faq => about

* change default font to Courier

* header sign out menu item; remove user  card

* keep logo font

* fix header issue

* stripe webhook: handle repeat events

* Make add funds button a gradient

* add funds referer url

* Fix add funds page after merge

* Slight VisD tweaks

* Update add funds button position. Mantic => Manifold

* Remove Add funds menu option for now.

* Set up product ids and endpoint for stripe prod

* Swap back order in profile menu

Co-authored-by: mantikoros <sgrugett@gmail.com>
Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-01-07 16:56:14 -06:00
jahooma
afc6f28a49 Send email on market resolution with your payout 2022-01-01 18:08:52 -06: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
58521b6503 Switch to yarn 2021-12-19 16:08:25 -06:00
mantikoros
86c2ff4605 keep awake cloud functions 2021-12-17 20:13:20 -06:00
mantikoros
f2748db21d resolve markets 2021-12-14 01:02:54 -06:00
mantikoros
d95bef8ab3 placeBet 2021-12-10 18:06:17 -06:00
mantikoros
083e5c506b initial commit 2021-12-10 12:10:30 -06:00