-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/migrate to deno #410
base: main
Are you sure you want to change the base?
Feature/migrate to deno #410
Conversation
undelete
Now using go 1.23! Tested this on dev, it works
Prints initial settings as defined in setup.yaml. Added for usability reasons - users keep getting confused about account balance and maximum allowable debt
* add test for HandleHTTPError undelete * more verbose http codes * Update Dockerfile Now using go 1.23! Tested this on dev, it works * Update compose_dev.sh Prints initial settings as defined in setup.yaml. Added for usability reasons - users keep getting confused about account balance and maximum allowable debt * add failure condition test * formatting and test standards --------- Co-authored-by: Osnat Katz Moon <[email protected]>
* Moving test to appropriate location. * Updating, including moving test location. Test not passing due to precision error but generally passing on the terminal up to 6 dits. * market projection handler, not working. * Update market projected probability. * Safe uint conversion. * Updating, adding noop change to push into pipeline. * Update, test passing. * Update, attempting to solve type converstion uint problem. * Adding projected market layout. * Update, still have react JSON parse error but layout added to buyshares. * Market projection updates on buy shares side, upon button press. * Update, change printf to print.
* Drafting out fees deduction functions and capability. * Attempting working version of initialBetFee function. * Draft adding fees. * Update, adding tests. * Adding working test for GetBetsForMarket * Successful fee util test. * Fees added on backend, tests passing. * Updating such that user record submitted. However fee summing not working yet evidently. * Working fees, at least initial fees. * Updating test scenario passing, made more clear. * Update Dockerfile We need to switch to 3.0.14-1~deb12u2 * Removing logging. * Adding fees, including communicating fees on front end. * totalBetCount to userBetCount so as not to misconstrue meaning. * Simplifying function, test passed. * Simplifying naming. * Updating new function name in test * Changing test to got before want convention. * Update marketid variable * Add combined fee structure for more througough test. * Reverting sale amount to 1 share. * Reversing got want --------- Co-authored-by: Osnat Katz Moon <[email protected]>
* fix: fixed the market buttons not showing on mobile * fix: removed trade button on closed market --------- Co-authored-by: Patrick Delaney <[email protected]>
* add failure condition test * Add test for HandleHTTPError (openpredictionmarkets#278) * add test for HandleHTTPError undelete * more verbose http codes * Update Dockerfile Now using go 1.23! Tested this on dev, it works * Update compose_dev.sh Prints initial settings as defined in setup.yaml. Added for usability reasons - users keep getting confused about account balance and maximum allowable debt * add failure condition test * formatting and test standards --------- Co-authored-by: Osnat Katz Moon <[email protected]> * add failure condition test (openpredictionmarkets#282) * Creation of Market Price Projection API (openpredictionmarkets#277) * Moving test to appropriate location. * Updating, including moving test location. Test not passing due to precision error but generally passing on the terminal up to 6 dits. * market projection handler, not working. * Update market projected probability. * Safe uint conversion. * Updating, adding noop change to push into pipeline. * Update, test passing. * Update, attempting to solve type converstion uint problem. * Adding projected market layout. * Update, still have react JSON parse error but layout added to buyshares. * Market projection updates on buy shares side, upon button press. * Update, change printf to print. * Create SECURITY.md * Adding Fees to Buying and Selling Bets (openpredictionmarkets#287) * Drafting out fees deduction functions and capability. * Attempting working version of initialBetFee function. * Draft adding fees. * Update, adding tests. * Adding working test for GetBetsForMarket * Successful fee util test. * Fees added on backend, tests passing. * Updating such that user record submitted. However fee summing not working yet evidently. * Working fees, at least initial fees. * Updating test scenario passing, made more clear. * Update Dockerfile We need to switch to 3.0.14-1~deb12u2 * Removing logging. * Adding fees, including communicating fees on front end. * totalBetCount to userBetCount so as not to misconstrue meaning. * Simplifying function, test passed. * Simplifying naming. * Updating new function name in test * Changing test to got before want convention. * Update marketid variable * Add combined fee structure for more througough test. * Reverting sale amount to 1 share. * Reversing got want --------- Co-authored-by: Osnat Katz Moon <[email protected]> * Frontend fixes (openpredictionmarkets#286) * fix: fixed the market buttons not showing on mobile * fix: removed trade button on closed market --------- Co-authored-by: Patrick Delaney <[email protected]> * Attempting toa ddress cors related security concern. (openpredictionmarkets#298) * Drafting out reporting stats. * Add support for dependency injection to setup (openpredictionmarkets#301) * Make EconomicsConfig from component structs Auto initialize config Add support to inject config Add support for testing the setup through test doubles Use new fee for placing bets (EachBetFee) * remove wsl check * remove watcher --------- Co-authored-by: Osnat Katz Moon <[email protected]> Co-authored-by: Patrick Delaney <[email protected]> Co-authored-by: Marko Kovač <[email protected]> Co-authored-by: Arthur <[email protected]>
* add test for HandleHTTPError undelete * more verbose http codes * Update Dockerfile Now using go 1.23! Tested this on dev, it works * Update compose_dev.sh Prints initial settings as defined in setup.yaml. Added for usability reasons - users keep getting confused about account balance and maximum allowable debt * add failure condition test * formatting and test standards * add frontend file polling for wsl2 * Add test for HandleHTTPError (openpredictionmarkets#278) * add test for HandleHTTPError undelete * more verbose http codes * Update Dockerfile Now using go 1.23! Tested this on dev, it works * Update compose_dev.sh Prints initial settings as defined in setup.yaml. Added for usability reasons - users keep getting confused about account balance and maximum allowable debt * add failure condition test * formatting and test standards --------- Co-authored-by: Osnat Katz Moon <[email protected]> * add failure condition test (openpredictionmarkets#282) * Creation of Market Price Projection API (openpredictionmarkets#277) * Moving test to appropriate location. * Updating, including moving test location. Test not passing due to precision error but generally passing on the terminal up to 6 dits. * market projection handler, not working. * Update market projected probability. * Safe uint conversion. * Updating, adding noop change to push into pipeline. * Update, test passing. * Update, attempting to solve type converstion uint problem. * Adding projected market layout. * Update, still have react JSON parse error but layout added to buyshares. * Market projection updates on buy shares side, upon button press. * Update, change printf to print. * Create SECURITY.md * Adding Fees to Buying and Selling Bets (openpredictionmarkets#287) * Drafting out fees deduction functions and capability. * Attempting working version of initialBetFee function. * Draft adding fees. * Update, adding tests. * Adding working test for GetBetsForMarket * Successful fee util test. * Fees added on backend, tests passing. * Updating such that user record submitted. However fee summing not working yet evidently. * Working fees, at least initial fees. * Updating test scenario passing, made more clear. * Update Dockerfile We need to switch to 3.0.14-1~deb12u2 * Removing logging. * Adding fees, including communicating fees on front end. * totalBetCount to userBetCount so as not to misconstrue meaning. * Simplifying function, test passed. * Simplifying naming. * Updating new function name in test * Changing test to got before want convention. * Update marketid variable * Add combined fee structure for more througough test. * Reverting sale amount to 1 share. * Reversing got want --------- Co-authored-by: Osnat Katz Moon <[email protected]> * Frontend fixes (openpredictionmarkets#286) * fix: fixed the market buttons not showing on mobile * fix: removed trade button on closed market --------- Co-authored-by: Patrick Delaney <[email protected]> * Attempting toa ddress cors related security concern. (openpredictionmarkets#298) * Drafting out reporting stats. * Add support for dependency injection to setup (openpredictionmarkets#301) * Make EconomicsConfig from component structs Auto initialize config Add support to inject config Add support for testing the setup through test doubles Use new fee for placing bets (EachBetFee) * revert * feat(frontend): Compiles frontend into single js file for performance * forgot merge --------- Co-authored-by: Osnat Katz Moon <[email protected]> Co-authored-by: Patrick Delaney <[email protected]> Co-authored-by: Marko Kovač <[email protected]> Co-authored-by: Arthur <[email protected]>
Bumps the npm_and_yarn group with 3 updates in the /frontend directory: [path-to-regexp](https://github.com/pillarjs/path-to-regexp), [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) and [micromatch](https://github.com/micromatch/micromatch). Updates `path-to-regexp` from 1.8.0 to 8.2.0 - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](pillarjs/path-to-regexp@v1.8.0...v8.2.0) Updates `rollup` from 4.12.0 to 4.24.4 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](rollup/rollup@v4.12.0...v4.24.4) Updates `vite` from 5.1.7 to 5.4.10 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.10/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.10/packages/vite) Updates `micromatch` from 4.0.5 to 4.0.8 - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md) - [Commits](micromatch/micromatch@4.0.5...4.0.8) --- updated-dependencies: - dependency-name: path-to-regexp dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: rollup dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: vite dependency-type: direct:development dependency-group: npm_and_yarn - dependency-name: micromatch dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <[email protected]>
Feature/migrate to deno
@@ -51,7 +52,7 @@ jobs: | |||
uses: treosh/lighthouse-ci-action@v12 | |||
with: | |||
urls: | | |||
https://openprediction.xyz/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to figure this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was messing me up when testing.
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; | ||
http2 on; | ||
http3 on; | ||
http3_hq on; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some browser optimizations, need to recompile a custom version of nginx to leverage caching.
location / { | ||
proxy_pass http://frontend:80; | ||
add_header Alt-Svc 'h3=":$server_port"; ma=86400'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed for http3
const noButtonHoverStyle = `bg-red-btn-hover hover:bg-red-btn`; | ||
const neutralButtonStyle = `bg-neutral-btn hover:bg-neutral-btn-hover`; | ||
const neutralButtonHoverStyle = `bg-neutral-btn-hover hover:bg-neutral-btn`; | ||
// const yesButtonStyle = `bg-green-btn hover:bg-green-btn-hover`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused
… into feature/migrate_to_deno
… into feature/migrate_to_deno
frontend/Dockerfile
Outdated
@@ -1,5 +1,5 @@ | |||
# syntax=docker/dockerfile:1.3-labs | |||
FROM node:22.4.0 | |||
FROM deno:lastest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deno:lastest
doesn't exist, going to change to deno:latest
and try again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to deno.lock
rather than package-lock.json
When trying to build on local, I can now build ok after changing |
Some deno changes:
Upgrades:
Linting:
CI fixes: