Skip to content

Commit e1c77b9

Browse files
authored
Merge pull request #99 from Geo-Web-Project/build/env-vars
build: update env vars
2 parents 1b67b2f + a59f763 commit e1c77b9

5 files changed

Lines changed: 11 additions & 17 deletions

File tree

.env.mainnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ VITE_WORLD_ADDRESS =
33
VITE_WORLD_BLOCK_NUMBER =
44
VITE_GRAPH_URI = https://api.thegraph.com/subgraphs/name/geo-web-project/geo-web-subgraph
55
VITE_ANNUALRATE = 0.1
6-
VITE_IPFS_GATEWAY = https://ipfs.io
6+
VITE_IPFS_GATEWAY = https://gateway.ipfs.io
77
VITE_LIVEPEER_API_KEY=8cdf71bd-3f27-46e8-991b-411a0f75b91f

.env.testnet

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
VITE_NETWORK_ID = 11155420
22
VITE_WORLD_ADDRESS = 0x943e0b3F1926008f2e1bEFCBc55FA2A75CeC2452
33
VITE_WORLD_BLOCK_NUMBER = 6992231
4+
VITE_GRAPH_URI = https://api.studio.thegraph.com/query/51953/geo-web-op-sepolia/version/latest
45
VITE_ANNUALRATE = 0.1
5-
VITE_IPFS_GATEWAY = https://ipfs.io
6+
VITE_IPFS_GATEWAY = https://gateway.ipfs.io
67
VITE_LIVEPEER_API_KEY=8cdf71bd-3f27-46e8-991b-411a0f75b91f

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,15 @@
3535
"scripts": {
3636
"dev-https": "local-ssl-proxy --key localhost-key.pem --cert localhost.pem --source 3001 --target 3000",
3737
"build": "vite build --mode $APP_ENV",
38-
"dev": "vite --mode $APP_ENV",
38+
"dev": "source .env && vite --mode $APP_ENV",
3939
"preview": "vite preview",
4040
"test": "tsc --noEmit",
41+
"typecheck": "tsc --noEmit",
4142
"lint": "eslint src",
4243
"prettier": "prettier -w src/**"
4344
},
4445
"browserslist": {
45-
"production": [
46-
">0.2%",
47-
"not dead",
48-
"not op_mini all"
49-
],
46+
"production": [">0.2%", "not dead", "not op_mini all"],
5047
"development": [
5148
">0.2%",
5249
"not dead",

src/helpers/gwParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
const parseGeo = (msg) => {
77
let _geoId = { licenseOwner: null, parcelId: null };
88

9-
if (msg["data"]["geoWebParcels"].length == 0) {
9+
if (msg["data"]["geoWebParcels"].length === 0) {
1010
return _geoId;
1111
}
1212

src/lib/constants.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@ export const SECONDS_IN_YEAR = 60 * 60 * 24 * 365;
1414
export const LIVEPEER_API_KEY = import.meta.env.VITE_LIVEPEER_API_KEY!;
1515

1616
export const RPC_URLS_HTTP: Record<number, string> = {
17-
10: `https://opt-mainnet.g.alchemy.com/v2/${import.meta.env
18-
.VITE_ALCHEMY_MAINNET_API_KEY!}`,
19-
11155420: `https://opt-sepolia.g.alchemy.com/v2/${import.meta.env
20-
.VITE_ALCHEMY_TESTNET_API_KEY!}`,
17+
10: import.meta.env.VITE_RPC_URL_HTTP_MAINNET,
18+
11155420: import.meta.env.VITE_RPC_URL_HTTP_TESTNET,
2119
};
2220
export const RPC_URLS_WS: Record<number, string> = {
23-
10: `wss://opt-goerli.g.alchemy.com/v2/${import.meta.env
24-
.VITE_ALCHEMY_MAINNET_API_KEY!}`,
25-
11155420: `wss://opt-sepolia.g.alchemy.com/v2/${import.meta.env
26-
.VITE_ALCHEMY_TESTNET_API_KEY!}`,
21+
10: import.meta.env.VITE_RPC_URL_WS_MAINNET,
22+
11155420: import.meta.env.VITE_RPC_URL_WS_TESTNET,
2723
};

0 commit comments

Comments
 (0)