Skip to content

Commit 7d7fb3b

Browse files
committed
fix: minor
1 parent baefb75 commit 7d7fb3b

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

cspell.json

+3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
],
1111
"words": [
1212
"arbitrum",
13+
"ARBMAINNET",
14+
"ARBSEPOLIA",
1315
"autorestart",
16+
"CHAINID",
1417
"codegen",
1518
"commify",
1619
"commitlint",

web/src/consts/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ export const TELEGRAM_REGEX = /^@\w{5,32}$/;
2626
export const ETH_ADDRESS_REGEX = /^0x[a-fA-F0-9]{40}$/;
2727
export const ETH_SIGNATURE_REGEX = /^0x[a-fA-F0-9]{130}$/;
2828

29-
export const GENESIS_BLOCK_ARBSEPOLIA = BigInt(process.env.REACT_APP_GENESIS_BLOCK_ARBSEPOLIA ?? 0);
30-
export const GENESIS_BLOCK_ARBMAINNET = BigInt(process.env.REACT_APP_GENESIS_BLOCK_ARBMAINNET ?? 0);
31-
export const genesisBlock = () => (isProductionDeployment() ? GENESIS_BLOCK_ARBMAINNET : GENESIS_BLOCK_ARBSEPOLIA);
32-
3329
export const isProductionDeployment = () => process.env.REACT_APP_DEPLOYMENT === "mainnet";
3430
export const isUniversityCourt = () => process.env.REACT_APP_UNIVERSITY_COURT?.toLowerCase() === "true";
3531
export const isNeoCourt = () => process.env.REACT_APP_NEO_COURT?.toLowerCase() === "true";
3632
export const whichCourt = () => (isUniversityCourt() ? COURTS.university : isNeoCourt() ? COURTS.neo : COURTS.vanilla);
3733

34+
export const GENESIS_BLOCK_ARBSEPOLIA = BigInt(process.env.REACT_APP_GENESIS_BLOCK_ARBSEPOLIA ?? 0);
35+
export const GENESIS_BLOCK_ARBMAINNET = BigInt(process.env.REACT_APP_GENESIS_BLOCK_ARBMAINNET ?? 0);
36+
export const genesisBlock = () => (isProductionDeployment() ? GENESIS_BLOCK_ARBMAINNET : GENESIS_BLOCK_ARBSEPOLIA);
37+
3838
export const INVALID_DISPUTE_DATA_ERROR = `The dispute data is not valid, please vote "Refuse to arbitrate"`;
3939
export const RPC_ERROR = `RPC Error: Unable to fetch dispute data. Please avoid voting.`;

web/src/utils/getGraphqlUrl.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { DEFAULT_CHAIN } from "src/consts/chains";
33

44
const CHAINID_TO_DISPUTE_TEMPLATE_SUBGRAPH = {
55
[arbitrumSepolia.id]:
6-
process.env.REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH ?? "Wrong Subgraph URL. Please check the environment variables.",
6+
process.env.REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH ?? "Environment variables REACT_APP_DRT_ARBSEPOLIA_SUBGRAPH not set.",
77
[arbitrum.id]:
8-
process.env.REACT_APP_DRT_ARBMAINNET_SUBGRAPH ?? "Wrong Subgraph URL. Please check the environment variables.",
8+
process.env.REACT_APP_DRT_ARBMAINNET_SUBGRAPH ?? "Environment variables REACT_APP_DRT_ARBMAINNET_SUBGRAPH not set.",
99
};
1010

1111
export const getGraphqlUrl = (isDisputeTemplate = false, chainId: number = DEFAULT_CHAIN) => {
12-
const coreUrl = process.env.REACT_APP_CORE_SUBGRAPH ?? "Wrong Subgraph URL. Please check the environment variables.";
12+
const coreUrl = process.env.REACT_APP_CORE_SUBGRAPH ?? "Environment variables REACT_APP_CORE_SUBGRAPH not set.";
1313
return isDisputeTemplate ? CHAINID_TO_DISPUTE_TEMPLATE_SUBGRAPH[chainId] : coreUrl;
1414
};

0 commit comments

Comments
 (0)