Skip to content

Commit

Permalink
build: update env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
tnrdd committed Feb 28, 2024
1 parent 1b67b2f commit a59f763
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .env.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ VITE_WORLD_ADDRESS =
VITE_WORLD_BLOCK_NUMBER =
VITE_GRAPH_URI = https://api.thegraph.com/subgraphs/name/geo-web-project/geo-web-subgraph
VITE_ANNUALRATE = 0.1
VITE_IPFS_GATEWAY = https://ipfs.io
VITE_IPFS_GATEWAY = https://gateway.ipfs.io
VITE_LIVEPEER_API_KEY=8cdf71bd-3f27-46e8-991b-411a0f75b91f
3 changes: 2 additions & 1 deletion .env.testnet
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
VITE_NETWORK_ID = 11155420
VITE_WORLD_ADDRESS = 0x943e0b3F1926008f2e1bEFCBc55FA2A75CeC2452
VITE_WORLD_BLOCK_NUMBER = 6992231
VITE_GRAPH_URI = https://api.studio.thegraph.com/query/51953/geo-web-op-sepolia/version/latest
VITE_ANNUALRATE = 0.1
VITE_IPFS_GATEWAY = https://ipfs.io
VITE_IPFS_GATEWAY = https://gateway.ipfs.io
VITE_LIVEPEER_API_KEY=8cdf71bd-3f27-46e8-991b-411a0f75b91f
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,15 @@
"scripts": {
"dev-https": "local-ssl-proxy --key localhost-key.pem --cert localhost.pem --source 3001 --target 3000",
"build": "vite build --mode $APP_ENV",
"dev": "vite --mode $APP_ENV",
"dev": "source .env && vite --mode $APP_ENV",
"preview": "vite preview",
"test": "tsc --noEmit",
"typecheck": "tsc --noEmit",
"lint": "eslint src",
"prettier": "prettier -w src/**"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"production": [">0.2%", "not dead", "not op_mini all"],
"development": [
">0.2%",
"not dead",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/gwParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
const parseGeo = (msg) => {
let _geoId = { licenseOwner: null, parcelId: null };

if (msg["data"]["geoWebParcels"].length == 0) {
if (msg["data"]["geoWebParcels"].length === 0) {
return _geoId;
}

Expand Down
12 changes: 4 additions & 8 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ export const SECONDS_IN_YEAR = 60 * 60 * 24 * 365;
export const LIVEPEER_API_KEY = import.meta.env.VITE_LIVEPEER_API_KEY!;

export const RPC_URLS_HTTP: Record<number, string> = {
10: `https://opt-mainnet.g.alchemy.com/v2/${import.meta.env
.VITE_ALCHEMY_MAINNET_API_KEY!}`,
11155420: `https://opt-sepolia.g.alchemy.com/v2/${import.meta.env
.VITE_ALCHEMY_TESTNET_API_KEY!}`,
10: import.meta.env.VITE_RPC_URL_HTTP_MAINNET,
11155420: import.meta.env.VITE_RPC_URL_HTTP_TESTNET,
};
export const RPC_URLS_WS: Record<number, string> = {
10: `wss://opt-goerli.g.alchemy.com/v2/${import.meta.env
.VITE_ALCHEMY_MAINNET_API_KEY!}`,
11155420: `wss://opt-sepolia.g.alchemy.com/v2/${import.meta.env
.VITE_ALCHEMY_TESTNET_API_KEY!}`,
10: import.meta.env.VITE_RPC_URL_WS_MAINNET,
11155420: import.meta.env.VITE_RPC_URL_WS_TESTNET,
};

0 comments on commit a59f763

Please sign in to comment.