Skip to content

Commit

Permalink
Merge pull request #3786 from Giveth/release-2.23.0
Browse files Browse the repository at this point in the history
Release 2.23.0
  • Loading branch information
MohammadPCh authored Feb 25, 2024
2 parents b3650a2 + ef8d160 commit d12304f
Show file tree
Hide file tree
Showing 335 changed files with 6,484 additions and 3,485 deletions.
47 changes: 44 additions & 3 deletions lang/ca.json

Large diffs are not rendered by default.

47 changes: 44 additions & 3 deletions lang/en.json

Large diffs are not rendered by default.

47 changes: 44 additions & 3 deletions lang/es.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion lang/nt_ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
"label.learn_more_about": "Learn more about the benefits.",
"label.loading": "Loading",
"label.look_for_the_share_and_get_rewarded": "Look for the 'Share & get rewarded' button to generate links to specific pages across the Giveth site.",
"label.make_your_donation_eligible_for_matching": "Make your donation eligible for matching",
"label.manage_addresses": "Manage addresses",
"label.matching": "Matching",
"label.matching_funds_coming_soon": "Matching funds coming soon...",
Expand Down
1 change: 0 additions & 1 deletion lang/nt_es.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"label.keep_an_eye_on_the_projects_page": "Keep an eye on the projects page, its position in the default sort will change within 5 minutes or less.",
"label.learn_more_about": "Learn more about the benefits.",
"label.loading": "Loading",
"label.make_your_donation_eligible_for_matching": "Make your donation eligible for matching",
"label.manage_addresses": "Manage addresses",
"label.matching": "Matching",
"label.matching_funds_coming_soon": "Matching funds coming soon...",
Expand Down
70 changes: 35 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "givethdapp",
"version": "2.22.2",
"version": "2.23.0",
"private": true,
"scripts": {
"build": "next build",
Expand All @@ -12,72 +12,73 @@
"cypress": "cypress open"
},
"resolutions": {
"styled-components": "^5",
"styled-components": "^6",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6"
},
"dependencies": {
"@apollo/client": "^3.8.3",
"@apollo/client": "^3.9.3",
"@giveth/ui-design-system": "^1.11.20",
"@reduxjs/toolkit": "^1.9.5",
"@safe-global/api-kit": "^2.0.0",
"@reduxjs/toolkit": "^2.1.0",
"@safe-global/api-kit": "^2.1.0",
"@segment/snippet": "^4.15.3",
"@sentry/nextjs": "^7.69.0",
"@solana/spl-token": "^0.3.11",
"@sentry/nextjs": "^7.100.1",
"@solana/spl-token": "^0.4.0",
"@solana/wallet-adapter-base": "^0.9.23",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-react-ui": "^0.9.34",
"@solana/wallet-adapter-wallets": "^0.19.23",
"@solana/web3.js": "^1.87.6",
"@solana/wallet-adapter-react-ui": "^0.9.35",
"@solana/wallet-adapter-wallets": "^0.19.26",
"@solana/web3.js": "^1.90.0",
"@superfluid-finance/sdk-core": "^0.6.12",
"@uniswap/v3-sdk": "^3.10.0",
"@vercel/speed-insights": "^1.0.2",
"@tanstack/react-query": "^5.18.1",
"@uniswap/v3-sdk": "^3.10.2",
"@vercel/speed-insights": "^1.0.9",
"@web3auth/sign-in-with-solana": "^3.0.0",
"@web3modal/wagmi": "^3.1.0",
"apollo-upload-client": "^17.0.0",
"@web3modal/wagmi": "^4.0.1",
"apollo-upload-client": "^18.0.1",
"base58": "^2.0.1",
"bignumber.js": "^9.1.2",
"deepmerge": "^4.2.2",
"ethers": "5.7.2",
"framer-motion": "^10.12.12",
"deepmerge": "^4.3.1",
"ethers": "^5.7.2",
"framer-motion": "^11.0.3",
"graphql": "^16.8.1",
"lodash.isequal": "^4.5.0",
"lottie-react": "^2.3.1",
"next": "^13.5.1",
"lottie-react": "^2.4.0",
"next": "^14.1.0",
"nprogress": "^0.2.0",
"quill": "^1.3.7",
"quill-emoji": "^0.2.0",
"quill-image-resize-module": "^3.0.0",
"quill-magic-url": "^4.2.0",
"rc-slider": "^10.0.1",
"rc-slider": "^10.5.0",
"react": "^18.2.0",
"react-custom-scrollbars": "^4.2.1",
"react-datepicker": "^4.8.0",
"react-datepicker": "^6.1.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.2",
"react-dropzone": "^14.2.3",
"react-google-maps": "^9.4.5",
"react-hook-form": "^7.46.1",
"react-hook-form": "^7.50.1",
"react-hot-toast": "^2.4.1",
"react-intl": "^6.2.1",
"react-intl": "^6.6.2",
"react-places-autocomplete": "^7.3.0",
"react-quill": "^2.0.0",
"react-redux": "^8.0.1",
"react-redux": "^9.1.0",
"react-select": "^5.8.0",
"react-share": "^4.4.1",
"sharp": "^0.30.5",
"react-share": "^5.0.3",
"sharp": "^0.33.2",
"siwe": "^2.1.4",
"styled-components": "^5.3.6",
"swiper": "^10.2.0",
"unsplash-js": "^7.0.15",
"viem": "^1.20.0",
"wagmi": "^1.4.12"
"styled-components": "^6.1.8",
"swiper": "^11.0.6",
"unsplash-js": "^7.0.19",
"viem": "^2.7.8",
"wagmi": "^2.5.7"
},
"devDependencies": {
"@next/bundle-analyzer": "^12.1.4",
"@testing-library/cypress": "^8.0.3",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@types/apollo-upload-client": "^14.1.0",
"@types/apollo-upload-client": "^18.0.0",
"@types/axios": "^0.14.0",
"@types/extract-files": "^8.1.3",
"@types/jest": "^28.1.4",
Expand All @@ -92,10 +93,9 @@
"@types/react-html-parser": "^2.0.2",
"@types/react-modal": "^3.13.1",
"@types/react-places-autocomplete": "^7.2.9",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"babel-plugin-styled-components": "^2.0.7",
"babel-plugin-styled-components": "^2.1.4",
"cypress": "^10.6.0",
"eslint": "^8.49.0",
"eslint-config-next": "^13.5.1",
Expand Down
167 changes: 64 additions & 103 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { useEffect } from 'react';
import { createWeb3Modal } from '@web3modal/wagmi/react';
import Head from 'next/head';
import { IntlProvider } from 'react-intl';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { Toaster } from 'react-hot-toast';
import { ApolloProvider } from '@apollo/client';
import NProgress from 'nprogress';
Expand All @@ -9,19 +11,13 @@ import { useRouter } from 'next/router';
import { Provider as ReduxProvider } from 'react-redux';
import { SpeedInsights } from '@vercel/speed-insights/next';
import Script from 'next/script';
import { WagmiConfig, configureChains, createConfig } from 'wagmi';
import { EIP6963Connector, createWeb3Modal } from '@web3modal/wagmi/react';
import { walletConnectProvider } from '@web3modal/wagmi';
import { WalletConnectConnector } from 'wagmi/connectors/walletConnect';
import { InjectedConnector } from 'wagmi/connectors/injected';
import { publicProvider } from 'wagmi/providers/public';
import { SafeConnector } from 'wagmi/connectors/safe';
import { WagmiProvider } from 'wagmi';
import { projectId, wagmiConfig } from '@/wagmiConfigs';
import { useApollo } from '@/apollo/apolloClient';
import { HeaderWrapper } from '@/components/Header/HeaderWrapper';
import { FooterWrapper } from '@/components/Footer/FooterWrapper';
import '../styles/globals.css';
import { ca, en, es } from '../lang';
import config from '@/configuration';
import { store } from '@/features/store';
import SubgraphController from '@/components/controller/subgraph.ctrl';
import UserController from '@/components/controller/user.ctrl';
Expand All @@ -32,7 +28,6 @@ import NotificationController from '@/components/controller/pfp.ctrl';
import PfpController from '@/components/controller/notification.ctrl';
import ErrorsIndex from '@/components/views/Errors/ErrorsIndex';
import StorageLabel from '@/lib/localStorage';
import { zIndex } from '@/lib/constants/constants';
import { useSafeAutoConnect } from '@/hooks/useSafeAutoConnect';
import {
getLocaleFromIP,
Expand All @@ -41,6 +36,8 @@ import {
} from '@/lib/helpers';
import { GeneralWalletProvider } from '@/providers/generalWalletProvider';
import GIVeconomyTab from '@/components/GIVeconomyTab';
import { zIndex } from '@/lib/constants/constants';
import configuration from '@/configuration';
import MaintenanceIndex from '@/components/views/Errors/MaintenanceIndex';
import { SolanaProvider } from '@/providers/solanaWalletProvider';
import type { AppProps } from 'next/app';
Expand All @@ -53,6 +50,7 @@ declare global {
}

const DEFAULT_WRITE_KEY = 'MHK95b7o6FRNHt0ZZJU9bNGUT5MNCEyB';
const queryClient = new QueryClient();

export const IntlMessages = {
ca,
Expand Down Expand Up @@ -80,66 +78,25 @@ function renderSnippet() {

const isProduction = process.env.NEXT_PUBLIC_ENV === 'production';

const projectId = process.env.NEXT_PUBLIC_WALLET_CONNECT_ID!;

const metadata = {
name: 'Giveth',
description:
'Get rewarded for giving to for-good projects with zero added fees. Donate crypto directly to thousands of for-good projects, nonprofits & charities!',
url: 'https://giveth.io',
icons: ['https://giveth.io/images/currencies/giv/24.svg'],
const RenderComponent = ({ Component, pageProps }: any) => {
useSafeAutoConnect();
return <Component {...pageProps} />;
};

const chains = config.EVM_CHAINS;
const { publicClient } = configureChains(chains, [
walletConnectProvider({ projectId }),
publicProvider(),
]);
const wagmiConfig = createConfig({
autoConnect: false,
connectors: [
new WalletConnectConnector({
chains,
options: { projectId, showQrModal: false, metadata },
}),
new EIP6963Connector({ chains }),
new InjectedConnector({ chains, options: { shimDisconnect: true } }),
new SafeConnector({
chains,
options: {
allowedDomains: [/app.safe.global$/],
debug: false,
},
}),
],
publicClient,
});

const classicNetworkNumber = config.CLASSIC_NETWORK_NUMBER;

// Create web3 modal
createWeb3Modal({
wagmiConfig,
projectId,
chains,
enableAnalytics: true, // Optional - defaults to your Cloud configuration
themeVariables: {
'--w3m-z-index': zIndex.WEB3MODAL,
},
featuredWalletIds: [
'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96',
],
includeWalletIds: [
'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96',
],
chainImages: {
[classicNetworkNumber]: '/images/currencies/classic/32.svg',
[configuration.CLASSIC_NETWORK_NUMBER]:
'/images/currencies/classic/32.svg',
},
});

const RenderComponent = ({ Component, pageProps }: any) => {
useSafeAutoConnect();
return <Component {...pageProps} />;
};

function MyApp({ Component, pageProps }: AppProps) {
const router = useRouter();
const { pathname, asPath, query } = router;
Expand Down Expand Up @@ -195,6 +152,7 @@ function MyApp({ Component, pageProps }: AppProps) {
};
asyncFunc();
}, []);

Check warning on line 154 in pages/_app.tsx

View workflow job for this annotation

GitHub Actions / build

React Hook useEffect has missing dependencies: 'asPath', 'pathname', 'query', and 'router'. Either include them or remove the dependency array

return (
<>
<Head>
Expand All @@ -211,45 +169,47 @@ function MyApp({ Component, pageProps }: AppProps) {
>
<ApolloProvider client={apolloClient}>
<SolanaProvider>
<WagmiConfig config={wagmiConfig}>
<GeneralWalletProvider>
{isMaintenanceMode ? (
<MaintenanceIndex />
) : (
<>
<NotificationController />
<GeneralController />
<PriceController />
<SubgraphController />
<UserController />
<HeaderWrapper />
{isGIVeconomyRoute(
router.route,
) && <GIVeconomyTab />}
{(pageProps as any).errorStatus ? (
<ErrorsIndex
statusCode={
(pageProps as any)
.errorStatus
}
/>
) : (
<RenderComponent
Component={Component}
pageProps={pageProps}
/>
)}
{process.env.NEXT_PUBLIC_ENV ===
'production' && (
<Script
id='segment-script'
strategy='afterInteractive'
dangerouslySetInnerHTML={{
__html: renderSnippet(),
}}
/>
)}
{/* {process.env.NEXT_PUBLIC_ENV !==
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
<GeneralWalletProvider>
{isMaintenanceMode ? (
<MaintenanceIndex />
) : (
<>
<NotificationController />
<GeneralController />
<PriceController />
<SubgraphController />
<UserController />
<HeaderWrapper />
{isGIVeconomyRoute(
router.route,
) && <GIVeconomyTab />}
{(pageProps as any)
.errorStatus ? (
<ErrorsIndex
statusCode={
(pageProps as any)
.errorStatus
}
/>
) : (
<RenderComponent
Component={Component}
pageProps={pageProps}
/>
)}
{process.env.NEXT_PUBLIC_ENV ===
'production' && (
<Script
id='segment-script'
strategy='afterInteractive'
dangerouslySetInnerHTML={{
__html: renderSnippet(),
}}
/>
)}
{/* {process.env.NEXT_PUBLIC_ENV !==
'production' && (
<Script
id='console-script'
Expand All @@ -260,13 +220,14 @@ function MyApp({ Component, pageProps }: AppProps) {
/>
)} */}

<FooterWrapper />
<ModalController />
<PfpController />
</>
)}
</GeneralWalletProvider>
</WagmiConfig>
<FooterWrapper />
<ModalController />
<PfpController />
</>
)}
</GeneralWalletProvider>
</QueryClientProvider>
</WagmiProvider>
</SolanaProvider>
</ApolloProvider>
</IntlProvider>
Expand Down
4 changes: 2 additions & 2 deletions pages/referral.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import GIVferralView from '@/components/views/GIVferral.view';
import ErrorsIndex from '@/components/views/Errors/ErrorsIndex';

export default function GIVferralRoute() {
return <GIVferralView />;
return <ErrorsIndex statusCode='404' />;
}
Loading

0 comments on commit d12304f

Please sign in to comment.