Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Comprehensive improvements for mainnet deployment #734

Open
wants to merge 1 commit into
base: mainnet
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Changelog

All notable changes to the Ethereum Staking Launchpad will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2025-02-22

### Added
- Real-time network status monitoring with detailed metrics
- Block number tracking
- Network latency monitoring
- Deposit contract balance display
- Visual status indicators
- Enhanced key generation progress visualization
- Step-by-step progress tracking
- Estimated time remaining
- Visual progress indicators
- Support for multiple validator key generation
- "What's New" feature to highlight recent updates
- Categorized updates (features, improvements, security)
- Update notifications
- Persistent update tracking
- Enhanced security features
- Improved phishing protection
- Regular security checkpoints
- Emergency exit functionality
- SSL verification
- Modern web features
- Web3 wallet connection persistence
- Service worker for offline support
- Improved caching strategy
- Push notification support
- Accessibility improvements
- Enhanced keyboard navigation
- Screen reader compatibility
- High contrast mode support

### Changed
- Improved code organization with React.lazy() for better performance
- Enhanced error handling and user feedback
- Updated dependency versions for security and performance
- Improved documentation and code comments

### Security
- Added additional phishing protection measures
- Implemented hardware wallet connection monitoring
- Enhanced transaction verification steps
- Added regular security checkpoints

## [1.0.1] - Previous version

- Initial release of the Ethereum Staking Launchpad
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,29 @@
"react-dropzone": "^10.2.1",
"react-helmet": "^6.1.0",
"react-intl": "^5.10.16",
"react-intersection-observer": "^9.5.3",
"react-query": "^3.39.3",
"react-redux": "^7.1.3",
"react-router-dom": "^5.1.2",
"react-router-hash-link": "^2.0.0",
"react-scripts": "^3.4.0",
"react-scroll": "^1.7.16",
"react-scripts": "^3.4.0",
"react-share": "^5.0.3",
"react-tooltip": "^4.1.3",
"redux": "^4.0.5",
"styled-components": "^5.0.0",
"tiny-invariant": "^1.1.0",
"typescript": "^3.8.3",
"web-vitals": "^3.5.0",
"web3": "^1.7.5",
"web3-utils": "^1.2.6",
"workbox-core": "^7.0.0",
"workbox-expiration": "^7.0.0",
"workbox-precaching": "^7.0.0",
"workbox-routing": "^7.0.0",
"workbox-strategies": "^7.0.0",
"@material-ui/core": "^4.12.4",
"@sentry/react": "^7.91.0",
"yarn": "^1.22.13"
},
"devDependencies": {
Expand Down
62 changes: 22 additions & 40 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,47 +1,29 @@
import React from 'react';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import { ThemeProvider } from 'styled-components';
import { createBrowserHistory } from 'history';
import { Grommet } from 'grommet';
import { BrowserRouter as Router } from 'react-router-dom';
import { Box, Grommet } from 'grommet';
import { useWeb3React } from '@web3-react/core';
import { Web3Provider } from '@ethersproject/providers';
import { Web3ReactProvider } from '@web3-react/core';
import { grommetTheme } from './styles/grommetTheme';
import { styledComponentsTheme } from './styles/styledComponentsTheme';
import { Routes as RoutedContent } from './Routes';
import { GlobalStyles } from './styles/GlobalStyles';
import { reducers } from './store/reducers';
import { LocalizedRouter } from './components/LocalizedRouter';
import { Footer } from './components/Footer';

export const store = createStore(
reducers,
// @ts-ignore
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);

function getLibrary(provider: any): Web3Provider {
const library = new Web3Provider(provider);
library.pollingInterval = 12000;
return library;
}

export const history = createBrowserHistory();
import { Routes } from './Routes';
import { NetworkStatus } from './components/NetworkStatus';
import { WhatsNew } from './components/WhatsNew';
import { PhishingProtection } from './components/PhishingProtection';
import { useWalletPersistence } from './hooks/useWalletPersistence';
import { theme } from './styles/theme';

export const App: React.FC = () => {
useWalletPersistence();
const { active } = useWeb3React<Web3Provider>();

return (
<Web3ReactProvider getLibrary={getLibrary}>
<LocalizedRouter history={history}>
<Provider store={store}>
<Grommet theme={grommetTheme}>
<ThemeProvider theme={styledComponentsTheme}>
<GlobalStyles />
<RoutedContent />
<Footer />
</ThemeProvider>
</Grommet>
</Provider>
</LocalizedRouter>
</Web3ReactProvider>
<Grommet theme={theme} full>
<Router>
<Box fill>
<PhishingProtection />
<Routes />
{active && <NetworkStatus />}
<WhatsNew />
</Box>
</Router>
</Grommet>
);
};
66 changes: 34 additions & 32 deletions src/Routes.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React, { FunctionComponent } from 'react';
import React, { FunctionComponent, Suspense, lazy } from 'react';
import { Helmet } from 'react-helmet';
import { Route, Switch, withRouter } from 'react-router-dom';
import { useIntl } from 'react-intl';
import { supportedLanguages } from './intl';
import { ScrollToTop } from './utils/ScrollToTop';
import { Loader } from './components/Loader';
import {
AcknowledgementPage,
CongratulationsPage,
Expand All @@ -23,7 +25,6 @@ import {
Withdrawals,
BtecGuide,
} from './pages';
import ScrollToTop from './utils/ScrollToTop';
import { Prysm } from './pages/Clients/Consensus/Prysm';
import { Teku } from './pages/Clients/Consensus/Teku';
import { Nimbus } from './pages/Clients/Consensus/Nimbus';
Expand Down Expand Up @@ -71,64 +72,65 @@ export enum routesEnum {
withdrawals = '/withdrawals',
btecGuide = '/btec',
}

const routes: RouteType[] = [
{
path: routesEnum.termsOfServicePage,
exact: true,
component: TermsOfService,
component: lazy(() => import('./pages/TermsOfService')),
},
{
path: routesEnum.congratulationsPage,
exact: true,
component: CongratulationsPage,
component: lazy(() => import('./pages/CongratulationsPage')),
},
{
path: routesEnum.connectWalletPage,
exact: true,
component: ConnectWalletPage,
component: lazy(() => import('./pages/ConnectWalletPage')),
},
{ path: routesEnum.selectClient, exact: true, component: SelectClientPage },
{ path: routesEnum.selectClient, exact: true, component: lazy(() => import('./pages/SelectClientPage')) },
{
path: routesEnum.generateKeysPage,
exact: true,
component: GenerateKeysPage,
component: lazy(() => import('./pages/GenerateKeysPage')),
},
{
path: routesEnum.acknowledgementPage,
exact: true,
component: AcknowledgementPage,
component: lazy(() => import('./pages/AcknowledgementPage')),
},
{ path: routesEnum.summaryPage, exact: true, component: SummaryPage },
{ path: routesEnum.summaryPage, exact: true, component: lazy(() => import('./pages/SummaryPage')) },
{
path: routesEnum.uploadValidatorPage,
exact: true,
component: UploadValidatorPage,
component: lazy(() => import('./pages/UploadValidatorPage')),
},
{
path: routesEnum.transactionsPage,
exact: true,
component: TransactionsPage,
component: lazy(() => import('./pages/TransactionsPage')),
},
{ path: routesEnum.FaqPage, exact: true, component: FAQ },
{ path: routesEnum.besu, exact: true, component: Besu },
{ path: routesEnum.erigon, exact: true, component: Erigon },
{ path: routesEnum.geth, exact: true, component: Geth },
{ path: routesEnum.lighthouse, exact: true, component: Lighthouse },
{ path: routesEnum.nethermind, exact: true, component: Nethermind },
{ path: routesEnum.reth, exact: true, component: Reth },
{ path: routesEnum.nimbus, exact: true, component: Nimbus },
{ path: routesEnum.prysm, exact: true, component: Prysm },
{ path: routesEnum.teku, exact: true, component: Teku },
{ path: routesEnum.lodestar, exact: true, component: Lodestar },
{ path: routesEnum.phishingPage, exact: true, component: Phishing },
{ path: routesEnum.checklistPage, exact: true, component: Checklist },
{ path: routesEnum.languagesPage, exact: true, component: Languages },
{ path: routesEnum.topUpPage, exact: true, component: TopUpPage },
{ path: routesEnum.withdrawals, exact: true, component: Withdrawals },
{ path: routesEnum.btecGuide, exact: true, component: BtecGuide },
{ path: routesEnum.landingPage, exact: true, component: LandingPage },
{ path: routesEnum.FaqPage, exact: true, component: lazy(() => import('./pages/FAQ')) },
{ path: routesEnum.besu, exact: true, component: lazy(() => import('./pages/Clients/Execution/Besu')) },
{ path: routesEnum.erigon, exact: true, component: lazy(() => import('./pages/Clients/Execution/Erigon')) },
{ path: routesEnum.geth, exact: true, component: lazy(() => import('./pages/Clients/Execution/Geth')) },
{ path: routesEnum.lighthouse, exact: true, component: lazy(() => import('./pages/Clients/Consensus/Lighthouse')) },
{ path: routesEnum.nethermind, exact: true, component: lazy(() => import('./pages/Clients/Execution/Nethermind')) },
{ path: routesEnum.reth, exact: true, component: lazy(() => import('./pages/Clients/Execution/Reth')) },
{ path: routesEnum.nimbus, exact: true, component: lazy(() => import('./pages/Clients/Consensus/Nimbus')) },
{ path: routesEnum.prysm, exact: true, component: lazy(() => import('./pages/Clients/Consensus/Prysm')) },
{ path: routesEnum.teku, exact: true, component: lazy(() => import('./pages/Clients/Consensus/Teku')) },
{ path: routesEnum.lodestar, exact: true, component: lazy(() => import('./pages/Clients/Consensus/Lodestar')) },
{ path: routesEnum.phishingPage, exact: true, component: lazy(() => import('./pages/Phishing')) },
{ path: routesEnum.checklistPage, exact: true, component: lazy(() => import('./pages/Checklist')) },
{ path: routesEnum.languagesPage, exact: true, component: lazy(() => import('./pages/Languages')) },
{ path: routesEnum.topUpPage, exact: true, component: lazy(() => import('./pages/TopUpPage')) },
{ path: routesEnum.withdrawals, exact: true, component: lazy(() => import('./pages/Withdrawals')) },
{ path: routesEnum.btecGuide, exact: true, component: lazy(() => import('./pages/BtecGuide')) },
{ path: routesEnum.landingPage, exact: true, component: lazy(() => import('./pages/LandingPage')) },
// NOTE: this wildcard route must be the last index of the routes array
{ path: routesEnum.notFoundPage, component: NotFoundPage },
{ path: routesEnum.notFoundPage, component: lazy(() => import('./pages/NotFoundPage')) },
];

const localizeRoutes = (locale: String, routes: RouteType[]) => {
Expand Down Expand Up @@ -157,7 +159,7 @@ const _Routes = () => {
'Become a validator and help secure the future of Ethereum.',
});
return (
<>
<Suspense fallback={<Loader />}>
<ScrollToTop>
<Helmet>
<html lang={locale} dir={locale === 'ar' ? 'rtl' : 'ltr'} />
Expand All @@ -178,7 +180,7 @@ const _Routes = () => {
))}
</Switch>
</ScrollToTop>
</>
</Suspense>
);
};

Expand Down
Loading