Skip to content

Commit b1f62dc

Browse files
authored
Merge branch 'dev' into feat(web)/Extra-path-to-the-open-Notifications-and-Onboarding-miniguide
2 parents 39a5466 + 6e3a6a3 commit b1f62dc

File tree

106 files changed

+2839
-2363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2839
-2363
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ web_modules/
8383
.env.test
8484
.env.production
8585

86-
# parcel-bundler cache (https://parceljs.org/)
87-
.cache
88-
.parcel-cache
89-
9086
# Next.js build output
9187
.next
9288
out

contracts/.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ typings/
9696
.env
9797
.env.test
9898

99-
# parcel-bundler cache (https://parceljs.org/)
100-
.cache
101-
10299
# Next.js build output
103100
.next
104101

contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@types/chai": "^4.3.11",
7171
"@types/mocha": "^10.0.6",
7272
"@types/node": "^20.11.3",
73-
"@wagmi/cli": "^1.5.2",
73+
"@wagmi/cli": "^2.0.3",
7474
"abitype": "^0.10.3",
7575
"chai": "^4.4.1",
7676
"dotenv": "^16.3.1",

kleros-sdk/src/dataMappings/actions/fetchIpfsJsonAction.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import fetch from "node-fetch";
21
import { FetchIpfsJsonMapping } from "src/dataMappings/utils/actionTypes";
32
import { createResultObject } from "src/dataMappings/utils/createResultObject";
43
import { MAX_BYTE_SIZE } from "src/consts";

kleros-sdk/src/dataMappings/actions/subgraphAction.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import fetch from "node-fetch";
21
import { SubgraphMapping } from "../utils/actionTypes";
32
import { createResultObject } from "src/dataMappings/utils/createResultObject";
43

kleros-sdk/src/sdk.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import { createPublicClient, webSocket } from "viem";
22
import { arbitrumSepolia } from "viem/chains";
3-
import dotenv from "dotenv";
43

5-
dotenv.config();
6-
let ALCHEMY_API_KEY: string | undefined = process.env.ALCHEMY_API_KEY;
7-
let transport;
84
let publicClient;
95

106
export const configureSDK = (config: { apiKey?: string }) => {
117
if (config.apiKey) {
12-
ALCHEMY_API_KEY = config.apiKey;
13-
transport = webSocket(`wss://arb-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}`);
8+
const ALCHEMY_API_KEY = config.apiKey;
9+
const transport = webSocket(`wss://arb-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}`);
1410
publicClient = createPublicClient({
1511
chain: arbitrumSepolia,
1612
transport,

web/.env.devnet-neo.public

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ export REACT_APP_CORE_SUBGRAPH=https://api.studio.thegraph.com/query/61738/klero
44
export REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH=https://api.studio.thegraph.com/query/61738/kleros-v2-drt-arbisep-devnet/version/latest
55
export REACT_APP_STATUS_URL=https://kleros-v2-devnet.betteruptime.com/badge
66
export REACT_APP_GENESIS_BLOCK_ARBSEPOLIA=3084598
7-
export REACT_APP_ARBITRATOR_TYPE=neo
7+
export REACT_APP_ARBITRATOR_TYPE=neo
8+
export WALLETCONNECT_PROJECT_ID=
9+
export ALCHEMY_API_KEY=
10+
export NODE_OPTIONS='--max-old-space-size=7680'

web/.env.devnet-university.public

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ export REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH=https://api.studio.thegraph.com/query/6
55
export REACT_APP_STATUS_URL=https://kleros-v2-devnet.betteruptime.com/badge
66
export REACT_APP_GENESIS_BLOCK_ARBSEPOLIA=3084598
77
export REACT_APP_ARBITRATOR_TYPE=university
8+
export WALLETCONNECT_PROJECT_ID=
9+
export ALCHEMY_API_KEY=
10+
export NODE_OPTIONS='--max-old-space-size=7680'

web/.env.devnet.public

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ export REACT_APP_CORE_SUBGRAPH=https://api.studio.thegraph.com/query/61738/klero
44
export REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH=https://api.studio.thegraph.com/query/61738/kleros-v2-drt-arbisep-devnet/version/latest
55
export REACT_APP_STATUS_URL=https://kleros-v2-devnet.betteruptime.com/badge
66
export REACT_APP_GENESIS_BLOCK_ARBSEPOLIA=3084598
7+
export WALLETCONNECT_PROJECT_ID=
8+
export ALCHEMY_API_KEY=
9+
export NODE_OPTIONS='--max-old-space-size=7680'

web/.env.local.public

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
export REACT_APP_DEPLOYMENT=devnet
33
export REACT_APP_CORE_SUBGRAPH=http://localhost:8000/subgraphs/name/kleros/kleros-v2-core-local
44
export REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH=https://api.thegraph.com/subgraphs/name/alcercu/templateregistrydevnet
5+
export WALLETCONNECT_PROJECT_ID=
6+
export ALCHEMY_API_KEY=
7+
export NODE_OPTIONS='--max-old-space-size=7680'

web/.env.mainnet-neo.public

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ export REACT_APP_CORE_SUBGRAPH=https://api.studio.thegraph.com/query/61738/klero
44
export REACT_APP_DRT_ARBMAINNET_SUBGRAPH=https://api.studio.thegraph.com/query/61738/kleros-v2-drt/version/latest
55
export REACT_APP_STATUS_URL=https://kleros-v2-devnet.betteruptime.com/badge
66
export REACT_APP_GENESIS_BLOCK_ARBMAINNET=190274403
7-
export REACT_APP_ARBITRATOR_TYPE=neo
7+
export REACT_APP_ARBITRATOR_TYPE=neo
8+
export WALLETCONNECT_PROJECT_ID=
9+
export ALCHEMY_API_KEY=
10+
export NODE_OPTIONS='--max-old-space-size=7680'

web/.env.testnet.public

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ export REACT_APP_CORE_SUBGRAPH=https://api.studio.thegraph.com/query/61738/klero
44
export REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH=https://api.studio.thegraph.com/query/61738/kleros-v2-drt-arbisep-devnet/version/latest
55
export REACT_APP_STATUS_URL=https://kleros-v2.betteruptime.com/badge
66
export REACT_APP_GENESIS_BLOCK_ARBSEPOLIA=3842783
7+
export WALLETCONNECT_PROJECT_ID=
8+
export ALCHEMY_API_KEY=
9+
export NODE_OPTIONS='--max-old-space-size=7680'

web/.eslintrc.json

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,8 @@
4242
"version": "^16.12.0"
4343
},
4444
"import/resolver": {
45-
"parcel": {
46-
"rootDir": "src",
47-
"extensions": [
48-
".js",
49-
".jsx",
50-
".ts",
51-
".tsx",
52-
".svg",
53-
".png",
54-
".jpeg"
55-
]
45+
"typescript": {
46+
"project": "./tsconfig.json"
5647
}
5748
}
5849
},

web/.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
/.pnp.*
77
node_modules
88

9-
# Parcel
10-
.parcel-cache
9+
# vite
1110
development
1211
build
1312
dist
14-
parcel-bundle-reports
1513

1614
# misc
1715
.eslintcache

web/.parcelrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

web/netlify.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ YARN_ENABLE_GLOBAL_CACHE = "true"
99

1010
[functions]
1111
directory = "web/netlify/functions/"
12-
13-
[dev]
14-
framework = "parcel"

web/netlify/functions/authUser.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { createClient } from "@supabase/supabase-js";
44
import * as jwt from "jose";
55
import { SiweMessage } from "siwe";
66

7-
import { DEFAULT_CHAIN } from "consts/chains";
8-
import { ETH_SIGNATURE_REGEX } from "consts/index";
7+
import { ETH_SIGNATURE_REGEX, DEFAULT_CHAIN } from "consts/processEnvConsts";
98

109
import { netlifyUri, netlifyDeployUri, netlifyDeployPrimeUri } from "src/generatedNetlifyInfo.json";
1110
import { Database } from "src/types/supabase-notification";

web/netlify/functions/getNonce.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import middy from "@middy/core";
22
import { createClient } from "@supabase/supabase-js";
33
import { generateNonce } from "siwe";
44

5-
import { ETH_ADDRESS_REGEX } from "src/consts";
5+
import { ETH_ADDRESS_REGEX } from "consts/processEnvConsts";
66

7-
import { Database } from "../../src/types/supabase-notification";
7+
import { Database } from "src/types/supabase-notification";
88

99
const getNonce = async (event) => {
1010
try {

web/netlify/functions/update-settings.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import middy from "@middy/core";
22
import jsonBodyParser from "@middy/http-json-body-parser";
33
import { createClient } from "@supabase/supabase-js";
44

5-
import { EMAIL_REGEX, TELEGRAM_REGEX, ETH_ADDRESS_REGEX } from "../../src/consts/index";
6-
import { Database } from "../../src/types/supabase-notification";
5+
import { EMAIL_REGEX, TELEGRAM_REGEX, ETH_ADDRESS_REGEX } from "consts/processEnvConsts";
6+
7+
import { Database } from "src/types/supabase-notification";
8+
79
import { authMiddleware } from "../middleware/authMiddleware";
810

911
type NotificationSettings = {

web/package.json

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"repository": "",
77
"author": "",
88
"license": "MIT",
9+
"type": "module",
910
"alias": {
1011
"src": "./src",
1112
"utils": "./src/utils",
@@ -22,25 +23,21 @@
2223
"svgs": "./src/assets/svgs"
2324
},
2425
"packageManager": "yarn@4.0.2+sha256.825003a0f561ad09a3b1ac4a3b3ea6207af2796d54f62a9420520915721f5186",
25-
"volta": {
26-
"node": "20.11.0"
27-
},
2826
"scripts": {
29-
"clear": "rm -fr ../.parcel-cache dist/bundle.js",
3027
"start": "yarn start-devnet",
31-
"start-local": "scripts/runEnv.sh local 'yarn generate && parcel'",
32-
"start-devnet": "scripts/runEnv.sh devnet 'yarn generate && parcel'",
33-
"start-devnet-neo": "scripts/runEnv.sh devnet-neo 'yarn generate && parcel'",
34-
"start-devnet-university": "scripts/runEnv.sh devnet-university 'yarn generate && parcel'",
35-
"start-testnet": "scripts/runEnv.sh testnet 'yarn generate && parcel'",
36-
"start-mainnet-neo": "scripts/runEnv.sh mainnet-neo 'yarn generate && parcel'",
28+
"start-local": "scripts/runEnv.sh local 'yarn generate && vite'",
29+
"start-devnet": "scripts/runEnv.sh devnet 'yarn generate && vite'",
30+
"start-devnet-neo": "scripts/runEnv.sh devnet-neo 'yarn generate && vite'",
31+
"start-devnet-university": "scripts/runEnv.sh devnet-university 'yarn generate && vite'",
32+
"start-testnet": "scripts/runEnv.sh testnet 'yarn generate && vite'",
33+
"start-mainnet-neo": "scripts/runEnv.sh mainnet-neo 'yarn generate && vite'",
3734
"build": "yarn build-devnet",
38-
"build-local": "scripts/runEnv.sh local 'yarn generate && parcel build'",
39-
"build-devnet": "scripts/runEnv.sh devnet 'yarn generate && parcel build'",
40-
"build-devnet-neo": "scripts/runEnv.sh devnet-neo 'yarn generate && parcel build'",
41-
"build-testnet": "scripts/runEnv.sh testnet 'yarn generate && parcel build'",
42-
"build-mainnet-neo": "scripts/runEnv.sh mainnet-neo 'yarn generate && parcel build'",
43-
"build-netlify": "scripts/generateBuildInfo.sh && yarn generate && parcel build",
35+
"build-local": "scripts/runEnv.sh local 'yarn generate && vite build'",
36+
"build-devnet": "scripts/runEnv.sh devnet 'yarn generate && vite build'",
37+
"build-devnet-neo": "scripts/runEnv.sh devnet-neo 'yarn generate && vite build'",
38+
"build-testnet": "scripts/runEnv.sh testnet 'yarn generate && vite build'",
39+
"build-mainnet-neo": "scripts/runEnv.sh mainnet-neo 'yarn generate && vite build'",
40+
"build-netlify": "scripts/generateBuildInfo.sh && yarn generate && vite build",
4441
"check-style": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
4542
"check-types": "tsc --noEmit",
4643
"generate": "yarn generate:gql && yarn generate:hooks",
@@ -56,8 +53,6 @@
5653
"@kleros/kleros-v2-prettier-config": "workspace:^",
5754
"@kleros/kleros-v2-tsconfig": "workspace:^",
5855
"@netlify/functions": "^1.6.0",
59-
"@parcel/transformer-svg-react": "2.11.0",
60-
"@parcel/watcher": "~2.2.0",
6156
"@types/amqplib": "^0.10.4",
6257
"@types/busboy": "^1.5.3",
6358
"@types/react": "18.2.0",
@@ -66,16 +61,17 @@
6661
"@typescript-eslint/eslint-plugin": "^5.62.0",
6762
"@typescript-eslint/parser": "^5.62.0",
6863
"@typescript-eslint/utils": "^5.62.0",
69-
"@wagmi/cli": "^1.5.2",
64+
"@wagmi/cli": "^2.0.3",
7065
"eslint": "^8.56.0",
7166
"eslint-config-prettier": "^8.10.0",
72-
"eslint-import-resolver-parcel": "^1.10.6",
7367
"eslint-plugin-react": "^7.33.2",
7468
"eslint-plugin-react-hooks": "^4.6.0",
7569
"lru-cache": "^7.18.3",
76-
"parcel": "2.11.0",
7770
"supabase": "^1.133.3",
78-
"typescript": "^5.3.3"
71+
"typescript": "^5.3.3",
72+
"vite-plugin-node-polyfills": "^0.21.0",
73+
"vite-plugin-svgr": "^4.2.0",
74+
"vite-tsconfig-paths": "^4.3.2"
7975
},
8076
"dependencies": {
8177
"@filebase/client": "^0.0.5",
@@ -87,11 +83,10 @@
8783
"@sentry/react": "^7.93.0",
8884
"@sentry/tracing": "^7.93.0",
8985
"@supabase/supabase-js": "^2.39.3",
90-
"@tanstack/react-query": "^4.28.0",
86+
"@tanstack/react-query": "^5.40.1",
9187
"@tractors/lifi-sdk-parcel": "^2.5.3",
9288
"@types/react-modal": "^3.16.3",
93-
"@web3modal/ethereum": "^2.7.1",
94-
"@web3modal/react": "^2.7.1",
89+
"@web3modal/wagmi": "^4.1.10",
9590
"@yornaath/batshit": "^0.9.0",
9691
"amqplib": "^0.10.3",
9792
"chart.js": "^3.9.1",
@@ -120,7 +115,8 @@
120115
"siwe": "^2.3.1",
121116
"styled-components": "^5.3.11",
122117
"vanilla-jsoneditor": "^0.21.4",
123-
"viem": "^1.21.4",
124-
"wagmi": "^1.4.13"
118+
"viem": "^2.1.0",
119+
"vite": "^5.2.10",
120+
"wagmi": "^2.2.1"
125121
}
126122
}

web/scripts/gitInfo.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable max-len */
2-
const { execSync } = require("child_process");
3-
const fs = require("fs");
4-
const path = require("path");
2+
import { execSync } from "child_process";
3+
import fs from "fs";
4+
import path from "path";
55

6-
const packageJson = require("../package.json");
6+
import packageJson from "../package.json" assert { type: "json" };
77

88
const execSyncWrapper = (command) => {
99
let stdout = null;

web/src/app.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import GraphqlBatcherProvider from "context/GraphqlBatcher";
88
import IsListProvider from "context/IsListProvider";
99
import { NewDisputeProvider } from "context/NewDisputeContext";
1010
import QueryClientProvider from "context/QueryClientProvider";
11-
import RefetchOnBlock from "context/RefetchOnBlock";
1211
import StyledComponentsProvider from "context/StyledComponentsProvider";
1312
import Web3Provider from "context/Web3Provider";
1413

@@ -26,10 +25,9 @@ import { SentryRoutes } from "./utils/sentry";
2625
const App: React.FC = () => {
2726
return (
2827
<StyledComponentsProvider>
29-
<QueryClientProvider>
30-
<RefetchOnBlock />
31-
<GraphqlBatcherProvider>
32-
<Web3Provider>
28+
<Web3Provider>
29+
<QueryClientProvider>
30+
<GraphqlBatcherProvider>
3331
<IsListProvider>
3432
<NewDisputeProvider>
3533
<SentryRoutes>
@@ -46,9 +44,9 @@ const App: React.FC = () => {
4644
</SentryRoutes>
4745
</NewDisputeProvider>
4846
</IsListProvider>
49-
</Web3Provider>
50-
</GraphqlBatcherProvider>
51-
</QueryClientProvider>
47+
</GraphqlBatcherProvider>
48+
</QueryClientProvider>
49+
</Web3Provider>
5250
</StyledComponentsProvider>
5351
);
5452
};

web/src/assets/svgs/icons/book.svg

Lines changed: 2 additions & 2 deletions
Loading

web/src/assets/svgs/icons/bookmark.svg

Lines changed: 1 addition & 1 deletion
Loading

web/src/assets/svgs/icons/calendar.svg

Lines changed: 1 addition & 1 deletion
Loading

web/src/assets/svgs/icons/chat.svg

Lines changed: 1 addition & 1 deletion
Loading

web/src/assets/svgs/icons/law-balance.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)