Skip to content

Commit

Permalink
Merge pull request #1849 from Giveth/release-2.5.0
Browse files Browse the repository at this point in the history
Release 2.5.0
  • Loading branch information
alireza-sharifpour authored Nov 21, 2022
2 parents 6be1e31 + f2280c2 commit ba46280
Show file tree
Hide file tree
Showing 169 changed files with 5,585 additions and 2,658 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: BUG
labels: bug
assignees: MoeNick
title: ''
labels: ''
assignees: ''

---

Expand Down
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/resource_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Resource request
about: For developers requesting resources from devops (for internal use only)
title: 'RR - '
labels: 'devops'
assignees: 'geleeroyale, mhmdksh'

---

**Main purpose of deployment**
I.e. staging environment for feature X

**Special requirements**
- [ ] Service interacts with the blockchain via on-machine stored private key
- [ ] Port **XXXX** needs to be open

**Estimated specs**
OS: Ubuntu LTS @latest
RAM: 1GB
DATA: 1GB/month

**Access**
Who needs access to the resource (people and other services)
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/test-report---boosting-.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: 'Test report - Boosting '
about: Create a report to help us improve testting
title: 'GIVpower Boosting | '
labels: GIVeconomy, GIVPower
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**This happens on which Boosting Section?**
- [ ] Project's Card - GIVpower Rank
- [ ] Project's GIVpower ranking
- [ ] Single Project Public View | Boost Button
- [ ] Single Project's owner view | Boost Button
- [ ] Single Project's View | Givpower tab (Hall of fame, Total Boosted)
- [ ] Boost Modal for a specific project
- [ ] Boost Succeeded
- [ ] My Account | Boosting Tab: list of boosted projects
- [ ] My Account | Delete a Boosted Projects
- [ ] My Account | Edit boosting allocations
- [ ] My Account | Success editing allocations
- [ ] My Account | Success editing allocations.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
659 changes: 659 additions & 0 deletions lang/en.json

Large diffs are not rendered by default.

658 changes: 658 additions & 0 deletions lang/es.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions lang/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import en from './en.json';
import es from './es.json';

export { en, es };
5 changes: 5 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ const moduleExports = withBundleAnalyzer({
}
return config;
},
i18n: {
locales: ['en', 'es'],
defaultLocale: 'en',
localeDetection: false,
},
});

const sentryWebpackPluginOptions = {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "givethdapp",
"version": "2.4.12",
"version": "2.5.0",
"private": true,
"scripts": {
"build": "next build",
Expand All @@ -21,7 +21,7 @@
"@ethersproject/contracts": "^5.5.0",
"@ethersproject/providers": "^5.5.0",
"@ethersproject/units": "^5.5.0",
"@giveth/ui-design-system": "^1.8.26",
"@giveth/ui-design-system": "^1.9.1",
"@gnosis.pm/safe-apps-web3-react": "^1.5.0",
"@reduxjs/toolkit": "^1.8.1",
"@segment/snippet": "^4.15.3",
Expand Down Expand Up @@ -56,6 +56,7 @@
"react-google-maps": "^9.4.5",
"react-hook-form": "^7.32.2",
"react-hot-toast": "^2.1.1",
"react-intl": "^6.2.1",
"react-lottie": "^1.2.3",
"react-places-autocomplete": "^7.3.0",
"react-quill": "^2.0.0",
Expand Down
67 changes: 42 additions & 25 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect } from 'react';
import Head from 'next/head';
import { IntlProvider } from 'react-intl';
import { Toaster } from 'react-hot-toast';
import { Web3ReactProvider } from '@web3-react/core';
import { ApolloProvider } from '@apollo/client';
Expand All @@ -14,6 +15,7 @@ import { HeaderWrapper } from '@/components/Header/HeaderWrapper';
import { FooterWrapper } from '@/components/Footer/FooterWrapper';

import '../styles/globals.css';
import { en, es } from '../lang';
import { store } from '@/features/store';
import SubgraphController from '@/components/controller/subgraph.ctrl';
import UserController from '@/components/controller/user.ctrl';
Expand All @@ -31,6 +33,12 @@ declare global {

const DEFAULT_WRITE_KEY = 'MHK95b7o6FRNHt0ZZJU9bNGUT5MNCEyB';

type IntlMessageKeys = keyof typeof en;
const messages = {
en,
es,
};

function renderSnippet() {
const opts = {
apiKey:
Expand All @@ -53,6 +61,7 @@ function getLibrary(provider: ExternalProvider) {

function MyApp({ Component, pageProps }: AppProps) {
const router = useRouter();
const locale = router ? router.locale : 'en';
const apolloClient = useApollo(pageProps);

useEffect(() => {
Expand Down Expand Up @@ -88,32 +97,40 @@ function MyApp({ Component, pageProps }: AppProps) {
/>
</Head>
<Provider store={store}>
<ApolloProvider client={apolloClient}>
<Web3ReactProvider getLibrary={getLibrary}>
<GeneralController />
<PriceController />
<SubgraphController />
<UserController />
<HeaderWrapper />
{pageProps.errorStatus ? (
<ErrorsIndex statusCode={pageProps.errorStatus} />
) : (
<Component {...pageProps} />
)}
{process.env.NEXT_PUBLIC_ENV === 'production' && (
<Script
id='segment-script'
strategy='afterInteractive'
dangerouslySetInnerHTML={{
__html: renderSnippet(),
}}
/>
)}
<IntlProvider
locale={locale!}
messages={messages[locale as keyof typeof messages]}
defaultLocale='en'
>
<ApolloProvider client={apolloClient}>
<Web3ReactProvider getLibrary={getLibrary}>
<GeneralController />
<PriceController />
<SubgraphController />
<UserController />
<HeaderWrapper />
{pageProps.errorStatus ? (
<ErrorsIndex
statusCode={pageProps.errorStatus}
/>
) : (
<Component {...pageProps} />
)}
{process.env.NEXT_PUBLIC_ENV === 'production' && (
<Script
id='segment-script'
strategy='afterInteractive'
dangerouslySetInnerHTML={{
__html: renderSnippet(),
}}
/>
)}

<FooterWrapper />
<ModalController />
</Web3ReactProvider>
</ApolloProvider>
<FooterWrapper />
<ModalController />
</Web3ReactProvider>
</ApolloProvider>
</IntlProvider>
</Provider>

<Toaster containerStyle={{ top: '80px' }} />
Expand Down
29 changes: 23 additions & 6 deletions pages/donate/[slug].tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
import React from 'react';
import React, { FC } from 'react';
import Head from 'next/head';
import dynamic from 'next/dynamic';

import { captureException } from '@sentry/nextjs';
import { IProjectBySlug } from '@/apollo/types/types';
import { FETCH_PROJECT_BY_SLUG } from '@/apollo/gql/gqlProjects';

import { IDonationProject } from '@/apollo/types/types';
import {
FETCH_GIVETH_PROJECT_BY_ID,
FETCH_PROJECT_BY_SLUG,
} from '@/apollo/gql/gqlProjects';
import { client } from '@/apollo/apolloClient';
import { ProjectMeta } from '@/components/Metatag';
import { transformGraphQLErrorsToStatusCode } from '@/helpers/requests';
import config from '@/configuration';

const DonateIndex = dynamic(
() => import('@/components/views/donate/DonateIndex'),
{ ssr: false },
);

const DonateRoute = (props: IProjectBySlug) => {
export interface IDonateRouteProps {
project: IDonationProject;
}

const DonateRoute: FC<IDonateRouteProps> = props => {
return (
<>
<Head>
Expand All @@ -35,7 +43,16 @@ export async function getServerSideProps(props: { query: { slug: string } }) {
variables: { slug },
fetchPolicy: 'no-cache',
});
const project = data.projectBySlug;
const { data: givethProjectData } = await client.query({
query: FETCH_GIVETH_PROJECT_BY_ID,
variables: { id: config.GIVETH_PROJECT_ID },
fetchPolicy: 'no-cache',
});

const project = {
...data.projectBySlug,
givethAddresses: givethProjectData.projectById.addresses,
};
return {
props: {
project,
Expand Down
10 changes: 5 additions & 5 deletions pages/test1.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components';
import { GetServerSideProps } from 'next';
import { useWeb3React } from '@web3-react/core';
import { IconHelp } from '@giveth/ui-design-system';
import { IconHelpFilled16 } from '@giveth/ui-design-system';
import { gToast, ToastType } from '@/components/toasts';
import { useAppDispatch } from '@/features/hooks';
import { fetchXDaiInfoAsync } from '@/features/subgraph/subgraph.thunks';
Expand Down Expand Up @@ -49,9 +49,9 @@ const TestRoute = () => {
<TestContainer>
this is test page.
<IconWithTooltip
icon={<IconHelp size={16} />}
direction='top'
align='left'
icon={<IconHelpFilled16 />}
direction='right'
align='top'
>
<FlowRateTooltip>
The rate at which you receive liquid GIV from your
Expand Down Expand Up @@ -82,7 +82,7 @@ const TestRoute = () => {
<div>
--------------------------------------------
<IconWithTooltip
icon={<IconHelp size={16} />}
icon={<IconHelpFilled16 />}
direction='right'
align='bottom'
>
Expand Down
3 changes: 0 additions & 3 deletions public/images/gas_station.svg

This file was deleted.

3 changes: 0 additions & 3 deletions public/images/radio_off.svg

This file was deleted.

4 changes: 0 additions & 4 deletions public/images/radio_on.svg

This file was deleted.

13 changes: 13 additions & 0 deletions src/apollo/gql/gqlProjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,19 @@ export const FETCH_PROJECT_BY_ID = gql`
}
`;

export const FETCH_GIVETH_PROJECT_BY_ID = gql`
query ProjectById($id: Float!) {
projectById(id: $id) {
addresses {
address
isRecipient
networkId
}
slug
}
}
`;

export const FETCH_PROJECT_REACTION_BY_ID = gql`
query ProjectById($id: Float!, $connectedWalletUserId: Int) {
projectById(id: $id, connectedWalletUserId: $connectedWalletUserId) {
Expand Down
3 changes: 3 additions & 0 deletions src/apollo/gql/gqlVerification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const gqlRes = `{
foundationDate
achievedMilestones
achievedMilestonesProofs
problem
plans
impact
}
managingFunds {
description
Expand Down
10 changes: 10 additions & 0 deletions src/apollo/types/gqlTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
IDonation,
IProject,
IProjectUpdate,
IWalletAddress,
IWalletDonation,
} from './types';

Expand Down Expand Up @@ -85,3 +86,12 @@ export interface IProjectAcceptedToken {
isGivbackEligible?: boolean;
order: number;
}

export interface IFetchGivethProjectGQL {
data: {
projectById: {
slug: string;
addresses: IWalletAddress[];
};
};
}
Loading

1 comment on commit ba46280

@vercel
Copy link

@vercel vercel bot commented on ba46280 Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

giveth-dapps-v2 – ./

giveth-dapps-v2-git-main-givethio.vercel.app
giveth-dapps-v2-givethio.vercel.app
www.giveth.io
giveth.io

Please sign in to comment.