* Clean the user's display name on update.
The user's display name should always be clean (see for example
functions/src/create-user.ts). However, change-user-info.ts does not
enforce this, thus potentially allowing a malicious user to change their
name to something that doesn't satisfy the rules for clean display
names.
Note: this cannot happen currently because all callers (in profile.tsx)
clean the name. However, doing it here is good defense in depth
(similar to how the userName is cleaned).
* Update display name max length to 30
* Add a script to hunt down too-long display names
* Make util.isProd a function
* Don't access admin.firestore() on top level of utils.ts
Co-authored-by: Jonas Wagner <ltlygwayh@gmail.com>
* Add tip arrows UI (visual)
* move tipper into its own component
* simplify score calculation
* Add tip txns
- more specific txn types
- fix transact cloud function to be able to create tip txns
- insert tips into comments via a context
* Refactor tipper to send tip txns
* Stop tipping yourself. Disable anons.
* Style tipper (smaller)
* remove default exports
* capitalize tooltips
* rename stuff
* add exhausting hook dependencies
* replace context with prop threading
* fix eslint unused vars
* fix: thread tips correctly into fr comments
* Add tip arrows UI (visual)
* move tipper into its own component
* simplify score calculation
* Add tip txns
- more specific txn types
- fix transact cloud function to be able to create tip txns
- insert tips into comments via a context
* Refactor tipper to send tip txns
* Stop tipping yourself. Disable anons.
* Style tipper (smaller)
* remove default exports
* capitalize tooltips
* rename stuff
* add exhausting hook dependencies
* replace context with prop threading
* fix eslint unused vars
* Added radio buttons to market creation (non functional)
* Ignoring vs code files
Should this be done in the repo or should everyone using VS Code do that himself globally on his machine(s)?
* Removed 'automatic' resolution
* added union type for resolution
* revert: resolution could be anything here (non binary markets)
* Expanded ChoicesToggleGroup for string choices
* Added combined resolution and required buttons to market creation
* restricted automatic resolution to binary markets
* added automatic resolution to contract
* added automatic resolution to contract overview
* string or number array to mixed array
* created const for resolutions
* Added comments for leading semicolons
* configuration of auto resolution on market creation
* v1.22.19
* v1.0.0
* v0.0.0
* v1.0.0
* v1.22.19
* Mock display automatic resolution
* Revert changes to market creation
* Revert "v1.22.19"
This reverts commit 22f59adc9c.
* Removed resolutiontype from contract creation
* Added auto resolution time to contract
* Auto resolution date editable
* refactoring
* Editable interface for auto resolution
* New edit interface for auto resolution
* Setting of auto resolve date when changing close date
* prohibited changing other peoples markets
* removed unnecessary export
* refactoring
(cherry picked from commit 4de86d5b08)
* Added comments for leading semicolons
(cherry picked from commit 60739c7853)
* Ignoring vs code files
Should this be done in the repo or should everyone using VS Code do that himself globally on his machine(s)?
(cherry picked from commit 944de9398a)
* removed unused imports and variables
* added type for binary resolution
* Prettier
* const for binary resolutions
* using the type "resolution"
* Prettier
* Re-added comment
* Update functions/src/create-contract.ts
* Revert "Ignoring vs code files"
This reverts commit 09aea5c207.
* launch config for debugging with vs code WIP
* "Launch Chrome" does not work since login via google is not possible in debugger-chrome
* Breakpoints are unbound when attached to chrome
* Revert "Added comments for leading semicolons"
* prettier
* linebreak crlf
* vscode settings
* correct linebreaks
* search exclusion
* automatic prettifier
* vscode settings
* correct linebreaks
* search exclusion
* automatic prettifier
* Working debugger config
* fix merge
* Removed comments, default resolution MKT
* removed vscode from gitignore
* refactoring description update
* Added auto resolution to LiteMarket
* fix date, setDate mutates object
* fixed firestore.rules
* script to add auto resolution to all markets
* regularely auto resolve markets
* fix description error
* moved calculate ts for access in firebase
* Revert "moved calculate ts for access in firebase"
This reverts commit 8380bf4f72.
* fix reference to calculate for firebase
* fixed references to time
* renamed function
* added description
* added auto resolution to description
* direct bool check instead of != null
* direct bool check instead of != undefined
* remove explicit type
* Fix free response markets
* removed contract from functionname
* interval set to 1h
* query instead of filter
* folds ~> contracts
* query instead of filter
* promise.all instead of foreach
* removed contractDoc from function header
* removed autoResolution from function header
* batchedWaitAll instead of promise.all
* removed unused parameter
* replaced auto resolution with constant
* suggestions from PR
* fix comment
* removed unused imports
* added scripts to add close dates on prod
* optimization
* removed test script
* security: only auto resolve markets which are closed
* consistency checks
* re-added type check for binary markets
* moved check of probability into switch case block
* removed unused import
* auto resolution every minute
* auto resolution time optional
* pr fixes
* Migrate sellBet to v2
* Kill sellBet warmup requests
* Point client at new v2 sellbet function
* Clean up `getSellBetInfo`
* Fix up functions index.ts
* Revert "Revert "Notifications ux fixes - wip (#383)""
This reverts commit 699b03eb42.
* Group & provide more control over notification display
* UI/UX improvements
* Remove unused text key
* Refactor
* Refactor
* Show answer resolution in notification
* Disable eslint on single linefor exhaustive deps
* Handle arbritrary notifications
* Refactor
* Remove unused vars
* Add follow user
* Various UX improvements, add follow notif
* Various small ui changes
* Show notification settings breakdown
* Improve notification status lines
* refactoring
(cherry picked from commit 4de86d5b08)
* removed unused imports and variables
* added type for binary resolution
* Prettier
* const for binary resolutions
* using the type "resolution"
* Prettier
* Update functions/src/create-contract.ts
* launch config for debugging with vs code
* "Launch Chrome" does not work since login via google is not possible in debugger-chrome
* Breakpoints are unbound when attached to chrome
* 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
* Add tsconfig.json for common
* Prefer `const` over `let` over `var`
* Kill dead code
* Fix some trivial Typescript issues
* Turn on Typescript linting in common except for no-explicit-any
* Correctly specify tsconfig dir name in functions eslintrc
* Play with using 3 icons for 1-click usage
* Align bet icons with the percentages
* Hide liquidity injection star, for now
* Fix Free Response card layouts
* Use triangles instead of planes
* Set correct hover states the arrows
* Fix down triangle & padding
* Default large nums to 2 sigfigs
* Clean up hover areas
* Fix bet width, remove "chance/expected"
* Show "M$20" on hover, hide arrows when closed
* Improve click targets
* FR: "MULTI" => "MANY", single => "TOP"
* Install react-hot-toaster
* Implement quick betting on binary questions
* Handle different kinds of markets
* Extract out QuickBet into its own component
* Minor tweaks
* Visually separate out quick bet pane
* Hide quick bet for FR markets with no answers
* Fill in which bets the user has already placed
* Animate movements, fix binary direction
* Hover arrows are now always gray
* Pull out code into quick-bet.tsx
* Minor comments
* Fix import
ts-ignore is scary
* Fixes from James's feedback
* Hide text only on quickbet
* Improve typing of client CORS helper
* Take node-fetch as a dependency
* Add explicit Firebase region into config
* Add new Vercel proxy API routes that talk to backend
* Call Vercel proxy routes from `api-call` module
* Tweak import to try to get Vercel happy
* Tidy up a tiny bit
* Set common package.json sideEffects: false
* Configure SWC to modularize lodash imports
* Import specific lodash functions instead of _
* Add an eslint rule to avoid full lodash import
* Fix ultra embarrassing bug not restricting CORS origins
* Put CORS origin regexps in common
* Static types so I don't muck it up again
* Fixup CORS regex to be more strict
* Fix sloppy imports to actually work