Skip to content

Commit

Permalink
Merge pull request #38 from subsquid/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
belopash authored Oct 24, 2024
2 parents 6836ff0 + 81fea33 commit 97c7a07
Show file tree
Hide file tree
Showing 115 changed files with 7,456 additions and 5,334 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.*
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
echo "::set-output name=enable_demo_features::false"
else
echo "::set-output name=app_env::dev"
echo "::set-output name=testnet_squid_api_url::https://subsquid.squids.live/subsquid-network-testnet/v/v3/graphql"
echo "::set-output name=mainnet_squid_api_url::https://subsquid.squids.live/subsquid-network-mainnet/v/v3/graphql"
echo "::set-output name=testnet_squid_api_url::https://subsquid.squids.live/subsquid-network-testnet/v/v5/graphql"
echo "::set-output name=mainnet_squid_api_url::https://subsquid.squids.live/subsquid-network-mainnet/v/v5/graphql"
echo "::set-output name=enable_demo_features::true"
fi
if [ "$NETWORK" = "mainnet" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import { CodegenConfig } from '@graphql-codegen/cli';
export default {
overwrite: true,
schema:
process.env.SQUID_API_URL || 'https://subsquid.squids.live/subsquid-network-mainnet/graphql',
documents: ['src/api/subsquid-network-squid/*.graphql'],
process.env.SQUID_API_URL ||
'https://subsquid.squids.live/subsquid-network-testnet/v/v5/graphql',
documents: ['src/api/subsquid-network-squid/schema.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.16.5",
"wagmi": "^2.10.8",
"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
39 changes: 19 additions & 20 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ 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 { wagmiConfig } from '@network/config';
import { rainbowConfig } from '@network/config';
import { getChainId, getSubsquidNetwork } from '@network/useSubsquidNetwork';

import { AppRoutes } from './AppRoutes';
import { useCreateRainbowKitTheme, useCreateTheme, useThemeState } from './theme';
Expand All @@ -19,32 +19,31 @@ function App() {
const [themeName] = useThemeState();
const theme = useCreateTheme(themeName);
const rainbowkitTheme = useCreateRainbowKitTheme(themeName);
const network = getSubsquidNetwork();

return (
<WagmiProvider config={wagmiConfig}>
<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' }}
>
<RainbowKitProvider
modalSize="compact"
theme={rainbowkitTheme}
initialChain={getChainId(network)}
>
<SquidHeightProvider>
<CssBaseline />
<BrowserRouter>
<AppRoutes />
</BrowserRouter>
</SnackbarProvider>
</SquidHeightProvider>
{/* </SnackbarProvider> */}
</RainbowKitProvider>
<Toaster />
</ThemeProvider>
</SquidHeightProvider>
</QueryClientProvider>
</WagmiProvider>
</QueryClientProvider>
</WagmiProvider>
</>
);
}

Expand Down
12 changes: 4 additions & 8 deletions src/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ 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';
import { Worker } from '@pages/WorkersPage/Worker.tsx';
import { WorkerEdit } from '@pages/WorkersPage/WorkerEdit.tsx';
import { WorkersPage } from '@pages/WorkersPage/WorkersPage.tsx';

import { hideLoader } from './index.tsx';
Expand All @@ -35,18 +32,17 @@ export const AppRoutes = () => {

<Route path="/workers">
<Route element={<WorkersPage />} index />
<Route element={<AddNewWorker />} path="add" />
{/* <Route element={<AddNewWorker />} path="add" /> */}
<Route element={<Worker backPath="/dashboard" />} path=":peerId" />
<Route element={<WorkerEdit />} path=":peerId/edit" />
</Route>
<Route path="/delegations">
<Route element={<DelegationsPage />} index />
</Route>
<Route path="/gateways">
<Route path="/portals">
<Route element={<GatewaysPage />} index />
<Route element={<AddNewGateway />} path="add" />
<Route element={<Gateway backPath="/gateways" />} path=":peerId" />
<Route element={<Gateway backPath="/portals" />} path=":peerId" />
</Route>
<Route path="/gateways" element={<Navigate to="/portals" replace={true} />} />
<Route element={<Navigate to="/dashboard" replace={true} />} path="*" />
</Route>
</Routes>
Expand Down
105 changes: 0 additions & 105 deletions src/api/contracts/claim.ts

This file was deleted.

105 changes: 0 additions & 105 deletions src/api/contracts/gateway-registration/GatewayRegistration.abi.ts

This file was deleted.

Loading

0 comments on commit 97c7a07

Please sign in to comment.