Skip to content

Commit

Permalink
feat: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
belopash committed Oct 16, 2024
1 parent bcdcd44 commit b100d04
Show file tree
Hide file tree
Showing 58 changed files with 3,908 additions and 2,378 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
.yarn
build
dist
**/*.generated.*
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
schema:
process.env.SQUID_API_URL ||
'https://subsquid.squids.live/subsquid-network-testnet/v/v5/graphql',
documents: ['src/api/subsquid-network-squid/*.graphql'],
documents: ['*.graphql'],
hooks: {
afterOneFileWrite: ['prettier --write'],
},
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"preview": "vite preview --outDir build --host 127.0.0.1 --port 3005",
"upg": "yarn upgrade-interactive",
"prepare": "husky install",
"codegen": "graphql-codegen --config src/api/subsquid-network-squid/graphql.config.ts"
"codegen": "graphql-codegen --config graphql.config.ts"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": "eslint --cache --fix"
Expand All @@ -39,11 +39,11 @@
"graphql": "^16.9.0",
"lodash-es": "^4.17.21",
"material-ui-popup-state": "^5.1.2",
"notistack": "^3.0.1",
"pretty-bytes": "^6.1.1",
"qs": "^6.12.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hot-toast": "^2.4.1",
"react-router-dom": "^6.24.0",
"react-scroll": "^1.9.0",
"react-syntax-highlighter": "^15.5.0",
Expand All @@ -52,8 +52,8 @@
"use-debounce": "^10.0.1",
"use-element-position": "^1.0.13",
"use-local-storage-state": "^19.3.1",
"viem": "^2.10.9",
"wagmi": "^2.9.2",
"viem": "^2.21.25",
"wagmi": "^2.12.17",
"yup": "^1.4.0"
},
"devDependencies": {
Expand All @@ -76,6 +76,7 @@
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"@vitejs/plugin-react": "^4.3.1",
"@wagmi/cli": "^2.1.16",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -90,8 +91,8 @@
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"prettier": "^3.3.2",
"type-fest": "^4.20.1",
"typescript": "^5.5.2",
"type-fest": "^4.26.1",
"typescript": "^5.6.3",
"vite": "^5.4.2",
"vite-plugin-html": "^3.2.2",
"vite-plugin-html-env": "^1.2.8",
Expand Down
File renamed without changes.
29 changes: 11 additions & 18 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import React from 'react';
import { CssBaseline, ThemeProvider } from '@mui/material';
import { RainbowKitProvider } from '@rainbow-me/rainbowkit';
import { QueryClientProvider } from '@tanstack/react-query';
import { SnackbarProvider } from 'notistack';
import { BrowserRouter } from 'react-router-dom';
import { WagmiProvider } from 'wagmi';

import { queryClient } from '@api/client';
import { Alert } from '@components/Alert';
import { Toaster } from '@components/Toaster';
import { SquidHeightProvider } from '@hooks/useSquidNetworkHeightHooks';
import { rainbowConfig } from '@network/config';

Expand All @@ -21,30 +20,24 @@ function App() {
const rainbowkitTheme = useCreateRainbowKitTheme(themeName);

return (
<WagmiProvider config={rainbowConfig}>
<QueryClientProvider client={queryClient}>
<SquidHeightProvider>
<>
<WagmiProvider config={rainbowConfig}>
<QueryClientProvider client={queryClient}>
<ThemeProvider theme={theme}>
<RainbowKitProvider modalSize="compact" theme={rainbowkitTheme}>
<SnackbarProvider
hideIconVariant
preventDuplicate
maxSnack={3}
Components={{
subsquid: Alert,
}}
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
>
<SquidHeightProvider>
<CssBaseline />
<BrowserRouter>
<AppRoutes />
</BrowserRouter>
</SnackbarProvider>
</SquidHeightProvider>
{/* </SnackbarProvider> */}
</RainbowKitProvider>
<Toaster />
</ThemeProvider>
</SquidHeightProvider>
</QueryClientProvider>
</WagmiProvider>
</QueryClientProvider>
</WagmiProvider>
</>
);
}

Expand Down
2 changes: 0 additions & 2 deletions src/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { AssetsPage } from '@pages/AssetsPage/AssetsPage.tsx';
import { Vesting } from '@pages/AssetsPage/Vesting.tsx';
import { DashboardPage } from '@pages/DashboardPage/DashboardPage.tsx';
import { DelegationsPage } from '@pages/DelegationsPage/DelegationsPage.tsx';
import { AddNewGateway } from '@pages/GatewaysPage/AddNewGateway.tsx';
import { Gateway } from '@pages/GatewaysPage/Gateway.tsx';
import { GatewaysPage } from '@pages/GatewaysPage/GatewaysPage.tsx';
import { AddNewWorker } from '@pages/WorkersPage/AddNewWorker.tsx';
Expand Down Expand Up @@ -44,7 +43,6 @@ export const AppRoutes = () => {
</Route>
<Route path="/portals">
<Route element={<GatewaysPage />} index />
<Route element={<AddNewGateway />} path="add" />
<Route element={<Gateway backPath="/portals" />} path=":peerId" />
</Route>
<Route element={<Navigate to="/dashboard" replace={true} />} path="*" />
Expand Down
132 changes: 0 additions & 132 deletions src/api/contracts/abi/GatewayRegistration.abi.ts

This file was deleted.

78 changes: 0 additions & 78 deletions src/api/contracts/abi/WorkerRegistration.abi.ts

This file was deleted.

20 changes: 0 additions & 20 deletions src/api/contracts/abi/reaward-treasury.abi.ts

This file was deleted.

26 changes: 0 additions & 26 deletions src/api/contracts/abi/soft-cap.abi.ts

This file was deleted.

Loading

0 comments on commit b100d04

Please sign in to comment.