Date: Tue, 17 Sep 2024 13:22:50 +0330
Subject: [PATCH 13/19] change givback verified_owner copy
---
lang/ca.json | 6 +--
lang/en.json | 6 +--
lang/es.json | 6 +--
lang/t_ca.json | 2 -
lang/t_es.json | 2 -
.../views/project/ProjectGIVbackToast.tsx | 52 ++++++-------------
6 files changed, 22 insertions(+), 52 deletions(-)
diff --git a/lang/ca.json b/lang/ca.json
index 6da6567a41..4756056703 100644
--- a/lang/ca.json
+++ b/lang/ca.json
@@ -1627,8 +1627,7 @@
"project.givback_toast.description.non_verified_owner_rejected_2": " o al suport de Discord per a més instruccions.",
"project.givback_toast.description.non_verified_owner_submitted": "Notícies emocionants! La teva sol·licitud ha estat enviada i està a la cua per ser revisada pel nostre equip de revisió d'elegibilitat per a GIVbacks. Et respondrem en un termini d'1-2 setmanes.",
"project.givback_toast.description.non_verified_public": "Actualment, els GIVbacks només s'atorguen per donacions fetes a projectes elegibles per a GIVbacks a Ethereum. La teva contribució segueix sent important, fins i tot si no genera GIVbacks!",
- "project.givback_toast.description.verified_owner": "Impulsa el teu projecte per augmentar la quantitat de GIVbacks que reben els teus donants a Ethereum i augmentar la seva visibilitat entre altres projectes.",
- "project.givback_toast.description.verified_owner.note": "Com a propietari d'aquest projecte, no rebràs GIVbacks per donar-hi.",
+ "project.givback_toast.description.verified_owner": "Potencia el teu projecte per augmentar el seu percentatge de GIVbacks i ajudar-lo a aparèixer més amunt a la pàgina de projectes!",
"project.givback_toast.description.verified_public": "Les donacions a Ethereum a projectes elegibles per a GIVbacks són recompensades amb GIV. Impulsa aquest projecte per augmentar el seu percentatge de recompenses i fer-lo més visible a la pàgina de projectes!",
"project.givback_toast.title.non_verified_owner": "El teu projecte està creant o donant suport a béns públics?",
"project.givback_toast.title.non_verified_owner_cancelled": "Estat Cancel·lat",
@@ -1638,8 +1637,7 @@
"project.givback_toast.title.non_verified_owner_rejected": "No vam poder verificar el teu projecte com a bé públic",
"project.givback_toast.title.non_verified_owner_submitted": "Sol·licitud enviada",
"project.givback_toast.title.non_verified_public": "Per què no hi ha GIVbacks?",
- "project.givback_toast.title.verified_owner_1": "Els donants són recompensats amb fins a ",
- "project.givback_toast.title.verified_owner_2": " del valor de la donació!",
+ "project.givback_toast.title.verified_owner": "Les donacions de {value}$ o més són elegibles per a reemborsaments de fins a un {percent}%!",
"project.givback_toast.title.verified_public_1": "Rep recompenses de fins a ",
"project.givback_toast.title.verified_public_2": " del valor de la teva donació!",
"projects_all": "Tots els Projectes",
diff --git a/lang/en.json b/lang/en.json
index 5a70c907d8..1d05e41a79 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1632,8 +1632,7 @@
"project.givback_toast.description.non_verified_owner_rejected_2": " or Discord support for more instructions.",
"project.givback_toast.description.non_verified_owner_submitted": "Exciting news! Your application has been submitted and is in the queue for review by our GIVbacks Eligibility review team. We will get back to you with a response within 1-2 weeks.",
"project.givback_toast.description.non_verified_public": "GIVbacks are currently only awarded for donations made to GIVbacks Eligible projects on Ethereum. Your contribution still matters, even if it doesn't generate GIVbacks!",
- "project.givback_toast.description.verified_owner": "Boost your project to increase the amount of GIVbacks your donors on Ethereum receive and increase its visibility among other projects!",
- "project.givback_toast.description.verified_owner.note": "As the owner of this project, you won’t get GIVbacks for donating to it.",
+ "project.givback_toast.description.verified_owner": "Boost your project to increase its GIVbacks percentage and help it appear higher on the projects page!",
"project.givback_toast.description.verified_public": "Ethereum donations to GIVbacks Eligible projects are rewarded with GIV. Boost this project to increase its rewards percentage and make it more visible on the projects page!",
"project.givback_toast.title.non_verified_owner": "Is your project creating or supporting public goods?",
"project.givback_toast.title.non_verified_owner_cancelled": "Project Cancelled",
@@ -1643,8 +1642,7 @@
"project.givback_toast.title.non_verified_owner_rejected": "We couldn't verify your project as a public good",
"project.givback_toast.title.non_verified_owner_submitted": "Application submitted",
"project.givback_toast.title.non_verified_public": "Why no GIVbacks?",
- "project.givback_toast.title.verified_owner_1": "Donors get rewarded with up to ",
- "project.givback_toast.title.verified_owner_2": " of the donation value!",
+ "project.givback_toast.title.verified_owner": "Donations of ${value} or more qualify for GIVbacks with up to {percent}%!",
"project.givback_toast.title.verified_public_1": "Get rewarded with up to ",
"project.givback_toast.title.verified_public_2": " of your donation value!",
"projects_all": "All Projects",
diff --git a/lang/es.json b/lang/es.json
index 43b7f42f0b..07499c878c 100644
--- a/lang/es.json
+++ b/lang/es.json
@@ -1627,8 +1627,7 @@
"project.givback_toast.description.non_verified_owner_rejected_2": " o al soporte de Discord para más instrucciones.",
"project.givback_toast.description.non_verified_owner_submitted": "¡Noticias emocionantes! Tu solicitud ha sido enviada y está en la cola para ser revisada por nuestro equipo de revisión de elegibilidad para GIVbacks. Te responderemos en un plazo de 1-2 semanas.",
"project.givback_toast.description.non_verified_public": "Actualmente, los GIVbacks solo se otorgan por donaciones hechas a proyectos elegibles para GIVbacks en Ethereum. ¡Tu contribución sigue siendo importante, incluso si no genera GIVbacks!",
- "project.givback_toast.description.verified_owner": "Impulsa tu proyecto para aumentar la cantidad de GIVbacks que reciben tus donantes en Ethereum y aumentar su visibilidad entre otros proyectos.",
- "project.givback_toast.description.verified_owner.note": "Como propietario de este proyecto, no recibirás GIVbacks por donar a él.",
+ "project.givback_toast.description.verified_owner": "¡Impulsa tu proyecto para aumentar su porcentaje de GIVbacks y ayúdalo a aparecer más arriba en la página de proyectos!",
"project.givback_toast.description.verified_public": "Las donaciones en Ethereum a proyectos elegibles para GIVbacks son recompensadas con GIV. ¡Impulsa este proyecto para aumentar su porcentaje de recompensas y hacerlo más visible en la página de proyectos!",
"project.givback_toast.title.non_verified_owner": "¿Tu proyecto está creando o apoyando bienes públicos?",
"project.givback_toast.title.non_verified_owner_cancelled": "Estado Cancelado",
@@ -1638,8 +1637,7 @@
"project.givback_toast.title.non_verified_owner_rejected": "No pudimos verificar tu proyecto como un bien público",
"project.givback_toast.title.non_verified_owner_submitted": "Solicitud enviada",
"project.givback_toast.title.non_verified_public": "¿Por qué no GIVbacks?",
- "project.givback_toast.title.verified_owner_1": "Los donantes reciben recompensas de hasta ",
- "project.givback_toast.title.verified_owner_2": " del valor de la donación.",
+ "project.givback_toast.title.verified_owner": "¡Las donaciones de ${value} o más califican para GIVbacks con hasta un {percent}%!",
"project.givback_toast.title.verified_public_1": "¡Recibe recompensas de hasta ",
"project.givback_toast.title.verified_public_2": " del valor de tu donación!",
"projects_all": "Todos los proyectos",
diff --git a/lang/t_ca.json b/lang/t_ca.json
index 035a6ceb9a..c20e5645dd 100644
--- a/lang/t_ca.json
+++ b/lang/t_ca.json
@@ -153,12 +153,10 @@
"project.givback_toast.description.non_verified_owner": "Pots demostrar que el teu projecte està proporcionant un bé públic? La verificació et dóna accés a una gran quantitat de beneficis com recompenses per a donants, major visibilitat i formes addicionals d'obtenir fons!",
"project.givback_toast.description.non_verified_public": "Actualment, els GIVbacks només es concedeixen per donacions fetes a projectes verificats. La teva contribució encara és important, encara que no generi GIVbacks!",
"project.givback_toast.description.verified_owner": "Impulsa el teu projecte per augmentar el seu percentatge de recompenses i fer-lo més visible a la pàgina de projectes!",
- "project.givback_toast.description.verified_owner.note": "Com a propietari d'aquest projecte, no obtindràs GIV per donar-hi.",
"project.givback_toast.description.verified_public": "Els donants de projectes verificats són recompensats amb GIV. Impulsa aquest projecte per augmentar el seu percentatge de recompenses i fer-lo més visible a la pàgina de projectes!",
"project.givback_toast.title.non_verified_owner": "Porta el teu projecte al següent nivell amb la Verificació!",
"project.givback_toast.title.non_verified_public": "Per què no hi ha GIVbacks?",
"project.givback_toast.title.verified_owner_1": "Els donants són recompensats amb fins a ",
- "project.givback_toast.title.verified_owner_2": " del valor de la donació!",
"project.givback_toast.title.verified_public_1": "Obtén recompenses amb fins a ",
"project.givback_toast.title.verified_public_2": " del valor de la teva donació!",
"refi": "Refi",
diff --git a/lang/t_es.json b/lang/t_es.json
index ed8b276ea4..b0c5cec0e8 100644
--- a/lang/t_es.json
+++ b/lang/t_es.json
@@ -119,12 +119,10 @@
"project.givback_toast.description.non_verified_owner": "¿Puedes demostrar que tu proyecto está proporcionando un bien público? ¡La verificación te da acceso a una gran cantidad de beneficios como recompensas para los donantes, mayor visibilidad y formas adicionales de recaudar fondos!",
"project.givback_toast.description.non_verified_public": "Los GIVbacks se otorgan actualmente solo por donaciones realizadas a proyectos verificados. ¡Tu contribución sigue siendo importante, incluso si no genera GIVbacks!",
"project.givback_toast.description.verified_owner": "¡Impulsa tu proyecto para aumentar su porcentaje de recompensas y hacerlo más visible en la página de proyectos!",
- "project.givback_toast.description.verified_owner.note": "Como propietario de este proyecto, no obtendrás GIV por donar a él.",
"project.givback_toast.description.verified_public": "Los donantes a proyectos verificados son recompensados con GIV. ¡Impulsa este proyecto para aumentar su porcentaje de recompensas y hacerlo más visible en la página de proyectos!",
"project.givback_toast.title.non_verified_owner": "¡Lleva tu proyecto al siguiente nivel con la Verificación!",
"project.givback_toast.title.non_verified_public": "¿Por qué no hay GIVbacks?",
"project.givback_toast.title.verified_owner_1": "Los donantes son recompensados con hasta ",
- "project.givback_toast.title.verified_owner_2": " del valor de la donación!",
"project.givback_toast.title.verified_public_1": "Obtén recompensas de hasta ",
"project.givback_toast.title.verified_public_2": " del valor de tu donación!",
"refi": "Refi",
diff --git a/src/components/views/project/ProjectGIVbackToast.tsx b/src/components/views/project/ProjectGIVbackToast.tsx
index d26439f290..5f6dafa0eb 100644
--- a/src/components/views/project/ProjectGIVbackToast.tsx
+++ b/src/components/views/project/ProjectGIVbackToast.tsx
@@ -1,3 +1,4 @@
+import * as process from 'node:process';
import styled from 'styled-components';
import {
B,
@@ -29,7 +30,6 @@ import { useModalCallback } from '@/hooks/useModalCallback';
import { isSSRMode } from '@/lib/helpers';
import BoostModal from '@/components/modals/Boost/BoostModal';
import { useAppSelector } from '@/features/hooks';
-import { formatDonation } from '@/helpers/number';
import { EProjectStatus } from '@/apollo/types/gqlEnums';
import { EVerificationStatus } from '@/apollo/types/types';
import Routes from '@/lib/constants/Routes';
@@ -49,7 +49,7 @@ const ProjectGIVbackToast = () => {
const color = isOwnerVerified
? semanticColors.golden[600]
: neutralColors.gray[900];
- const { formatMessage, locale } = useIntl();
+ const { formatMessage } = useIntl();
const { open: openConnectModal } = useWeb3Modal();
const {
isEnabled,
@@ -84,22 +84,21 @@ const ProjectGIVbackToast = () => {
let title = '';
let description, Button;
+ const givbackFactorPercent = ((givbackFactor || 0) * 100).toFixed();
+ const NEXT_PUBLIC_GIVBACKS_DONATION_QUALIFICATION_VALUE_USD =
+ process.env.NEXT_PUBLIC_GIVBACKS_DONATION_QUALIFICATION_VALUE_USD;
+
if (isOwnerVerified) {
if (givbackFactor !== 0) {
- title =
- formatMessage({
- id: `${useIntlTitle}verified_owner_1`,
- }) +
- formatDonation(
- (givbackFactor || 0) * 100,
- undefined,
- locale,
- true,
- ) +
- '%' +
- formatMessage({
- id: `${useIntlTitle}verified_owner_2`,
- });
+ title = formatMessage(
+ {
+ id: `${useIntlTitle}verified_owner`,
+ },
+ {
+ percent: givbackFactorPercent,
+ value: NEXT_PUBLIC_GIVBACKS_DONATION_QUALIFICATION_VALUE_USD,
+ },
+ );
}
description = formatMessage({
id: `${useIntlDescription}verified_owner`,
@@ -259,18 +258,6 @@ const ProjectGIVbackToast = () => {
{title}
{description}
- {isOwnerVerified && (
-
-
- {formatMessage({
- id: 'label.note',
- }) + ' '}
-
- {formatMessage({
- id: 'project.givback_toast.description.verified_owner.note',
- })}
-
- )}
{link && (
@@ -296,17 +283,10 @@ const ProjectGIVbackToast = () => {
);
};
-const Note = styled(P)`
- color: ${neutralColors.gray[800]};
- > span {
- font-weight: 500;
- }
-`;
-
const LearnMore = styled(Caption)`
display: flex;
gap: 2px;
- color: ${brandColors.pinky[500]};
+ color: ${brandColors.pinky[500]} !important;
`;
const Description = styled(P)`
From c333566c3432bc6d3789d54bfba1eb423e3dba7d Mon Sep 17 00:00:00 2001
From: Ramin
Date: Tue, 17 Sep 2024 13:34:44 +0330
Subject: [PATCH 14/19] add GIVBACKS_DONATION_QUALIFICATION_VALUE_USD constant
---
src/components/views/project/ProjectGIVbackToast.tsx | 8 +++-----
src/lib/constants/constants.ts | 2 ++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/components/views/project/ProjectGIVbackToast.tsx b/src/components/views/project/ProjectGIVbackToast.tsx
index 5f6dafa0eb..1e76c08eb2 100644
--- a/src/components/views/project/ProjectGIVbackToast.tsx
+++ b/src/components/views/project/ProjectGIVbackToast.tsx
@@ -1,4 +1,3 @@
-import * as process from 'node:process';
import styled from 'styled-components';
import {
B,
@@ -34,6 +33,7 @@ import { EProjectStatus } from '@/apollo/types/gqlEnums';
import { EVerificationStatus } from '@/apollo/types/types';
import Routes from '@/lib/constants/Routes';
import { VerificationModal } from '@/components/modals/VerificationModal';
+import { GIVBACKS_DONATION_QUALIFICATION_VALUE_USD } from '@/lib/constants/constants';
const ProjectGIVbackToast = () => {
const [showBoost, setShowBoost] = useState(false);
@@ -49,7 +49,7 @@ const ProjectGIVbackToast = () => {
const color = isOwnerVerified
? semanticColors.golden[600]
: neutralColors.gray[900];
- const { formatMessage } = useIntl();
+ const { formatMessage, locale } = useIntl();
const { open: openConnectModal } = useWeb3Modal();
const {
isEnabled,
@@ -85,8 +85,6 @@ const ProjectGIVbackToast = () => {
let description, Button;
const givbackFactorPercent = ((givbackFactor || 0) * 100).toFixed();
- const NEXT_PUBLIC_GIVBACKS_DONATION_QUALIFICATION_VALUE_USD =
- process.env.NEXT_PUBLIC_GIVBACKS_DONATION_QUALIFICATION_VALUE_USD;
if (isOwnerVerified) {
if (givbackFactor !== 0) {
@@ -96,7 +94,7 @@ const ProjectGIVbackToast = () => {
},
{
percent: givbackFactorPercent,
- value: NEXT_PUBLIC_GIVBACKS_DONATION_QUALIFICATION_VALUE_USD,
+ value: GIVBACKS_DONATION_QUALIFICATION_VALUE_USD,
},
);
}
diff --git a/src/lib/constants/constants.ts b/src/lib/constants/constants.ts
index 01a09b637b..788408a55e 100644
--- a/src/lib/constants/constants.ts
+++ b/src/lib/constants/constants.ts
@@ -125,3 +125,5 @@ export const WeiPerEther = 1e18;
export const PROFILE_PHOTO_PLACEHOLDER = '/images/placeholders/profile.svg';
export const solanaNativeAddress = '11111111111111111111111111111111';
+
+export const GIVBACKS_DONATION_QUALIFICATION_VALUE_USD = 5;
From 70fe9f305ff67aed73a6fe3cfdce37353176a479 Mon Sep 17 00:00:00 2001
From: Ramin
Date: Tue, 17 Sep 2024 13:51:30 +0330
Subject: [PATCH 15/19] update verified_public givback copy
---
lang/ca.json | 2 +-
lang/en.json | 2 +-
lang/es.json | 2 +-
.../views/project/ProjectGIVbackToast.tsx | 15 ++++++++++-----
4 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/lang/ca.json b/lang/ca.json
index 4756056703..5badef90a1 100644
--- a/lang/ca.json
+++ b/lang/ca.json
@@ -1628,7 +1628,7 @@
"project.givback_toast.description.non_verified_owner_submitted": "Notícies emocionants! La teva sol·licitud ha estat enviada i està a la cua per ser revisada pel nostre equip de revisió d'elegibilitat per a GIVbacks. Et respondrem en un termini d'1-2 setmanes.",
"project.givback_toast.description.non_verified_public": "Actualment, els GIVbacks només s'atorguen per donacions fetes a projectes elegibles per a GIVbacks a Ethereum. La teva contribució segueix sent important, fins i tot si no genera GIVbacks!",
"project.givback_toast.description.verified_owner": "Potencia el teu projecte per augmentar el seu percentatge de GIVbacks i ajudar-lo a aparèixer més amunt a la pàgina de projectes!",
- "project.givback_toast.description.verified_public": "Les donacions a Ethereum a projectes elegibles per a GIVbacks són recompensades amb GIV. Impulsa aquest projecte per augmentar el seu percentatge de recompenses i fer-lo més visible a la pàgina de projectes!",
+ "project.givback_toast.description.verified_public": "Les donacions de ${value} o més són elegibles per a GIVback. Potencia aquest projecte per augmentar el seu percentatge de recompenses i la seva visibilitat a la pàgina de projectes!",
"project.givback_toast.title.non_verified_owner": "El teu projecte està creant o donant suport a béns públics?",
"project.givback_toast.title.non_verified_owner_cancelled": "Estat Cancel·lat",
"project.givback_toast.title.non_verified_owner_deactive": "Mode Desactivat",
diff --git a/lang/en.json b/lang/en.json
index 1d05e41a79..03278c539f 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1633,7 +1633,7 @@
"project.givback_toast.description.non_verified_owner_submitted": "Exciting news! Your application has been submitted and is in the queue for review by our GIVbacks Eligibility review team. We will get back to you with a response within 1-2 weeks.",
"project.givback_toast.description.non_verified_public": "GIVbacks are currently only awarded for donations made to GIVbacks Eligible projects on Ethereum. Your contribution still matters, even if it doesn't generate GIVbacks!",
"project.givback_toast.description.verified_owner": "Boost your project to increase its GIVbacks percentage and help it appear higher on the projects page!",
- "project.givback_toast.description.verified_public": "Ethereum donations to GIVbacks Eligible projects are rewarded with GIV. Boost this project to increase its rewards percentage and make it more visible on the projects page!",
+ "project.givback_toast.description.verified_public": "Donations of ${value} or more are eligible for GIVbacks. Boost this project to increase its rewards percentage and visibility on the projects page!",
"project.givback_toast.title.non_verified_owner": "Is your project creating or supporting public goods?",
"project.givback_toast.title.non_verified_owner_cancelled": "Project Cancelled",
"project.givback_toast.title.non_verified_owner_deactive": "Project Deactivated",
diff --git a/lang/es.json b/lang/es.json
index 07499c878c..8a2375011b 100644
--- a/lang/es.json
+++ b/lang/es.json
@@ -1628,7 +1628,7 @@
"project.givback_toast.description.non_verified_owner_submitted": "¡Noticias emocionantes! Tu solicitud ha sido enviada y está en la cola para ser revisada por nuestro equipo de revisión de elegibilidad para GIVbacks. Te responderemos en un plazo de 1-2 semanas.",
"project.givback_toast.description.non_verified_public": "Actualmente, los GIVbacks solo se otorgan por donaciones hechas a proyectos elegibles para GIVbacks en Ethereum. ¡Tu contribución sigue siendo importante, incluso si no genera GIVbacks!",
"project.givback_toast.description.verified_owner": "¡Impulsa tu proyecto para aumentar su porcentaje de GIVbacks y ayúdalo a aparecer más arriba en la página de proyectos!",
- "project.givback_toast.description.verified_public": "Las donaciones en Ethereum a proyectos elegibles para GIVbacks son recompensadas con GIV. ¡Impulsa este proyecto para aumentar su porcentaje de recompensas y hacerlo más visible en la página de proyectos!",
+ "project.givback_toast.description.verified_public": "Las donaciones de ${value} o más son elegibles para recibir GIVbacks. ¡Impulsa este proyecto para aumentar su porcentaje de recompensas y su visibilidad en la página de proyectos!",
"project.givback_toast.title.non_verified_owner": "¿Tu proyecto está creando o apoyando bienes públicos?",
"project.givback_toast.title.non_verified_owner_cancelled": "Estado Cancelado",
"project.givback_toast.title.non_verified_owner_deactive": "Modo Desactivado",
diff --git a/src/components/views/project/ProjectGIVbackToast.tsx b/src/components/views/project/ProjectGIVbackToast.tsx
index 1e76c08eb2..8e040876b9 100644
--- a/src/components/views/project/ProjectGIVbackToast.tsx
+++ b/src/components/views/project/ProjectGIVbackToast.tsx
@@ -49,7 +49,7 @@ const ProjectGIVbackToast = () => {
const color = isOwnerVerified
? semanticColors.golden[600]
: neutralColors.gray[900];
- const { formatMessage, locale } = useIntl();
+ const { formatMessage } = useIntl();
const { open: openConnectModal } = useWeb3Modal();
const {
isEnabled,
@@ -220,9 +220,14 @@ const ProjectGIVbackToast = () => {
id: `${useIntlTitle}verified_public_2`,
});
}
- description = formatMessage({
- id: `${useIntlDescription}verified_public`,
- });
+ description = formatMessage(
+ {
+ id: `${useIntlDescription}verified_public`,
+ },
+ {
+ value: GIVBACKS_DONATION_QUALIFICATION_VALUE_USD,
+ },
+ );
Button = (
Date: Tue, 17 Sep 2024 15:36:50 +0330
Subject: [PATCH 16/19] Fix WALLET_ADDRESS_IS_VALID query params
---
src/apollo/gql/gqlProjects.ts | 2 +-
src/components/GIVeconomyPages/GIVpower.tsx | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/apollo/gql/gqlProjects.ts b/src/apollo/gql/gqlProjects.ts
index 2b59212024..3704ad2ce0 100644
--- a/src/apollo/gql/gqlProjects.ts
+++ b/src/apollo/gql/gqlProjects.ts
@@ -493,7 +493,7 @@ export const UPLOAD_IMAGE = gql`
export const WALLET_ADDRESS_IS_VALID = gql`
query WalletAddressIsValid(
$address: String!
- $chainType: String
+ $chainType: ChainType
$memo: String
) {
walletAddressIsValid(
diff --git a/src/components/GIVeconomyPages/GIVpower.tsx b/src/components/GIVeconomyPages/GIVpower.tsx
index 39fd6ca78c..9d1720f2cc 100644
--- a/src/components/GIVeconomyPages/GIVpower.tsx
+++ b/src/components/GIVeconomyPages/GIVpower.tsx
@@ -315,6 +315,7 @@ export function TabPowerBottom() {
{formatMessage({ id: 'label.for_givers' })}
+
{/* Adding a line break here */}
From d99b7947eda1925a5590fd412864ceea4611fcab Mon Sep 17 00:00:00 2001
From: Ramin
Date: Tue, 17 Sep 2024 15:46:22 +0330
Subject: [PATCH 17/19] add min givbacks badge
---
lang/ca.json | 2 +
lang/en.json | 2 +
lang/es.json | 2 +
package.json | 2 +-
.../donate/OnTime/OneTimeDonationCard.tsx | 64 ++++++++++++++++---
.../views/project/ProjectGIVbackToast.tsx | 2 +-
yarn.lock | 8 +--
7 files changed, 67 insertions(+), 15 deletions(-)
diff --git a/lang/ca.json b/lang/ca.json
index 5badef90a1..777c9f3694 100644
--- a/lang/ca.json
+++ b/lang/ca.json
@@ -1345,6 +1345,8 @@
"page.donate.passport_toast.title.non_eligible": "No et perdis l'emparellament!",
"page.donate.title": "Donar",
"page.donate.zero_fees": "Sense Comissions",
+ "page.donate.donate_$_to_be_eligible": "Fes una donació de ${value} per ser elegible per a GIVbacks",
+ "page.donate.donate_$_to_get_matched": "Dona ${value} per igualar la teva donació",
"page.engage.discord.desc": "Uneix-te a la conversa! Discord és on el nostre equip es comunica. Presenta't, dóna'ns comentaris, descobreix com contribuir o simplement saluda!",
"page.engage.discourse.desc": "El fòrum de Giveth és on creem discursos sobre propostes noves i existents. Compartim idees sobre desenvolupament i governança, cultivant discussions sobre temes importants al voltant del nostre equip i la comunitat.",
"page.engage.github.desc": "Tens habilitats de desenvolupament? Comprova el nostre Github! Sempre benvingut a nous col·laboradors. Si us plau, uneix-te a un dels nostres canals de dev a Discord per saludar-nos!",
diff --git a/lang/en.json b/lang/en.json
index 03278c539f..3b95d87036 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1350,6 +1350,8 @@
"page.donate.passport_toast.title.non_eligible": "Don’t miss out on matching!",
"page.donate.title": "Donate",
"page.donate.zero_fees": "Zero Fees",
+ "page.donate.donate_$_to_be_eligible": "Donate ${value} to be eligible for GIVbacks",
+ "page.donate.donate_$_to_get_matched": "Donate ${value} to get your donation matched",
"page.engage.discord.desc": "Join the conversation! Discord is where our team communicates. Introduce yourself, give us feedback, find out how to contribute or just say hello!",
"page.engage.discourse.desc": "The Giveth forum is where we create discourse around new and existing proposals. We share ideas involving development and governance, cultivating discussions about important topics around our team and community.",
"page.engage.github.desc": "Got some developer skills? Check out our Github! We always welcome new contributors. Please also join one of our dev channels in Discord to say hello!",
diff --git a/lang/es.json b/lang/es.json
index 8a2375011b..a27a04a20b 100644
--- a/lang/es.json
+++ b/lang/es.json
@@ -1345,6 +1345,8 @@
"page.donate.passport_toast.title.non_eligible": "¡No te pierdas la oportunidad!",
"page.donate.title": "Donar",
"page.donate.zero_fees": "Sin Comisiones",
+ "page.donate.donate_$_to_be_eligible": "Dona ${value} para ser elegible para GIVbacks",
+ "page.donate.donate_$_to_get_matched": "Dona ${value} para que tu donación sea igualada",
"page.engage.discord.desc": "¡Únete a la conversación! Nuestro equipo se comunica en Discord. Preséntate, danos retroalimentación, descubre cómo contribuir o ¡sólo saluda!",
"page.engage.discourse.desc": "El foro de Giveth es donde creamos debates alrededor de propuestas existentes y nuevas. Compartimos ideas sobre el desarrollo y la gobernanza, desarrollando debates sobre temas importantes en torno a nuestro equipo y comunidad.",
"page.engage.github.desc": "¿Sabes de desarrollo? ¡Entra a nuestro Github! Las puertas siempre están abiertas para nuevos colaboradores. ¡También te invitamos a unirte a nuestro canal de devs en Discord!",
diff --git a/package.json b/package.json
index 304acf1ae4..bf592bb43e 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
},
"dependencies": {
"@apollo/client": "^3.10.4",
- "@giveth/ui-design-system": "^1.11.34",
+ "@giveth/ui-design-system": "^1.11.35",
"@next/third-parties": "^14.2.5",
"@react-google-maps/api": "^2.19.3",
"@reduxjs/toolkit": "^2.2.4",
diff --git a/src/components/views/donate/OnTime/OneTimeDonationCard.tsx b/src/components/views/donate/OnTime/OneTimeDonationCard.tsx
index 695b5b7c06..b6238dcdfe 100644
--- a/src/components/views/donate/OnTime/OneTimeDonationCard.tsx
+++ b/src/components/views/donate/OnTime/OneTimeDonationCard.tsx
@@ -8,6 +8,8 @@ import {
Flex,
FlexCenter,
IconCaretDown16,
+ IconGIVBack24,
+ IconQFNew,
IconRefresh16,
IconWalletOutline24,
neutralColors,
@@ -62,6 +64,7 @@ import { useSolanaBalance } from '@/hooks/useSolanaBalance';
import { isWalletSanctioned } from '@/services/donation';
import SanctionModal from '@/components/modals/SanctionedModal';
import { useTokenPrice } from '@/hooks/useTokenPrice';
+import { GIVBACKS_DONATION_QUALIFICATION_VALUE_USD } from '@/lib/constants/constants';
const CryptoDonation: FC<{
acceptedTokens: IProjectAcceptedToken[] | undefined;
@@ -408,6 +411,32 @@ const CryptoDonation: FC<{
})}
)}
+ {isConnected && (
+
+
+
+ {formatMessage(
+ {
+ id: 'page.donate.donate_$_to_get_matched',
+ },
+ {
+ value: activeStartedRound?.minimumValidUsdValue,
+ },
+ )}
+
+
+
+ {formatMessage(
+ {
+ id: 'page.donate.donate_$_to_be_eligible',
+ },
+ {
+ value: GIVBACKS_DONATION_QUALIFICATION_VALUE_USD,
+ },
+ )}
+
+
+ )}
div {
+ height: 36px;
+ }
+`;
+
+const GivbacksEligibilityBadge = styled(BadgesBase)``;
+
+const QFEligibilityBadge = styled(BadgesBase)``;
+
const FlexStyled = styled(Flex)<{ disabled: boolean }>`
${props =>
props.disabled &&
@@ -594,16 +648,8 @@ const DonateAnonymously = styled.div<{ disabled: boolean }>`
props.disabled ? neutralColors.gray[600] + ' !important' : 'inherit'};
`;
-const ConnectWallet = styled(FlexCenter)`
- background: ${neutralColors.gray[200]};
- color: ${neutralColors.gray[700]};
- border-radius: 8px;
- gap: 8px;
- border: 1px solid ${neutralColors.gray[400]};
- padding: 4px;
+const ConnectWallet = styled(BadgesBase)`
margin: 12px 0 24px;
- font-size: 12px;
- font-weight: 500;
`;
const WarnError = styled.div`
diff --git a/src/components/views/project/ProjectGIVbackToast.tsx b/src/components/views/project/ProjectGIVbackToast.tsx
index 8e040876b9..721eb2a3a1 100644
--- a/src/components/views/project/ProjectGIVbackToast.tsx
+++ b/src/components/views/project/ProjectGIVbackToast.tsx
@@ -310,7 +310,7 @@ const ButtonWrapper = styled.div`
flex-direction: row-reverse;
color: ${brandColors.giv[500]};
gap: 0;
- width: 180px;
+ min-width: 180px;
svg {
margin-right: 8px;
flex-shrink: 0;
diff --git a/yarn.lock b/yarn.lock
index 14e51e8bbd..d090716860 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1329,10 +1329,10 @@
"@solana/wallet-adapter-base" "^0.9.17"
bs58 "^5.0.0"
-"@giveth/ui-design-system@^1.11.34":
- version "1.11.34"
- resolved "https://registry.npmjs.org/@giveth/ui-design-system/-/ui-design-system-1.11.34.tgz"
- integrity sha512-gt28LwEcZ7KBIkqonCkiPkVLNBfxyq/3YDfFQTl8V0zqW3RzfOvIAex4XV10DTu+wJUiizN1AiQSy6h5CJgVgw==
+"@giveth/ui-design-system@^1.11.35":
+ version "1.11.35"
+ resolved "https://registry.yarnpkg.com/@giveth/ui-design-system/-/ui-design-system-1.11.35.tgz#4b00527656bedbbb1db7c071d7e7e88390b930e5"
+ integrity sha512-kMPRNR476KUEA9aCJ9PTQiKz5Q+xTgwrHvrNB1prFE10/gfx5efdvutLW76GcPgarjPgQQ0UhthvYaifPP7bFA==
dependencies:
next "14.1.0"
react "^18"
From 768d37f94ce9f3ba54fcd10abd0fd27496edc942 Mon Sep 17 00:00:00 2001
From: Ramin
Date: Tue, 17 Sep 2024 16:49:25 +0330
Subject: [PATCH 18/19] add min givbacks badge active color
---
lang/ca.json | 2 +
lang/en.json | 2 +
lang/es.json | 2 +
.../donate/OnTime/EstimatedMatchingToast.tsx | 5 +-
.../donate/OnTime/OneTimeDonationCard.tsx | 66 ++++++++++++++-----
5 files changed, 57 insertions(+), 20 deletions(-)
diff --git a/lang/ca.json b/lang/ca.json
index 777c9f3694..23e72f6c78 100644
--- a/lang/ca.json
+++ b/lang/ca.json
@@ -1347,6 +1347,8 @@
"page.donate.zero_fees": "Sense Comissions",
"page.donate.donate_$_to_be_eligible": "Fes una donació de ${value} per ser elegible per a GIVbacks",
"page.donate.donate_$_to_get_matched": "Dona ${value} per igualar la teva donació",
+ "page.donate.donations_will_be_matched": "La donació serà igualada",
+ "page.donate.givbacks_eligible": "GIVbacks elegibles",
"page.engage.discord.desc": "Uneix-te a la conversa! Discord és on el nostre equip es comunica. Presenta't, dóna'ns comentaris, descobreix com contribuir o simplement saluda!",
"page.engage.discourse.desc": "El fòrum de Giveth és on creem discursos sobre propostes noves i existents. Compartim idees sobre desenvolupament i governança, cultivant discussions sobre temes importants al voltant del nostre equip i la comunitat.",
"page.engage.github.desc": "Tens habilitats de desenvolupament? Comprova el nostre Github! Sempre benvingut a nous col·laboradors. Si us plau, uneix-te a un dels nostres canals de dev a Discord per saludar-nos!",
diff --git a/lang/en.json b/lang/en.json
index 3b95d87036..85ff94c8bd 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1352,6 +1352,8 @@
"page.donate.zero_fees": "Zero Fees",
"page.donate.donate_$_to_be_eligible": "Donate ${value} to be eligible for GIVbacks",
"page.donate.donate_$_to_get_matched": "Donate ${value} to get your donation matched",
+ "page.donate.donations_will_be_matched": "Donation will be matched",
+ "page.donate.givbacks_eligible": "GIVbacks eligible",
"page.engage.discord.desc": "Join the conversation! Discord is where our team communicates. Introduce yourself, give us feedback, find out how to contribute or just say hello!",
"page.engage.discourse.desc": "The Giveth forum is where we create discourse around new and existing proposals. We share ideas involving development and governance, cultivating discussions about important topics around our team and community.",
"page.engage.github.desc": "Got some developer skills? Check out our Github! We always welcome new contributors. Please also join one of our dev channels in Discord to say hello!",
diff --git a/lang/es.json b/lang/es.json
index a27a04a20b..40b132b67e 100644
--- a/lang/es.json
+++ b/lang/es.json
@@ -1347,6 +1347,8 @@
"page.donate.zero_fees": "Sin Comisiones",
"page.donate.donate_$_to_be_eligible": "Dona ${value} para ser elegible para GIVbacks",
"page.donate.donate_$_to_get_matched": "Dona ${value} para que tu donación sea igualada",
+ "page.donate.donations_will_be_matched": "La donación será igualada",
+ "page.donate.givbacks_eligible": "Elegibles para GIVbacks",
"page.engage.discord.desc": "¡Únete a la conversación! Nuestro equipo se comunica en Discord. Preséntate, danos retroalimentación, descubre cómo contribuir o ¡sólo saluda!",
"page.engage.discourse.desc": "El foro de Giveth es donde creamos debates alrededor de propuestas existentes y nuevas. Compartimos ideas sobre el desarrollo y la gobernanza, desarrollando debates sobre temas importantes en torno a nuestro equipo y comunidad.",
"page.engage.github.desc": "¿Sabes de desarrollo? ¡Entra a nuestro Github! Las puertas siempre están abiertas para nuevos colaboradores. ¡También te invitamos a unirte a nuestro canal de devs en Discord!",
diff --git a/src/components/views/donate/OnTime/EstimatedMatchingToast.tsx b/src/components/views/donate/OnTime/EstimatedMatchingToast.tsx
index 6c39277075..3b62dec1cf 100644
--- a/src/components/views/donate/OnTime/EstimatedMatchingToast.tsx
+++ b/src/components/views/donate/OnTime/EstimatedMatchingToast.tsx
@@ -21,7 +21,6 @@ import {
getActiveRound,
} from '@/helpers/qf';
import { IProjectAcceptedToken } from '@/apollo/types/gqlTypes';
-import { useTokenPrice } from '@/hooks/useTokenPrice';
import { formatDonation } from '@/helpers/number';
import { formatBalance, truncateToDecimalPlaces } from '@/lib/helpers';
@@ -29,20 +28,20 @@ interface IEstimatedMatchingToast {
projectData: IProject;
amount: bigint;
token?: IProjectAcceptedToken;
+ tokenPrice?: number;
}
const EstimatedMatchingToast: React.FC = ({
projectData,
token,
amount,
+ tokenPrice,
}) => {
const { formatMessage, locale } = useIntl();
const { estimatedMatching, qfRounds } = projectData || {};
const { allProjectsSum, matchingPool, projectDonationsSqrtRootSum } =
estimatedMatching || {};
- const tokenPrice = useTokenPrice(token);
-
const { activeStartedRound } = getActiveRound(qfRounds);
const {
allocatedFundUSDPreferred,
diff --git a/src/components/views/donate/OnTime/OneTimeDonationCard.tsx b/src/components/views/donate/OnTime/OneTimeDonationCard.tsx
index b6238dcdfe..410548b0d1 100644
--- a/src/components/views/donate/OnTime/OneTimeDonationCard.tsx
+++ b/src/components/views/donate/OnTime/OneTimeDonationCard.tsx
@@ -12,12 +12,14 @@ import {
IconQFNew,
IconRefresh16,
IconWalletOutline24,
+ mediaQueries,
neutralColors,
semanticColors,
} from '@giveth/ui-design-system';
// @ts-ignore
import { Address, Chain, formatUnits, zeroAddress } from 'viem';
import { useBalance, useEstimateFeesPerGas, useEstimateGas } from 'wagmi';
+import { ethers } from 'ethers';
import { setShowWelcomeModal } from '@/features/modal/modal.slice';
import CheckBox from '@/components/Checkbox';
@@ -352,6 +354,16 @@ const CryptoDonation: FC<{
selectedOneTimeToken?.decimals ?? 18,
);
+ const donationUsdValue =
+ (tokenPrice || 0) * Number(ethers.utils.formatEther(amount));
+
+ const isDonationMatched =
+ !!activeStartedRound &&
+ donationUsdValue >= (activeStartedRound?.minimumValidUsdValue || 0);
+
+ const isGiveBacksEligible =
+ donationUsdValue >= GIVBACKS_DONATION_QUALIFICATION_VALUE_USD;
+
return (
{isSanctioned && (
@@ -413,22 +425,34 @@ const CryptoDonation: FC<{
)}
{isConnected && (
-
-
- {formatMessage(
- {
- id: 'page.donate.donate_$_to_get_matched',
- },
- {
- value: activeStartedRound?.minimumValidUsdValue,
- },
- )}
-
-
-
+ {activeStartedRound && (
+
+
+ {formatMessage(
+ {
+ id: isDonationMatched
+ ? 'page.donate.donations_will_be_matched'
+ : 'page.donate.donate_$_to_get_matched',
+ },
+ {
+ value: activeStartedRound?.minimumValidUsdValue,
+ },
+ )}
+
+ )}
+
+
{formatMessage(
{
- id: 'page.donate.donate_$_to_be_eligible',
+ id: isGiveBacksEligible
+ ? 'page.donate.givbacks_eligible'
+ : 'page.donate.donate_$_to_be_eligible',
},
{
value: GIVBACKS_DONATION_QUALIFICATION_VALUE_USD,
@@ -522,6 +546,7 @@ const CryptoDonation: FC<{
projectData={project}
token={selectedOneTimeToken}
amount={amount}
+ tokenPrice={tokenPrice}
/>
)}
{!noDonationSplit ? (
@@ -609,14 +634,17 @@ const CryptoDonation: FC<{
);
};
-const BadgesBase = styled(FlexCenter)`
+const BadgesBase = styled(FlexCenter)<{ active?: boolean }>`
gap: 8px;
font-size: 12px;
font-weight: 500;
background: ${neutralColors.gray[200]};
- color: ${neutralColors.gray[700]};
+ color: ${props =>
+ props.active ? semanticColors.jade[500] : neutralColors.gray[700]};
border-radius: 8px;
- border: 1px solid ${neutralColors.gray[400]};
+ border: 1px solid
+ ${props =>
+ props.active ? semanticColors.jade[400] : neutralColors.gray[400]};
padding: 4px;
`;
@@ -628,6 +656,10 @@ const EligibilityBadgeWrapper = styled(Flex)`
> div {
height: 36px;
}
+ ${mediaQueries.tablet} {
+ flex-direction: row;
+ justify-content: flex-start;
+ }
`;
const GivbacksEligibilityBadge = styled(BadgesBase)``;
From 90872b05010d67486ef543944acf7874c6ed2c2f Mon Sep 17 00:00:00 2001
From: Ramin
Date: Tue, 17 Sep 2024 17:31:29 +0330
Subject: [PATCH 19/19] add givbacks badge conditions
---
lang/ca.json | 2 +
lang/en.json | 2 +
lang/es.json | 2 +
.../donate/OnTime/OneTimeDonationCard.tsx | 37 ++++++++++++-------
4 files changed, 29 insertions(+), 14 deletions(-)
diff --git a/lang/ca.json b/lang/ca.json
index 23e72f6c78..7063a4dd13 100644
--- a/lang/ca.json
+++ b/lang/ca.json
@@ -1349,6 +1349,8 @@
"page.donate.donate_$_to_get_matched": "Dona ${value} per igualar la teva donació",
"page.donate.donations_will_be_matched": "La donació serà igualada",
"page.donate.givbacks_eligible": "GIVbacks elegibles",
+ "page.donate.project_not_givbacks_eligible": "El projecte no és elegible per a GIVbacks",
+ "page.donate.token_not_givbacks_eligible": "{token} no és apte per a GIVbacks",
"page.engage.discord.desc": "Uneix-te a la conversa! Discord és on el nostre equip es comunica. Presenta't, dóna'ns comentaris, descobreix com contribuir o simplement saluda!",
"page.engage.discourse.desc": "El fòrum de Giveth és on creem discursos sobre propostes noves i existents. Compartim idees sobre desenvolupament i governança, cultivant discussions sobre temes importants al voltant del nostre equip i la comunitat.",
"page.engage.github.desc": "Tens habilitats de desenvolupament? Comprova el nostre Github! Sempre benvingut a nous col·laboradors. Si us plau, uneix-te a un dels nostres canals de dev a Discord per saludar-nos!",
diff --git a/lang/en.json b/lang/en.json
index 85ff94c8bd..8b2ecee34c 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1354,6 +1354,8 @@
"page.donate.donate_$_to_get_matched": "Donate ${value} to get your donation matched",
"page.donate.donations_will_be_matched": "Donation will be matched",
"page.donate.givbacks_eligible": "GIVbacks eligible",
+ "page.donate.project_not_givbacks_eligible": "Project is not GIVbacks eligible",
+ "page.donate.token_not_givbacks_eligible": "{token} is not eligible for GIVbacks",
"page.engage.discord.desc": "Join the conversation! Discord is where our team communicates. Introduce yourself, give us feedback, find out how to contribute or just say hello!",
"page.engage.discourse.desc": "The Giveth forum is where we create discourse around new and existing proposals. We share ideas involving development and governance, cultivating discussions about important topics around our team and community.",
"page.engage.github.desc": "Got some developer skills? Check out our Github! We always welcome new contributors. Please also join one of our dev channels in Discord to say hello!",
diff --git a/lang/es.json b/lang/es.json
index 40b132b67e..029ab115e3 100644
--- a/lang/es.json
+++ b/lang/es.json
@@ -1349,6 +1349,8 @@
"page.donate.donate_$_to_get_matched": "Dona ${value} para que tu donación sea igualada",
"page.donate.donations_will_be_matched": "La donación será igualada",
"page.donate.givbacks_eligible": "Elegibles para GIVbacks",
+ "page.donate.project_not_givbacks_eligible": "El proyecto no es elegible para GIVbacks",
+ "page.donate.token_not_givbacks_eligible": "{token} no es elegible para GIVbacks",
"page.engage.discord.desc": "¡Únete a la conversación! Nuestro equipo se comunica en Discord. Preséntate, danos retroalimentación, descubre cómo contribuir o ¡sólo saluda!",
"page.engage.discourse.desc": "El foro de Giveth es donde creamos debates alrededor de propuestas existentes y nuevas. Compartimos ideas sobre el desarrollo y la gobernanza, desarrollando debates sobre temas importantes en torno a nuestro equipo y comunidad.",
"page.engage.github.desc": "¿Sabes de desarrollo? ¡Entra a nuestro Github! Las puertas siempre están abiertas para nuevos colaboradores. ¡También te invitamos a unirte a nuestro canal de devs en Discord!",
diff --git a/src/components/views/donate/OnTime/OneTimeDonationCard.tsx b/src/components/views/donate/OnTime/OneTimeDonationCard.tsx
index 410548b0d1..0f8bb1443e 100644
--- a/src/components/views/donate/OnTime/OneTimeDonationCard.tsx
+++ b/src/components/views/donate/OnTime/OneTimeDonationCard.tsx
@@ -144,11 +144,10 @@ const CryptoDonation: FC<{
});
const tokenDecimals = selectedOneTimeToken?.decimals || 18;
- const projectIsGivBackEligible = !!verified;
const { activeStartedRound } = getActiveRound(project.qfRounds);
const networkId = (chain as Chain)?.id;
- const isOnEligibleNetworks =
+ const isOnQFEligibleNetworks =
networkId && activeStartedRound?.eligibleNetworks?.includes(networkId);
const tokenPrice = useTokenPrice(selectedOneTimeToken);
@@ -253,7 +252,7 @@ const CryptoDonation: FC<{
}
if (
hasActiveQFRound &&
- !isOnEligibleNetworks &&
+ !isOnQFEligibleNetworks &&
selectedOneTimeToken?.chainType === ChainType.EVM
) {
setShowQFModal(true);
@@ -361,7 +360,11 @@ const CryptoDonation: FC<{
!!activeStartedRound &&
donationUsdValue >= (activeStartedRound?.minimumValidUsdValue || 0);
- const isGiveBacksEligible =
+ const isTokenGivbacksEligible = selectedOneTimeToken?.isGivbackEligible;
+ const isProjectGivbacksEligible = !!verified;
+ const isGivbacksEligible =
+ isTokenGivbacksEligible &&
+ isProjectGivbacksEligible &&
donationUsdValue >= GIVBACKS_DONATION_QUALIFICATION_VALUE_USD;
return (
@@ -401,7 +404,7 @@ const CryptoDonation: FC<{
givethDonationAmount={givethDonationAmount}
anonymous={anonymous}
givBackEligible={
- projectIsGivBackEligible &&
+ isProjectGivbacksEligible &&
selectedOneTimeToken.isGivbackEligible &&
tokenPrice !== undefined &&
tokenPrice * projectDonationAmount >= 4
@@ -425,7 +428,7 @@ const CryptoDonation: FC<{
)}
{isConnected && (
- {activeStartedRound && (
+ {activeStartedRound && isOnQFEligibleNetworks && (
{formatMessage(
@@ -440,22 +443,28 @@ const CryptoDonation: FC<{
)}
)}
-
+
{formatMessage(
{
- id: isGiveBacksEligible
+ id: isGivbacksEligible
? 'page.donate.givbacks_eligible'
- : 'page.donate.donate_$_to_be_eligible',
+ : !isProjectGivbacksEligible
+ ? 'page.donate.project_not_givbacks_eligible'
+ : selectedOneTimeToken &&
+ !isTokenGivbacksEligible
+ ? 'page.donate.token_not_givbacks_eligible'
+ : 'page.donate.donate_$_to_be_eligible',
},
{
value: GIVBACKS_DONATION_QUALIFICATION_VALUE_USD,
+ token: selectedOneTimeToken?.symbol,
},
)}
@@ -536,11 +545,11 @@ const CryptoDonation: FC<{
)}
- {hasActiveQFRound && !isOnEligibleNetworks && walletChainType && (
+ {hasActiveQFRound && !isOnQFEligibleNetworks && walletChainType && (
)}
{hasActiveQFRound &&
- isOnEligibleNetworks &&
+ isOnQFEligibleNetworks &&
selectedTokenBalance && (
)}
{!noDonationSplit ? (