From 74c70097b415a4787f4db51ef0a38f8c3c463b23 Mon Sep 17 00:00:00 2001 From: Abbas Nosrati <96720246+abbasnosrati@users.noreply.github.com> Date: Thu, 22 Aug 2024 08:25:57 +0330 Subject: [PATCH] Dev (#91) * get signature and enroll in raffle in boost modal * add Glm stacking constraint * sort twitter addresses --- .../components/ConstraintDetailsModal.tsx | 26 +++++++++- .../components/SelectMethodInput.tsx | 2 - .../components/constraintAppDetailModal.tsx | 9 ++++ .../constants/integrations.ts | 4 ++ constants/address.ts | 14 +----- constants/twitterAddresses.ts | 47 +++++++++--------- .../assets/images/twitter/Thrive_Protocol.png | Bin 0 -> 8151 bytes 7 files changed, 63 insertions(+), 39 deletions(-) create mode 100644 public/assets/images/twitter/Thrive_Protocol.png diff --git a/app/incentive-center/components/ConstraintDetailsModal.tsx b/app/incentive-center/components/ConstraintDetailsModal.tsx index ac82fca5..460fba50 100644 --- a/app/incentive-center/components/ConstraintDetailsModal.tsx +++ b/app/incentive-center/components/ConstraintDetailsModal.tsx @@ -150,6 +150,7 @@ const ConstraintDetailsModal: FC = ({ }; const handleAddRequirement = () => { + console.log(constraint.params); if ( constraint.name === "core.HasNFTVerification" || constraint.name === "core.HasTokenVerification" || @@ -313,7 +314,7 @@ export const CreateParams: FC = ({ }; useEffect(() => { - if (selectedChain) { + if (selectedChain && constraint.name !== "core.GLMStakingVerification") { handleGetTokenList(); } }, [selectedChain]); @@ -420,6 +421,29 @@ export const CreateParams: FC = ({ ); } + if (constraint.name === "core.GLMStakingVerification") { + return ( +
+ + + +
+ ); + } + if ( constraint.name === "core.HasNFTVerification" || constraint.name === "core.HasTokenVerification" diff --git a/app/incentive-center/components/SelectMethodInput.tsx b/app/incentive-center/components/SelectMethodInput.tsx index 9a0655eb..49c0c271 100644 --- a/app/incentive-center/components/SelectMethodInput.tsx +++ b/app/incentive-center/components/SelectMethodInput.tsx @@ -171,8 +171,6 @@ export const MinimumWeb3AmountRequirementField = ({ }: Prop) => { const [minValue, setValue] = useState(""); - useEffect(() => {}, []); - useEffect(() => { if (!requirement) return; setValue( diff --git a/app/incentive-center/components/constraintAppDetailModal.tsx b/app/incentive-center/components/constraintAppDetailModal.tsx index d1d23de0..79aa93ff 100644 --- a/app/incentive-center/components/constraintAppDetailModal.tsx +++ b/app/incentive-center/components/constraintAppDetailModal.tsx @@ -116,6 +116,15 @@ const ConstraintAppDetailModal: FC = ({ const handleAddRequirement = () => { if (!constraint) return; + if (requirementParamsList) { + const checkValues = Object.values(requirementParamsList).every( + (value) => value !== null && value !== undefined && value !== "", + ); + + if (!checkValues) { + return; + } + } if ( constraint.name === "core.HasNFTVerification" || diff --git a/app/incentive-center/constants/integrations.ts b/app/incentive-center/constants/integrations.ts index c603bcd8..138be551 100644 --- a/app/incentive-center/constants/integrations.ts +++ b/app/incentive-center/constants/integrations.ts @@ -41,4 +41,8 @@ export const appInfos: { logo: "/assets/images/provider-dashboard/op.svg", label: "Optimism", }, + glmStaking: { + logo: "/assets/images/provider-dashboard/op.svg", + label: "glmStaking", + }, }; diff --git a/constants/address.ts b/constants/address.ts index 71b6b86b..a09fff03 100644 --- a/constants/address.ts +++ b/constants/address.ts @@ -124,20 +124,8 @@ export const contractAddresses: { erc20: "0x183390bE36EA575D93b5651c36cFe73DF642eD1b", erc721: "0x0000000000000000000000000000000000000000", }, - // "30": { - // erc20: "0xC74089ff29CC6F46DE9318F4a6b482cEadbf814C", - // erc721: "0xAB98C8DAD87C2fEB1fb723994c97845f26bc1dce", - // }, - - // "204": { - // erc20: "0xC74089ff29CC6F46DE9318F4a6b482cEadbf814C", - // erc721: "0xAB98C8DAD87C2fEB1fb723994c97845f26bc1dce", - // }, - // "42220": { - // erc20: "0xC74089ff29CC6F46DE9318F4a6b482cEadbf814C", - // erc721: "0xAB98C8DAD87C2fEB1fb723994c97845f26bc1dce", - // }, "137": { + // Polygon erc20: "0xeb1Ad34EA13aF7Ec73Bb872F3Ab2B9250d62b7FD", erc721: "0xAaBD83213d545180eeC498877Aa7891E232FCE59", }, diff --git a/constants/twitterAddresses.ts b/constants/twitterAddresses.ts index 59299ffb..053e5826 100644 --- a/constants/twitterAddresses.ts +++ b/constants/twitterAddresses.ts @@ -19,6 +19,22 @@ export const FarcasterObject: Record = { }; export const TwitterObject: Record = { + "1544104934274211847": { + name: "thriveprotocol", + logo: "./assets/images/twitter/Thrive_Protocol.png", + }, + "1676050567842635776": { + name: "ThrivePolygon", + logo: "./assets/images/twitter/Thrive_Polygon.png", + }, + "1522613392766377984": { + name: "Unitap_app", + logo: "./assets/images/twitter/logo.png", + }, + "1728723404033814528": { + name: "0xmayalabs", + logo: "./assets/images/twitter/Maya_Labs.png", + }, "1456524590004510731": { name: "3look_io", logo: "./assets/images/twitter/3look.png", @@ -35,9 +51,9 @@ export const TwitterObject: Record = { name: "CarbonCreditXyz", logo: "./assets/images/twitter/Carbon_Credit.png", }, - "1803169714245439488": { - name: "RedditCurrency", - logo: "./assets/images/twitter/Community_Currency.png", + "1650810785474437121": { + name: "citizenwallet", + logo: "./assets/images/twitter/Citizen_Wallet.png", }, "1781331280006725632": { name: "crackandstack", @@ -63,18 +79,14 @@ export const TwitterObject: Record = { name: "kleo_network", logo: "./assets/images/twitter/Kleo_Network.png", }, - "1728723404033814528": { - name: "0xmayalabs", - logo: "./assets/images/twitter/Maya_Labs.png", - }, - "1650810785474437121": { - name: "citizenwallet", - logo: "./assets/images/twitter/Citizen_Wallet.png", - }, "1672990186110582784": { name: "rafflxyz", logo: "./assets/images/twitter/Raffl.png", }, + "1803169714245439488": { + name: "RedditCurrency", + logo: "./assets/images/twitter/Community_Currency.png", + }, "1371771575591071750": { name: "SmartLayer", logo: "./assets/images/twitter/Smart_Layer.png", @@ -95,10 +107,7 @@ export const TwitterObject: Record = { name: "toasterfinance", logo: "./assets/images/twitter/Toaste_ Finance.png", }, - "1522613392766377984": { - name: "Unitap_app", - logo: "./assets/images/twitter/logo.png", - }, + "1492148219190685697": { name: "UPPFIRST", logo: "./assets/images/twitter/UPPFIRST.png", @@ -111,14 +120,6 @@ export const TwitterObject: Record = { name: "Xerberus_io", logo: "./assets/images/twitter/Xerberus.png", }, - "1405121796341334016": { - name: "0xPolygonEco", - logo: "./assets/images/twitter/polygon.png", - }, - "1676050567842635776": { - name: "ThrivePolygon", - logo: "./assets/images/twitter/Thrive_Polygon.png", - }, "1381921058694049797": { name: "xionglobal", logo: "./assets/images/twitter/Xion_Global.png", diff --git a/public/assets/images/twitter/Thrive_Protocol.png b/public/assets/images/twitter/Thrive_Protocol.png new file mode 100644 index 0000000000000000000000000000000000000000..d0b23d1fdb31fd24082dd6854e8358f044af978b GIT binary patch literal 8151 zcmV;|A1L67P)005u}1^@s6i_d2*00009a7bBm001mY z001mY0i`{bsQ>@~0drDELIAGL9O(c600d`2O+f$vv5yPz}zmdP!SXNfnSYKbii~^V_A)jK=qD7$v3l`KgH8n++ zFJB%hEiH}g+O;dZb?a7QMgxyaJXU6pg~Knx#pT>6DCY(As@m|3>X?VY}gc*YLQ;OdQDxqa%FhOjvche9($;N zf>D?OlbA?n9%dNxz4n05g76u92f+8NOf3JC_gGree*5j$z@KaA)~(xOKDUN#+qSKs z0Pe=sS6^LIU0od;I&^59RUu~I;7L}GIx$1Ec~2+(JE^|k*>_UC-_d#OzyJOQGi034 zd-mXj}IB?)B3gA30yX>-X ztF&vD$2OfA} z-AN~%R89d3i{p+vu7=}talZS-Hgc_s&6Pybi=D`l5LCziE2jYY1;@+6Y~v~W&Z>%Z z>E|~IC=95-$KJD&i2eHYE2jXtfo+@++jzB{Suh8gT*N3&kT4=7B0FVuhzd}E%rSQC z*x7s+H{%W$Nk5;^`_7^O>4Ed6qj_~RwpB1z|I*@NJ2Td zi8-j92t4La!0I9v3WdypBbPBiv69%$d}A9ECr*q}fMg(^$BFuS$z13vH=z75pg1fb zwyP6?lhTTD^PDGm$}9;JXPtFcIr#w`o2uc^K(k*n7{x|nbF+t>U}p4o z>DTDdqi4a(4MHl#L;5^$2E~{$V}>{F!T|#Y#E`oUn69{)5p%?h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