Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into verified-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
mateodaza committed Sep 17, 2024
2 parents 050ca02 + f172380 commit 395de5d
Show file tree
Hide file tree
Showing 25 changed files with 152 additions and 170 deletions.
2 changes: 1 addition & 1 deletion lang/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"component.end_stream_modal.confirm_question": "Esteu a punt de finalitzar una donació recurrent activa. Aquest projecte ja no gaudirà del vostre suport continuat. Esteu segur?",
"component.end_stream_modal.ended_description": "{name} ja no gaudirà de la vostra donació recurrent.",
"component.end_stream_modal.ended_title": "Heu finalitzat una donació recurrent",
"component.givback_eligible.desc": "Quan doneu a projectes verificats, qualifiqueu per rebre tokens GIV. A través dels GIVbacks, GIV capacita els donants amb drets de governança a través del GIVgarden.",
"component.givback_eligible.desc": "Quan dones a projectes elegibles per a GIVbacks, qualifiques per rebre tokens GIV. A través de GIVbacks, GIV empodera els donants amb drets de governança a través del GIVgarden.",
"component.givback_toast.desc": "Obteniu GIVbacks fent una donació a aquest projecte.",
"component.improve_tip.categories": "Assegureu-vos que els donants entenguin l'objectiu del vostre projecte seleccionant almenys una categoria.",
"component.improve_tip.desc": "La descripció del projecte és massa curta, utilitzeu almenys 1200 caràcters per descriure el vostre projecte.",
Expand Down
106 changes: 53 additions & 53 deletions lang/en.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"component.end_stream_modal.confirm_question": "Está a punto de finalizar una donación recurrente activa. Este proyecto ya no se beneficiará de su apoyo continuo. ¿Está seguro?",
"component.end_stream_modal.ended_description": "{name} ya no se beneficiará de su donación recurrente.",
"component.end_stream_modal.ended_title": "Ha finalizado una donación recurrente",
"component.givback_eligible.desc": "Cuando donas a proyectos verificados, tienes derecho a recibir GIVtokens. A través de GIVbacks, GIV otorga a los donantes derechos de gobernanza a través del GIVgarden.",
"component.givback_eligible.desc": "Cuando donas a proyectos elegibles para GIVbacks, calificas para recibir tokens GIV. A través de GIVbacks, GIV empodera a los donantes con derechos de gobernanza a través del GIVgarden.",
"component.givback_toast.desc": "Obtienes GIVbacks al donar a este proyecto.",
"component.improve_tip.categories": "Asegúrate de que los donantes entiendan el propósito de tu proyecto eligiendo al menos una categoría.",
"component.improve_tip.desc": "La descripción del proyecto es demasiado corta, usa al menos 1200 caracteres para describir tu proyecto.",
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const moduleExports = withBundleAnalyzer({
{ protocol: 'https', port: '', hostname: 'images.unsplash.com' },
{ protocol: 'https', port: '', hostname: 'unicorn.mypinata.cloud' },
{ protocol: 'https', port: '', hostname: 'images.ctfassets.net' },
{ protocol: 'https', port: '', hostname: 'giveth.io' },
{
protocol: 'https',
port: '',
Expand Down
12 changes: 12 additions & 0 deletions src/apollo/gql/gqlGivbacks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { gql } from '@apollo/client';

export const FETCH_ALLOCATED_GIVBACKS = gql`
query allocatedGivbacks($refreshCache: Boolean) {
allocatedGivbacks(refreshCache: $refreshCache) {
usdValueSentAmountInPowerRound
allocatedGivTokens
givPrice
date
}
}
`;
85 changes: 27 additions & 58 deletions src/components/GIVeconomyPages/GIVbacks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import {
GIVbackRewardCard,
GBSubtitle,
GBTitle,
GbDataBlock,
GbButton,
GIVBackCard,
RoundSection,
RoundTitle,
Expand All @@ -46,6 +44,8 @@ import links from '@/lib/constants/links';
import Routes from '@/lib/constants/Routes';
import { SubgraphDataHelper } from '@/lib/subgraph/subgraphDataHelper';
import { fetchSubgraphData } from '@/services/subgraph.service';
import { FETCH_ALLOCATED_GIVBACKS } from '@/apollo/gql/gqlGivbacks';
import { client } from '@/apollo/apolloClient';

export const TabGIVbacksTop = () => {
const { formatMessage } = useIntl();
Expand Down Expand Up @@ -107,14 +107,6 @@ export const TabGIVbacksTop = () => {
actionCb={() => {
setShowHarvestModal(true);
}}
subButtonLabel={
givbackLiquidPart === 0n
? formatMessage({
id: 'label.why_dont_i_have_givbacks',
})
: undefined
}
subButtonCb={() => setShowGivBackExplain(true)}
network={chain?.id}
targetNetworks={[
{
Expand Down Expand Up @@ -157,6 +149,27 @@ export const TabGIVbacksBottom = () => {
const [round, setRound] = useState(0);
const [roundStarTime, setRoundStarTime] = useState(new Date());
const [roundEndTime, setRoundEndTime] = useState(new Date());
// Define an interface for the type of givbackAllocations
interface GivbackAllocations {
usdValueSentAmountInPowerRound: number;
allocatedGivTokens: number;
givPrice: number;
date: string;
}
const [givbackAllocations, setGivbackAllocations] =
useState<GivbackAllocations | null>(null);

useEffect(() => {
async function fetchAllocatedGivbacks() {
const { data } = await client.query({
query: FETCH_ALLOCATED_GIVBACKS,
fetchPolicy: 'no-cache',
});
setGivbackAllocations(data?.allocatedGivbacks);
}
fetchAllocatedGivbacks();
}, []);

const { givTokenDistroHelper, isLoaded } = useGIVTokenDistroHelper();
useEffect(() => {
if (
Expand Down Expand Up @@ -185,51 +198,6 @@ export const TabGIVbacksBottom = () => {
return (
<GIVbacksBottomContainer>
<Container>
<Row>
<Col xs={12} sm={6}>
<GbDataBlock
title={formatMessage({ id: 'label.donor_rewards' })}
button={
<Link href={Routes.AllProjects}>
<GbButton
label={formatMessage({
id: 'label.donate_to_earn_giv',
})}
linkType='secondary'
size='large'
/>
</Link>
}
>
{formatMessage({
id: 'label.when_you_donate_to_Verified_projects',
})}
</GbDataBlock>
</Col>
<Col xs={12} sm={6}>
<GbDataBlock
title={formatMessage({
id: 'label.project_verification',
})}
button={
<GbButton
isExternal
label={formatMessage({
id: 'label.verify_your_project',
})}
linkType='secondary'
size='large'
href={links.VERIFICATION_DOCS}
target='_blank'
/>
}
>
{formatMessage({
id: 'label.great_projects_make_the_giveconomy_thrive',
})}
</GbDataBlock>
</Col>
</Row>
<GIVBackCard>
<Row>
<Col xs={12} md={8}>
Expand Down Expand Up @@ -303,9 +271,10 @@ export const TabGIVbacksBottom = () => {
</P>
<GivAllocated>
<NoWrap>
{formatMessage({
id: 'label.one_million_giv',
})}
{givbackAllocations &&
givbackAllocations.allocatedGivTokens
? `${givbackAllocations.allocatedGivTokens} GIV`
: '?'}
</NoWrap>
</GivAllocated>
</RoundInfoTallRow>
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/StakeLock/LockInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const LockInfo: FC<ILockInfo> = ({ round, amount, farmIsNotStarted }) => {
direction={'right'}
>
<LockInfoTooltip>
GIVpower allows you to support verified projects
GIVpower allows you to support vouched projects
on Giveth while earning rewards.
</LockInfoTooltip>
</IconWithTooltip>
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/claim/cards/Connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const ConnectCard: FC<IClaimViewCardProps> = ({ index }) => {
desc = (
<span>
But there are more ways to get GIV! Try another address or
donate to verified projects to qualify for{' '}
donate to GIVbacks eligible projects to qualify for{' '}
<Link href={Routes.GIVbacks}>
<ClickableStrong>GIVbacks</ClickableStrong>
</Link>
Expand Down
6 changes: 3 additions & 3 deletions src/components/views/claim/cards/Donate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ export const DonateCard: FC<IClaimViewCardProps> = ({ index }) => {
<DonateHeader>
<Title>Donate &amp; get GIV back</Title>
<Desc>
Donate to verified projects to get GIV with <b>GIVbacks</b>.
The project gets 100% of your donation, and you get rewarded
by Giveth with GIV!
Donate to GIVbacks eligible projects to get GIV with{' '}
<b>GIVbacks</b>. The project gets 100% of your donation, and
you get rewarded by Giveth with GIV!
</Desc>
</DonateHeader>
<APRRow $alignItems={'center'} $justifyContent={'space-between'}>
Expand Down
14 changes: 7 additions & 7 deletions src/components/views/landings/GIVBacks/HowGIVbacksWork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ const HowGIVbacksWork = () => {
</H5>
<OrderedBullets>
<li>
<b>Select a Verified Project:</b> Browse through our list of
impactful and vetted projects. Project Verification​.
'Verified' is a seal of approval for legitimate projects on
Giveth. If you are a project owner, when you get your
project verified, your donors become eligible to receive
GIVbacks. On Giveth verified projects receive more
donations.
<b>Select a GIVbacks Eligible Project:</b> Browse through
our list of impactful and vetted projects. Project
Verification​. 'Verified' is a seal of approval for
legitimate projects on Giveth. If you are a project owner,
when you get your project verified, your donors become
eligible to receive GIVbacks. On Giveth GIVbacks eligible
projects receive more donations.
</li>
<li>
<b>Donate Directly:</b> Once you've chosen a project that
Expand Down
20 changes: 10 additions & 10 deletions src/components/views/landings/GIVBacks/WhatAreGIVbacks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ const WhatAreGIVbacks = () => {
<br />
<br />
GIVbacks are GIV tokens that you receive every time you
donate to a verified project on Giveth. Think of them like a
tax deduction on your donation, but instead of needing to
fill a form or get a government rebate, you are given GIV
tokens directly to your wallet!
donate to a GIVbacks eligible project on Giveth. Think of
them like a tax deduction on your donation, but instead of
needing to fill a form or get a government rebate, you are
given GIV tokens directly to your wallet!
<br />
<br />
Let’s give an example of how this works. Let’s say you
donate $100 to a verified project on Giveth. Based on a
project's real-time ranking, you could receive up to $70
back in GIV token rewards just for donating! Some of this
amount would be given to you right away (within a 2 week
period), and some of it would be streamed to you over the
next few years.
donate $100 to a GIVbacks eligible project on Giveth. Based
on a project's real-time ranking, you could receive up to
$70 back in GIV token rewards just for donating! Some of
this amount would be given to you right away (within a 2
week period), and some of it would be streamed to you over
the next few years.
<br />
<br />
You can then use those GIV rewards to either take part in
Expand Down
6 changes: 3 additions & 3 deletions src/components/views/landings/GIVBacks/WhatCanYouDo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ const WhatCanYouDo = () => {
<li>
<b>Earn GIVpower to boost projects:</b> If you lock your GIV
tokens with Giveth, you can also get GIVpower, which will
allow you to boost verified projects to improve their
project ranking. Donors to higher ranked projects will get
more GIV from our GIVbacks program.
allow you to boost vouched projects to improve their project
ranking. Donors to higher ranked projects will get more GIV
from our GIVbacks program.
</li>
<li>
<b>Watch Your Impact Grow:</b> Stay updated with regular
Expand Down
10 changes: 5 additions & 5 deletions src/components/views/landings/GIVBacks/WhatMakesGIVbacks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const WhatMakesGIVbacks = () => {
<br />
Our mission at Giveth is to recognize and incentivize
those who selflessly give. Through GIVbacks, every
donation made to our verified projects doesn’t just
create societal value, but also earns you GIV tokens.
When you donate to verified projects you qualify to
receive GIV tokens. Through GIVbacks, GIV empowers
donors with governance rights.
donation made to our GIVbacks eligible projects doesn’t
just create societal value, but also earns you GIV
tokens. When you donate to GIVbacks eligible projects
you qualify to receive GIV tokens. Through GIVbacks, GIV
empowers donors with governance rights.
</li>
<li>
<b>A groundbreaking approach to donations</b>
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/landings/GIVBacks/YouKnowHow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const YouKnowHow = () => {
create impact, but rewards you in return. The Giveth mission
is to reward & empower those who give — to projects, to
society, and to the world. With GIVbacks, we’re rewarding
givers by giving GIV to donors to verified projects on
Giveth.
givers by giving GIV to donors to GIVbacks eligible projects
on Giveth.
</H4>
</Wrapper>
<WaveWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const GIVeconomySteps = [
{
title: 'GIVBacks: Get Rewarded for Donating',
description:
'Not only does Giveth take zero fees for all donations, but we actually reward donors for donating! Learn about our revolutionary GIVbacks program, and how you can earn GIV tokens when you donate to a verified project on Giveth.',
'Not only does Giveth take zero fees for all donations, but we actually reward donors for donating! Learn about our revolutionary GIVbacks program, and how you can earn GIV tokens when you donate to a GIVbacks eligible project on Giveth.',
element: (
<iframe
width='100%'
Expand All @@ -34,7 +34,7 @@ const GIVeconomySteps = [
{
title: 'Get a GIVstream',
description:
"Wouldn't it be cool if you could get constant rewards for donating? That's exactly what our GIVstream does. When you donate to a verified project on Giveth, you'll get a constant stream of GIV tokens until December 23, 2026!",
"Wouldn't it be cool if you could get constant rewards for donating? That's exactly what our GIVstream does. When you donate to a GIVbacks eligible project on Giveth, you'll get a constant stream of GIV tokens until December 23, 2026!",
buttonText: 'VIEW OUR ENTIRE GIVeconomy SERIES',
buttonLink:
'https://www.youtube.com/watch?v=-JXwwIGJGQQ&list=PL4Artm1rmCWH4Q5XnrQWf8fm0xob3hbdZ',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const OnboardingGIVeconomyIndex = () => {
const content = {
title: 'What else can you do on Giveth?',
description:
"Giveth is more than just a crypto donation platform. With GIV tokens you can take part in governance of the Giveth DAO, earn yield in our GIVfarm pools, boost project rankings with GIVpower and refer friends to Giveth to earn even more rewards. Start exploring everything that's possible in the GIVeconomy!",
"Giveth is more than just a crypto donation platform. With GIV tokens you can take part in governance of the Giveth DAO, earn yield in our GIVfarm pools and boost project rankings with GIVpower. Start exploring everything that's possible in the GIVeconomy!",
steps: GIVeconomySteps,
buttonLink: Routes.GIVeconomy,
buttonText: 'EXPLORE GIVeconomy',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const donorSteps = [
{
title: 'Fund Your Wallet',
description:
'Next up, try donating to a project on Giveth! We’ve got over 1,800 to choose from in categories ranging from Disaster Relief, Art & Culture, Education, Health & Wellness and more!',
'Next up, try donating to a project on Giveth! We’ve thousands to choose from in categories ranging from Disaster Relief, Art & Culture, Education, Health & Wellness and more!',
element: (
<iframe
width='100%'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const WhatIsGIV = () => {
GIV as a reward for donating to{' '}
<InternalLink
href={Routes.AllProjects}
title='verified projects'
title='GIVbacks eligible projects'
color={brandColors.pinky[500]}
/>{' '}
(through our{' '}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const WhatIsGiveth = () => {
<H5Styled>Get rewarded for donating</H5Styled>
<LeadStyled>
: Earn crypto rewards every time you donate to a
verified project on Giveth.
GIVbacks eligible project on Giveth.
</LeadStyled>
</li>
</Bullets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const projectOwnerSteps = [
),
},
{
title: 'Get Your Project Verified',
title: 'Make your project GIVbacks Eligible',
description:
'It is possible to have a project on Giveth without being verified. However, there are some pretty good benefits to getting verified, including greater legitimacy and more rewards for your donors. Our verification process is simply, straightforward and human.',
'It is possible to have a project on Giveth without being GIVbacks eligible. However, there are some pretty good benefits to becoming GIVbacks eligible, including greater legitimacy and more rewards for your donors. Our application process is simple, straightforward and human.',
element: (
<iframe
width='100%'
Expand Down
14 changes: 7 additions & 7 deletions src/components/views/landings/publicGoods/PublicGoodsFunding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ const PublicGoodsFunding = () => {
We support donations on multiple chains including
Ethereum Mainnet, Gnosis Chain, Optimism, Celo, and
Polygon. More are always being added. Donating to a
verified project on Giveth means receiving GIV tokens in
return, with the potential for up to 80% of the actual
donation. These tokens can be used for a variety of
purposes, including earning rewards through staking in
the GIVgarden and participating in governance. They can
also easily be converted to other cryptocurrencies or
fiat currencies.
GIVbacks eligible project on Giveth means receiving GIV
tokens in return, with the potential for up to 80% of
the actual donation. These tokens can be used for a
variety of purposes, including earning rewards through
staking in the GIVgarden and participating in
governance. They can also easily be converted to other
cryptocurrencies or fiat currencies.
</Lead>
</Section>
<Section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const numberedList = [
href={links.GIVBACK_DOC}
title='GIVbacks'
/>
). That means that if you donate to any verified project on
Giveth with crypto currency, you’ll be eligible to receive an
airdrop of GIV tokens at a value of up to 80% of the value of
what you donated! 🤯
). That means that if you donate to any GIVbacks eligible
project on Giveth with crypto currency, you’ll be eligible to
receive an airdrop of GIV tokens at a value of up to 80% of the
value of what you donated! 🤯
</>
),
},
Expand Down
Loading

0 comments on commit 395de5d

Please sign in to comment.