From a9095c2c215275777fd2c8cbeef7f86a05a503f9 Mon Sep 17 00:00:00 2001 From: j4qfrost Date: Mon, 23 Sep 2024 13:05:15 -0700 Subject: [PATCH] Fix/remove wsl check (#337) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add failure condition test * Add test for HandleHTTPError (#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 <137817983+astrosnat@users.noreply.github.com> * add failure condition test (#282) * Creation of Market Price Projection API (#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 (#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 <137817983+astrosnat@users.noreply.github.com> * Frontend fixes (#286) * fix: fixed the market buttons not showing on mobile * fix: removed trade button on closed market --------- Co-authored-by: Patrick Delaney * Attempting toa ddress cors related security concern. (#298) * Drafting out reporting stats. * Add support for dependency injection to setup (#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 <137817983+astrosnat@users.noreply.github.com> Co-authored-by: Patrick Delaney Co-authored-by: Marko Kovač <124689071+markokovac16@users.noreply.github.com> Co-authored-by: Arthur <25300182+ajlacey@users.noreply.github.com> --- frontend/package-lock.json | 76 -------------------------------------- frontend/package.json | 1 - frontend/vite.config.mjs | 10 ----- 3 files changed, 87 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index e7e6c5b4..4b93ce08 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -27,7 +27,6 @@ "devDependencies": { "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "^10.4.17", - "is-wsl": "^3.1.0", "postcss": "^8.4.35", "tailwindcss": "^3.4.1", "vite": "^5.1.7" @@ -3007,22 +3006,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "dev": true, - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3053,25 +3036,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", @@ -3198,22 +3162,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-wsl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", - "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-inside-container": "^1.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", @@ -7024,12 +6972,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "dev": true - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -7051,15 +6993,6 @@ "is-extglob": "^2.1.1" } }, - "is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dev": true, - "requires": { - "is-docker": "^3.0.0" - } - }, "is-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", @@ -7138,15 +7071,6 @@ "get-intrinsic": "^1.1.1" } }, - "is-wsl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", - "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", - "dev": true, - "requires": { - "is-inside-container": "^1.0.0" - } - }, "isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", diff --git a/frontend/package.json b/frontend/package.json index 627514dc..dd861f37 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -52,7 +52,6 @@ "devDependencies": { "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "^10.4.17", - "is-wsl": "^3.1.0", "postcss": "^8.4.35", "tailwindcss": "^3.4.1", "vite": "^5.1.7" diff --git a/frontend/vite.config.mjs b/frontend/vite.config.mjs index aaea5cf5..99215350 100644 --- a/frontend/vite.config.mjs +++ b/frontend/vite.config.mjs @@ -1,21 +1,11 @@ import { defineConfig } from 'vite'; -import isWsl from 'is-wsl'; import react from '@vitejs/plugin-react'; export default defineConfig(() => { - let watchWSL = isWsl ? { - watch: { - usePolling: true, - interval: 500, - binaryInterval: 1000, - } - } : null; - return { build: { outDir: 'build', }, plugins: [react()], - server: watchWSL, }; });