Commit Graph

2428 Commits

Author SHA1 Message Date
Austin Chen
51ef01dcb4 Disable bet streak 2022-08-21 22:41:15 -07:00
Austin Chen
be24c09c62 Merge branch 'main' into atlas4 2022-08-21 22:38:23 -07:00
Austin Chen
b5a4891223 Merge branch 'main' into atlas4 2022-08-21 22:37:42 -07:00
Austin Chen
88bf678ce3
Allow custom environments to override any economic aspect (#787)
* Extract monetary constants to a single file economy.ts

* Add missing import

* Allow environments to override any econ variable

* Update imports

* Update more imports

* Fix import
2022-08-21 22:37:26 -07:00
James Grugett
8b7cd20b6f
Loans2: Bets return you some capital every week (#588)
* Remove some old loan code

* Almost complete implementation of updateLoans cloud function

* Merge fixes

* Use invested instead of sale value, check if eligible, perform payouts

* Run monday 12am

* Implement loan income notification

* Fix imports

* Loan update fixes / debug

* Handle NaN and negative loan calcs

* Working loan notification

* Loan modal!

* Move loans calculation to /common

* Better layout

* Pay back loan on sell shares

* Pay back fraction of loan on redeem

* Sell bet loan: negate buy bet's loan

* Modal tweaks

* Compute and store nextLoanCached for all users

* lint

* Update loans with newest portfolio

* Filter loans to only unresolved contracts

* Tweak spacing

* Increase memory
2022-08-22 00:22:49 -05:00
Austin Chen
a7df49bde2 Merge branch 'main' into atlas4 2022-08-21 22:13:56 -07:00
Austin Chen
3158740ea3 Minor tweaks for custom instances 2022-08-21 22:13:42 -07:00
Austin Chen
7ebf0103b1 Fix cloud run id again?? 2022-08-21 21:15:31 -07:00
Austin Chen
258b2a318f Default to showing weekly bet graph 2022-08-21 21:02:56 -07:00
Austin Chen
db857a79fd Fix cloud run id 2022-08-21 20:57:41 -07:00
Austin Chen
b0e529eb8f Handle case when no charity txns 2022-08-21 20:55:44 -07:00
Austin Chen
aa3647e0f3 Handle case when no charity txns 2022-08-21 20:55:04 -07:00
Austin Chen
b61d6ca4a2 Fix scripts 2022-08-21 16:25:48 -07:00
Austin Chen
e05adec16a Update firestore.indexes.json 2022-08-21 16:18:03 -07:00
Austin Chen
b578a501ec Fix ESlint 2022-08-21 16:16:59 -07:00
Austin Chen
a8ebf98b62 Update from atlas3 to atlas4 2022-08-21 16:10:30 -07:00
Austin Chen
a9cb68e3a9 Merge branch 'atlas3' into atlas4 2022-08-21 16:03:28 -07:00
James Grugett
d18dd5b8fb Fix a case of limit order sorting 2022-08-21 15:58:49 -05:00
James Grugett
645cfc65f4 Update sort order of limit orders (older bets first b/c they are filled first) 2022-08-21 12:57:00 -05:00
mantikoros
97b38c156f Revert "create contract: ante no longer user liquidity provision"
This reverts commit 56e9b5fa2f.
2022-08-20 15:34:52 -05:00
mantikoros
c6dc852cd8 send creator guide on D1 2022-08-20 15:34:34 -05:00
mantikoros
ef127ea335 update welcome email 2022-08-20 15:34:34 -05:00
mantikoros
43bbc9ec24 send followup email on D2 2022-08-20 15:34:34 -05:00
Marshall Polaris
2439317408
Convert tags to groups on demand (#784)
* Fix stuff to not prematurely initialize Firebase when imported

* Add script to convert a tag to a group with the same contracts
2022-08-20 13:32:12 -07:00
James Grugett
f4ebb2b504 Fix wrapping on "Add market" button 2022-08-20 15:19:05 -05:00
Sinclair Chen
a9f846e8fc
Fix tooltip styles in your bets (#783)
* Only show answer tooltips if truncated

* Always wrap in tooltip

* refactor. make title in dialog less big
2022-08-20 13:05:33 -07:00
James Grugett
099764a931 Show unlisted markets in groups and under your markets 2022-08-20 14:38:15 -05:00
James Grugett
09e8993cd4 Implement visibility option for new markets 2022-08-20 14:31:32 -05:00
mantikoros
dd6c5dc97a betting streaks copy 2022-08-20 13:47:26 -05:00
James Grugett
2fef413d88 Don't show fantasy football in newest sort 2022-08-20 13:46:14 -05:00
James Grugett
474304d284 Revert "🔥🔥🔥🔥🔥🔥🔥🔥"
This reverts commit fc8487dca0.
2022-08-20 11:45:13 -05:00
Austin Chen
6791da0fc8 Fix "Most Recent Donor" on /charity 2022-08-19 17:28:08 -07:00
Sinclair Chen
c850cfe97f Revert "Revert "fix firefox visual glitch - single card wrapping""
This reverts commit 63a5241b2e.
2022-08-19 16:59:42 -07:00
Austin Chen
51c843d765
Use masonry on contract cards, sorted correctly (#773)
* Revert "Revert "Tile contract cards in masonry layout (#761)""

This reverts commit 62728e52b7.

* Sort the contracts in the correct masonry order

* Fix ordering on single columns

* Use react-masonry-css to accomplish masonry view

* Improve comment

* Remove gridClassName

Everything is spaced with m-4, too bad
2022-08-19 16:57:23 -07:00
Ian Philips
03d98a7ad7 Reset hour to 12am utc 2022-08-19 17:16:17 -06:00
mantikoros
0cbc0010c1 schedule emails from onCreateUser; send interesting markets on D1 2022-08-19 17:03:00 -05:00
Ian Philips
fc8487dca0 🔥🔥🔥🔥🔥🔥🔥🔥 2022-08-19 16:00:40 -06:00
James Grugett
b67a26ad61 Don't show bets streak modal on navigate each tab 2022-08-19 16:51:52 -05:00
Ian Philips
39c312cf9f Explicitly pass utc timezone 2022-08-19 15:19:52 -06:00
Ian Philips
1196ec4375 Send 6 trending emails to all users monday 12pm PT 2022-08-19 15:01:53 -06:00
Ian Philips
634196d8f1 Slice the popular emails to the top 20 2022-08-19 14:45:04 -06:00
Ian Philips
36bfbe8f42 Change betting streak modal, tweak trending email query 2022-08-19 14:37:16 -06:00
Ian Philips
a0f62ba172
Markets emails (#764)
* Send out email template for 3 trending markets

* Rich text to plaintext descriptions, other ui changes

* Lint

* Filter for closed markets

* Change sign

* First order must be closeTime

* Send 6 emails, check flag twice

* Exclude contracts with trump and president in the name

* interesting markets email

* sendInterestingMarketsEmail

* Change subject line back

Co-authored-by: mantikoros <sgrugett@gmail.com>
2022-08-19 11:43:57 -06:00
Ian Philips
ba5dabd613 Increase gap between profit and streak 2022-08-19 11:24:28 -06:00
Ian Philips
00c9fa61c3
betting streaks (#777)
* Parse notif, show betting streaks modal, schedule function

* Ignore streaks of 0

* Pass notifyFills the contract

* Turn 9am into a constant

* Lint

* Up streak reward, fix timing logic

* Change wording
2022-08-19 11:10:32 -06:00
Sinclair Chen
4f3202f90b
Simple bet interface in embeds (#775)
* rename BetRow -> BetButton

* Replace bet modal in embed with inline betting

- Also simplifies graph height calculation

* Move bet row above graph, in "mini modal"

* Show signup button if not signed up

* Show probability change

* Show error after modal

- Show balance if insufficient funds
- Clear error from amount input if amount deleted entirely

* Fix error state conditions

- Reset amount input on success
- Reset success state on user input

* Make input smaller (80px)
2022-08-19 10:07:48 -07:00
Sinclair Chen
98a0ed99c9 Fix (i) alignment 2022-08-19 09:53:16 -07:00
Sinclair Chen
4d7df00a68
Make Avatar component update when avatarUrl updates (#780) 2022-08-19 09:47:00 -07:00
Barak Gila
f51ad2224b
add YIMBY Law and CaRLA as charities (#781) 2022-08-19 10:52:01 -05:00
Marshall Polaris
0972de9025
Make typing for comments more fancy (#776) 2022-08-19 01:06:40 -07:00