Commit Graph

434 Commits

Author SHA1 Message Date
mantikoros
2c3cd34444 Auto-remove unused imports 2022-09-01 03:34:22 +00:00
mantikoros
e0ebdc644d market close email: remove mention of creator fee 2022-08-31 22:33:37 -05:00
Ian Philips
74b6df2e44 Unwatch applies to email comment notifs too 2022-08-31 16:18:48 -06:00
Ian Philips
91e5abe76a Add query to help avoid timeout 2022-08-31 08:03:51 -06:00
Ian Philips
aad5f6528b
new market view (#819)
* Show old details on lg, don't unfill heart

* Hide tip market if creator

* Small ui tweaks

* Remove contract. calls

* Update high-medium-low

* Remove unused bets prop

* Show uniques

* Remove unused bets prop
2022-08-30 17:13:25 -06:00
Ian Philips
876abef040 Only send dev weekly trending emails to ian 2022-08-30 10:02:51 -06:00
Ian Philips
a0402830c5
liking markets with tip/heart (#798)
* WIP liking markets with tip

* Refactor Userlink, add MultiUserLink

* Lint

* Lint

* Fix merge

* Fix imports

* wip liked contracts list

* Cache likes and liked by user ids on contract

* Refactor tip amount, reduce to M

* Move back to M

* Change positioning for large screens
2022-08-30 09:38:59 -06:00
Ian Philips
0318f7a12b Add missing parentheses 2022-08-29 13:47:24 -06:00
FRC
851cffd73e
Dashboards (#791)
* Create backend for Dashboards

* Rm lastupdatetime for now

* Added a create-dashboard and sharable view dashboard page

* Various nit fixes.

* Renamed Dashboards to Posts

* Fix nits
2022-08-29 16:06:17 +01:00
James Grugett
996b4795ea
Cache user bets tab with react query!! (#813)
* Convert useUserBets to react query

* Fix duplicate key warnings

* Fix react-query workaround to use refetchOnMount: always'

* Use react query for portfolio history

* Fix useUserBet workaround

* Script to back fill unique bettors in all contracts

* React query for user bet contracts, using uniqueBettorsId!

* Prefetch user bets / portfolio data
2022-08-28 18:03:00 -05:00
James Grugett
9dd23b4a08 Fix weird new crash in updateMetrics: contract.id missing? 2022-08-28 00:11:13 -05:00
mantikoros
f31db2f9ed emails: make banner a link 2022-08-27 22:15:14 -05:00
James Grugett
36fa9078f5 Fix absolute import within functions 2022-08-27 17:18:39 -05:00
James Grugett
a80d1f194c Don't redeem shares if there's only epsilon shares to redeem 2022-08-27 17:14:41 -05:00
mantikoros
eeed9eef10 market resolution email: link in header image, show only non-negative investment amount 2022-08-27 14:38:09 -05:00
James Grugett
86cf956894 Add eslint plugin to remove unused imports 2022-08-26 23:49:03 -05:00
Sinclair Chen
1b029ce8dd
bump tiptap version to fix multi-italic bug (#801) 2022-08-25 20:56:38 -07:00
Ian Philips
b9f0da9d3b Give all users 5 free markets 2022-08-25 05:51:56 -06:00
mantikoros
18f2550e4d resolution email: show n/a for canceled numeric 2022-08-24 23:44:30 -05:00
James Grugett
51380febd4 Increase memory for updateStats function 2022-08-24 22:50:52 -05:00
James Grugett
cffd5dcd31 Weekly => daily loans 2022-08-24 22:03:07 -05:00
mantikoros
d390b39e0a eliminate fees 2022-08-24 15:29:48 -05:00
Ian Philips
3eb1b66e9a Lint 2022-08-24 11:58:32 -06:00
Ian Philips
a5812a5a73 Remove group chat display 2022-08-24 11:15:38 -06:00
Ian Philips
5dcaae7af6 Fix import 2022-08-24 10:51:21 -06:00
Ian Philips
480371cf9f Fix import 2022-08-24 10:50:55 -06:00
Ian Philips
f50b4775a1
Allow to follow/unfollow markets, backfill as well (#794)
* Allow to follow/unfollow markets, backfill as well

* remove yarn script edit

* add decrement comment

* Lint

* Decrement follow count on unfollow

* Follow/unfollow button logic

* Unfollow/follow => heart

* Add user to followers in place-bet and sell-shares

* Add tracking

* Show contract follow modal for first time following

* Increment follower count as well

* Remove add follow from bet trigger

* restore on-create-bet

* Add pubsub to dev.sh, show heart on FR, remove from answer trigger
2022-08-24 10:49:53 -06:00
mantikoros
1c73d21925 weeklyMarketsEmails: send different markets to different users 2022-08-23 00:27:07 -05:00
Ian Philips
3bea983662 Be more explicit after unsubscribing from weekly trending 2022-08-22 16:56:28 -06:00
Ian Philips
6929076740 Be more specific about unsubscribe 2022-08-22 16:43:08 -06:00
Ian Philips
e1775681aa Add weekly email sent flag, filter out manifold grouped markets 2022-08-22 16:36:39 -06:00
Sinclair Chen
ec4d0f6b4a
Fix notification for updated questions (#782)
* Fix update notification for question, description

* Don't notify on updated description
2022-08-22 15:26:54 -07:00
Ian Philips
b9a667b126 Add logs to weekly emails 2022-08-22 14:59:11 -06:00
Ian Philips
571d3e71b5 Only show most recent streak notif, relative econ imports, pubsub emulator 2022-08-22 06:31:30 -06: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
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
09e8993cd4 Implement visibility option for new markets 2022-08-20 14:31:32 -05:00
James Grugett
2fef413d88 Don't show fantasy football in newest sort 2022-08-20 13:46:14 -05: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
mantikoros
0cbc0010c1 schedule emails from onCreateUser; send interesting markets on D1 2022-08-19 17:03:00 -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