Skip to content

Commit 318d311

Browse files
committed
chore(web): remove-neo-references
1 parent 4330108 commit 318d311

File tree

11 files changed

+16
-46
lines changed

11 files changed

+16
-46
lines changed

web/.env.devnet-neo.public

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

web/.env.mainnet-neo.public

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

web/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@
2727
"start": "yarn start-devnet",
2828
"start-local": "scripts/runEnv.sh local 'yarn generate && vite'",
2929
"start-devnet": "scripts/runEnv.sh devnet 'yarn generate && vite'",
30-
"start-devnet-neo": "scripts/runEnv.sh devnet-neo 'yarn generate && vite'",
3130
"start-devnet-university": "scripts/runEnv.sh devnet-university 'yarn generate && vite'",
3231
"start-testnet": "scripts/runEnv.sh testnet 'yarn generate && vite'",
33-
"start-mainnet-neo": "scripts/runEnv.sh mainnet-neo 'yarn generate && vite'",
32+
"start-mainnet": "scripts/runEnv.sh mainnet 'yarn generate && vite'",
3433
"build": "yarn build-devnet",
3534
"build-local": "scripts/runEnv.sh local 'yarn generate && vite build'",
3635
"build-devnet": "scripts/runEnv.sh devnet 'yarn generate && vite build'",
37-
"build-devnet-neo": "scripts/runEnv.sh devnet-neo 'yarn generate && vite build'",
3836
"build-devnet-university": "scripts/runEnv.sh devnet-university 'yarn generate && vite build'",
3937
"build-testnet": "scripts/runEnv.sh testnet 'yarn generate && vite build'",
40-
"build-mainnet-neo": "scripts/runEnv.sh mainnet-neo 'yarn generate && vite build'",
38+
"build-mainnet": "scripts/runEnv.sh mainnet 'yarn generate && vite build'",
4139
"build-netlify": "scripts/generateBuildInfo.sh && yarn generate && vite build",
4240
"check-style": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
4341
"check-types": "tsc --noEmit",

web/scripts/runEnv.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ shift
1010
commands="$*"
1111

1212
if [[ -z "$deployment" ]]; then
13-
echo "usage: $(basename "$0") <local|devnet|devnet-neo|devnet-university|testnet|mainnet-neo>"
13+
echo "usage: $(basename "$0") <local|devnet|devnet-university|testnet|mainnet>"
1414
exit 1
1515
fi
1616

17-
valid_deployments=("local" "devnet" "devnet-neo" "devnet-university" "testnet" "mainnet-neo")
17+
valid_deployments=("local" "devnet" "devnet-university" "testnet" "mainnet")
1818
if [[ ! " ${valid_deployments[*]} " =~ ${deployment} ]]; then
1919
echo "Invalid deployment option. Please choose either: ${valid_deployments[*]}."
2020
exit 1

web/src/consts/arbitratorTypes.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export enum ArbitratorTypes {
22
vanilla,
33
university,
4-
neo,
54
}
65

76
export const getArbitratorType = (id: keyof typeof ArbitratorTypes = "vanilla"): ArbitratorTypes => ArbitratorTypes[id];

web/src/consts/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export const isProductionDeployment = () => import.meta.env.REACT_APP_DEPLOYMENT
3232
export const isTestnetDeployment = () => import.meta.env.REACT_APP_DEPLOYMENT === "testnet";
3333

3434
export const isKlerosUniversity = () => getArbitratorType() === ArbitratorTypes.university;
35-
export const isKlerosNeo = () => getArbitratorType() === ArbitratorTypes.neo;
3635
export const getArbitratorType = (): ArbitratorTypes =>
3736
_getArbitratorType(import.meta.env.REACT_APP_ARBITRATOR_TYPE?.toLowerCase());
3837

web/src/consts/processEnvConsts.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const HERMES_TELEGRAM_BOT_URL =
1313
process.env.REACT_APP_HERMES_TELEGRAM_BOT_URL || "https://t.me/HermesTheKlerosV2MessengerBot";
1414

1515
// https://www.w3.org/TR/2012/WD-html-markup-20120329/input.email.html#input.email.attrs.value.single
16-
// eslint-disable-next-line security/detect-unsafe-regex
16+
1717
export const EMAIL_REGEX = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
1818
export const TELEGRAM_REGEX = /^@\w{5,32}$/;
1919
export const ETH_ADDRESS_REGEX = /^0x[a-fA-F0-9]{40}$/;
@@ -22,7 +22,6 @@ export const ETH_SIGNATURE_REGEX = /^0x([a-fA-F0-9]{130})+$|^0x$/;
2222
export const isProductionDeployment = () => process.env.REACT_APP_DEPLOYMENT === "mainnet";
2323

2424
export const isKlerosUniversity = () => getArbitratorType() === ArbitratorTypes.university;
25-
export const isKlerosNeo = () => getArbitratorType() === ArbitratorTypes.neo;
2625
export const getArbitratorType = (): ArbitratorTypes =>
2726
_getArbitratorType(process.env.REACT_APP_ARBITRATOR_TYPE?.toLowerCase());
2827

web/src/hooks/useGenesisBlock.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useEffect, useState } from "react";
2-
import { isKlerosNeo, isKlerosUniversity, isTestnetDeployment } from "~src/consts";
2+
3+
import { isKlerosUniversity, isProductionDeployment, isTestnetDeployment } from "src/consts";
34

45
/**
56
* @returns genesis block for kleros core contract
@@ -11,8 +12,8 @@ const useGenesisBlock = () => {
1112
import("@kleros/kleros-v2-contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json").then((json) =>
1213
setGenesisBlock(json.receipt.blockNumber)
1314
);
14-
} else if (isKlerosNeo()) {
15-
import("@kleros/kleros-v2-contracts/deployments/arbitrum/KlerosCoreNeo.json").then((json) =>
15+
} else if (isProductionDeployment()) {
16+
import("@kleros/kleros-v2-contracts/deployments/arbitrum/KlerosCore.json").then((json) =>
1617
setGenesisBlock(json.receipt.blockNumber)
1718
);
1819
} else if (isTestnetDeployment()) {

web/src/hooks/useSpamEvidence.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useQuery } from "@tanstack/react-query";
22
import { gql, request } from "graphql-request";
33

4-
import { isKlerosNeo, isKlerosUniversity, isTestnetDeployment } from "src/consts";
4+
import { isKlerosUniversity, isProductionDeployment, isTestnetDeployment } from "src/consts";
55
import { isUndefined } from "src/utils";
66

77
const spamEvidenceQuery = gql`
@@ -19,7 +19,8 @@ type SpamEvidences = {
1919
const getAtlasDeployment = () => {
2020
if (isKlerosUniversity()) {
2121
return "university";
22-
} else if (isKlerosNeo()) {
22+
// TODO: remove "beta" reference from Atlas, to be replaced with mainnet (env dependent)
23+
} else if (isProductionDeployment()) {
2324
return "beta";
2425
} else if (isTestnetDeployment()) {
2526
return "testnet";

web/src/layout/Header/Logo.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import React, { useMemo } from "react";
22
import styled, { Theme } from "styled-components";
33

4-
import { hoverShortTransitionTiming } from "styles/commonStyles";
5-
64
import { Link } from "react-router-dom";
75

8-
import { ArbitratorTypes, getArbitratorType } from "consts/index";
6+
import KlerosCourtLogo from "svgs/header/kleros-court.svg";
97

8+
import { ArbitratorTypes, getArbitratorType } from "consts/index";
109
import { isUndefined } from "utils/index";
1110

12-
import KlerosCourtLogo from "svgs/header/kleros-court.svg";
11+
import { hoverShortTransitionTiming } from "styles/commonStyles";
1312

1413
const Container = styled.div`
1514
display: flex;
@@ -45,8 +44,6 @@ const StyledKlerosCourtLogo = styled(KlerosCourtLogo)`
4544
const CourtBadge: React.FC = () => {
4645
const { text, color } = useMemo<{ text?: string; color?: keyof Theme }>(() => {
4746
switch (getArbitratorType()) {
48-
case ArbitratorTypes.neo:
49-
return { text: "Beta", color: "paleCyan" };
5047
case ArbitratorTypes.university:
5148
return { text: "Uni", color: "limeGreen" };
5249
}

0 commit comments

Comments
 (0)