Skip to content

Commit bd121e1

Browse files
committed
refactor(web): rename-arbitrator-type-to-get-arbitrator-type
1 parent e3eec16 commit bd121e1

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

web/.env.devnet.public

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ 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"

web/src/consts/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export const ETH_SIGNATURE_REGEX = /^0x[a-fA-F0-9]{130}$/;
2828

2929
export const isProductionDeployment = () => process.env.REACT_APP_DEPLOYMENT === "mainnet";
3030

31-
export const isKlerosUniversity = () => arbitratorType() === ArbitratorTypes.university;
32-
export const isKlerosNeo = () => arbitratorType() === ArbitratorTypes.neo;
33-
export const arbitratorType = (): ArbitratorTypes =>
31+
export const isKlerosUniversity = () => getArbitratorType() === ArbitratorTypes.university;
32+
export const isKlerosNeo = () => getArbitratorType() === ArbitratorTypes.neo;
33+
export const getArbitratorType = (): ArbitratorTypes =>
3434
ArbitratorTypes[process.env.REACT_APP_ARBITRATOR_TYPE?.toLowerCase() ?? "vanilla"];
3535

3636
export const GENESIS_BLOCK_ARBSEPOLIA = BigInt(process.env.REACT_APP_GENESIS_BLOCK_ARBSEPOLIA ?? 0);

web/src/layout/Header/Logo.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
55

66
import KlerosCourtLogo from "svgs/header/kleros-court.svg";
77

8-
import { arbitratorType, ArbitratorTypes } from "consts/index";
8+
import { ArbitratorTypes, getArbitratorType } from "consts/index";
99
import { isUndefined } from "utils/index";
1010

1111
const Container = styled.div`
@@ -33,10 +33,10 @@ const BadgeText = styled.label`
3333

3434
const CourtBadge: React.FC = () => {
3535
const { text, color } = useMemo<{ text?: string; color?: keyof Theme }>(() => {
36-
switch (arbitratorType()) {
37-
case ArbitratorTypes["neo"]:
36+
switch (getArbitratorType()) {
37+
case ArbitratorTypes.neo:
3838
return { text: "Neo", color: "paleCyan" };
39-
case ArbitratorTypes["university"]:
39+
case ArbitratorTypes.university:
4040
return { text: "Uni", color: "limeGreen" };
4141
}
4242
return {};

web/wagmi.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Abi } from "viem";
1010
import IArbitrableV2 from "@kleros/kleros-v2-contracts/artifacts/src/arbitration/interfaces/IArbitrableV2.sol/IArbitrableV2.json" assert { type: "json" };
1111
import IHomeGateway from "@kleros/kleros-v2-contracts/artifacts/src/gateway/interfaces/IHomeGateway.sol/IHomeGateway.json" assert { type: "json" };
1212

13-
import { ArbitratorTypes, arbitratorType } from "src/consts";
13+
import { ArbitratorTypes, getArbitratorType } from "src/consts";
1414

1515
dotenv.config();
1616

@@ -71,7 +71,7 @@ const readArtifacts = async (type: ArbitratorTypes, viemChainName: string, hardh
7171

7272
const getConfig = async (): Promise<Config> => {
7373
const deployment = process.env.REACT_APP_DEPLOYMENT ?? "testnet";
74-
const type = arbitratorType();
74+
const type = getArbitratorType();
7575

7676
let viemNetwork: string;
7777
let hardhatNetwork: string;

0 commit comments

Comments
 (0)