Skip to content

Commit

Permalink
Dev (#91)
Browse files Browse the repository at this point in the history
* get signature and enroll in raffle  in boost modal

* add Glm stacking constraint

* sort twitter addresses
  • Loading branch information
abbasnosrati committed Aug 22, 2024
1 parent f7d25f8 commit 74c7009
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 39 deletions.
26 changes: 25 additions & 1 deletion app/incentive-center/components/ConstraintDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const ConstraintDetailsModal: FC<DetailsModal> = ({
};

const handleAddRequirement = () => {
console.log(constraint.params);
if (
constraint.name === "core.HasNFTVerification" ||
constraint.name === "core.HasTokenVerification" ||
Expand Down Expand Up @@ -313,7 +314,7 @@ export const CreateParams: FC<CreateModalParam> = ({
};

useEffect(() => {
if (selectedChain) {
if (selectedChain && constraint.name !== "core.GLMStakingVerification") {
handleGetTokenList();
}
}, [selectedChain]);
Expand Down Expand Up @@ -420,6 +421,29 @@ export const CreateParams: FC<CreateModalParam> = ({
);
}

if (constraint.name === "core.GLMStakingVerification") {
return (
<div className="flex flex-col gap-3">
<ChainList
setRequirementParamsList={setRequirementParamsList}
requirementParamsList={requirementParamsList}
allChainList={allChainList}
selectedChain={selectedChain}
setSelectedChain={setSelectedChain}
/>

<MinimumWeb3AmountRequirementField
setRequirementParamsList={setRequirementParamsList}
requirementParamsList={requirementParamsList}
isNft={false}
requirement={requirement}
isDisabled={!collectionAddress}
decimals={18}
/>
</div>
);
}

if (
constraint.name === "core.HasNFTVerification" ||
constraint.name === "core.HasTokenVerification"
Expand Down
2 changes: 0 additions & 2 deletions app/incentive-center/components/SelectMethodInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ export const MinimumWeb3AmountRequirementField = ({
}: Prop) => {
const [minValue, setValue] = useState<string>("");

useEffect(() => {}, []);

useEffect(() => {
if (!requirement) return;
setValue(
Expand Down
9 changes: 9 additions & 0 deletions app/incentive-center/components/constraintAppDetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ const ConstraintAppDetailModal: FC<DetailsModal> = ({

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" ||
Expand Down
4 changes: 4 additions & 0 deletions app/incentive-center/constants/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
};
14 changes: 1 addition & 13 deletions constants/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
47 changes: 24 additions & 23 deletions constants/twitterAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ export const FarcasterObject: Record<string, TwitterUser> = {
};

export const TwitterObject: Record<string, TwitterUser> = {
"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",
Expand All @@ -35,9 +51,9 @@ export const TwitterObject: Record<string, TwitterUser> = {
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",
Expand All @@ -63,18 +79,14 @@ export const TwitterObject: Record<string, TwitterUser> = {
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",
Expand All @@ -95,10 +107,7 @@ export const TwitterObject: Record<string, TwitterUser> = {
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",
Expand All @@ -111,14 +120,6 @@ export const TwitterObject: Record<string, TwitterUser> = {
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",
Expand Down
Binary file added public/assets/images/twitter/Thrive_Protocol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 74c7009

Please sign in to comment.