From b74e709618695bd5229e2669c5921615740d94f5 Mon Sep 17 00:00:00 2001 From: Sumbat Date: Sun, 27 Apr 2025 12:12:58 +0300 Subject: [PATCH] fix: holesky sunset --- .env.development | 2 +- .github/workflows/build_deploy.yml | 48 +++---- .../Announcement/HoleskySunsetBanner.tsx | 124 ------------------ src/app/common/components/AppBar/AppBar.tsx | 2 - .../NetworkSelect/NetworkSelect.tsx | 7 +- src/lib/utils/ChainService.ts | 4 +- 6 files changed, 27 insertions(+), 160 deletions(-) delete mode 100644 src/app/common/components/Announcement/HoleskySunsetBanner.tsx diff --git a/.env.development b/.env.development index 51335b58..74855f6d 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ REACT_APP_DEBUG=true -REACT_APP_API_BASE_URL=https://api.stage.ops.ssvlabsinternal.com/api/v4/holesky +REACT_APP_API_BASE_URL=https://api.stage.ops.ssvlabsinternal.com/api/v4/hoodi REACT_APP_LINK_SSV_WEBAPP=https://app.stage.ssv.network/ REACT_APP_GOOGLE_TAG_SECRET= REACT_APP_GOOGLE_TAG_URL= diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 5d4d6908..21dbc496 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -95,30 +95,30 @@ jobs: # # - - name: Run prod testnet build - if: github.ref == 'refs/heads/main' - env: - NODE_OPTIONS: '--openssl-legacy-provider' - API_BASE_URL: ${{ secrets.PROD_API_BASE_URL_V4_HOLESKY }} - ANNOUNCEMENT: ${{ secrets.PROD_ANNOUNCEMENT_V4_HOLESKY }} - LINK_SSV_WEBAPP: ${{ secrets.PROD_LINK_SSV_WEBAPP_V4 }} - GOOGLE_TAG_SECRET: ${{ secrets.PROD_GOOGLE_TAG_SECRET_V4_TESTNET }} - MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN_PROD }} - run: pnpm build - - - name: Deploy prod testnet - if: github.ref == 'refs/heads/main' - uses: jakejarvis/s3-sync-action@v0.5.0 - with: - args: --acl public-read --follow-symlinks --delete - env: - NODE_OPTIONS: '--openssl-legacy-provider' - AWS_S3_BUCKET: ${{ secrets.PROD_AWS_S3_BUCKET_V4_HOLESKY }} - ANNOUNCEMENT: ${{ secrets.PROD_ANNOUNCEMENT_V4_HOLESKY }} - AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_SECRET_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: 'us-west-2' - SOURCE_DIR: 'build/' + # - name: Run prod testnet build + # if: github.ref == 'refs/heads/main' + # env: + # NODE_OPTIONS: '--openssl-legacy-provider' + # API_BASE_URL: ${{ secrets.PROD_API_BASE_URL_V4_HOLESKY }} + # ANNOUNCEMENT: ${{ secrets.PROD_ANNOUNCEMENT_V4_HOLESKY }} + # LINK_SSV_WEBAPP: ${{ secrets.PROD_LINK_SSV_WEBAPP_V4 }} + # GOOGLE_TAG_SECRET: ${{ secrets.PROD_GOOGLE_TAG_SECRET_V4_TESTNET }} + # MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN_PROD }} + # run: pnpm build + + # - name: Deploy prod testnet + # if: github.ref == 'refs/heads/main' + # uses: jakejarvis/s3-sync-action@v0.5.0 + # with: + # args: --acl public-read --follow-symlinks --delete + # env: + # NODE_OPTIONS: '--openssl-legacy-provider' + # AWS_S3_BUCKET: ${{ secrets.PROD_AWS_S3_BUCKET_V4_HOLESKY }} + # ANNOUNCEMENT: ${{ secrets.PROD_ANNOUNCEMENT_V4_HOLESKY }} + # AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_SECRET_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }} + # AWS_REGION: 'us-west-2' + # SOURCE_DIR: 'build/' # # diff --git a/src/app/common/components/Announcement/HoleskySunsetBanner.tsx b/src/app/common/components/Announcement/HoleskySunsetBanner.tsx deleted file mode 100644 index 4285d76f..00000000 --- a/src/app/common/components/Announcement/HoleskySunsetBanner.tsx +++ /dev/null @@ -1,124 +0,0 @@ -import React from 'react'; -import styled from 'styled-components'; -import { useLocalStorage } from 'react-use'; - -const BannerContainer = styled.div` - background-color: #e57c09; - color: white; - padding: 16px 20px; - display: flex; - align-items: center; - justify-content: center; -`; - -const BannerContent = styled.div` - display: flex; - align-items: center; - justify-content: center; - gap: 12px; - font-size: 16px; - font-weight: 500; -`; - -const CloseButton = styled.button` - background: none; - border: none; - cursor: pointer; - width: 26px; - height: 26px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 6px; - transition: background-color 0.2s ease-in-out; - &:hover { - background-color: rgba(255, 255, 255, 0.2); - } -`; - -const Spacer = styled.div` - flex: 1; -`; - -export const HoleskySunsetBanner = () => { - const [showHoleskyBanner, setShowHoleskyBanner] = useLocalStorage( - 'showHoleskyBanner', - true, - ); - - if (!showHoleskyBanner) { - return null; - } - - return ( - -
- - - - - - - - - - - Holesky network support will be deprecated on April 21st, 2025. As of - this date, the official testnet will shift to the Hoodi testnet. - - - - setShowHoleskyBanner(false)}> - - - - - - - ); -}; diff --git a/src/app/common/components/AppBar/AppBar.tsx b/src/app/common/components/AppBar/AppBar.tsx index 7919d57b..b9666154 100644 --- a/src/app/common/components/AppBar/AppBar.tsx +++ b/src/app/common/components/AppBar/AppBar.tsx @@ -26,7 +26,6 @@ import ApplicationStore from '~app/common/stores/Application.store'; import DarkModeSwitcher from '~app/common/components/DarkModeSwitcher'; import Grid from '@material-ui/core/Grid'; import NetworkSelect from '~app/common/components/NetworkSelect'; -import { HoleskySunsetBanner } from '../Announcement/HoleskySunsetBanner'; const DrawerButtonsContainers = styled.div` font-size: 12px; @@ -122,7 +121,6 @@ const AppBarComponent = () => { return (
- {isSearchOpened ? ( {paused ? ( diff --git a/src/app/common/components/NetworkSelect/NetworkSelect.tsx b/src/app/common/components/NetworkSelect/NetworkSelect.tsx index 93a52e2b..364ba031 100644 --- a/src/app/common/components/NetworkSelect/NetworkSelect.tsx +++ b/src/app/common/components/NetworkSelect/NetworkSelect.tsx @@ -7,7 +7,7 @@ import NetworkIcon from '~app/common/components/NetworkIcon'; import { useStyles } from './NeworkSelect.styles'; import { KeyboardArrowDown } from '@material-ui/icons'; -const availableNetworks = [EChain.Ethereum, EChain.Holesky, EChain.Hoodi]; +const availableNetworks = [EChain.Ethereum, EChain.Hoodi]; const networkToConfigMap = { [EChain.Ethereum]: { @@ -15,11 +15,6 @@ const networkToConfigMap = { label: 'Ethereum Mainnet', isTestnet: false, }, - [EChain.Holesky]: { - url: 'https://holesky.explorer.ssv.network', - label: 'Holesky Testnet', - isTestnet: true, - }, [EChain.Hoodi]: { url: 'https://hoodi.explorer.ssv.network', label: 'Hoodi Testnet', diff --git a/src/lib/utils/ChainService.ts b/src/lib/utils/ChainService.ts index b73f660d..59ffd853 100644 --- a/src/lib/utils/ChainService.ts +++ b/src/lib/utils/ChainService.ts @@ -2,13 +2,11 @@ import config from '~app/common/config'; export enum EChain { - Holesky = 'holesky', Ethereum = 'mainnet', // ethereum Hoodi = 'hoodi', } export const CHAIN = { - HOLESKY: EChain.Holesky, ETHEREUM: EChain.Ethereum, HOODI: EChain.Hoodi, }; @@ -41,7 +39,7 @@ const chainService = () => { const getNetwork = () => chain.toString(); const isChain = (other: EChain): boolean => chain === other; - const isCurrentNetworkTestnet = (): boolean => chain === EChain.Holesky || chain === EChain.Hoodi; + const isCurrentNetworkTestnet = (): boolean => chain === EChain.Hoodi; return { getBeaconchaUrl, getNetwork, isChain, isCurrentNetworkTestnet }; };