diff --git a/apps/web/app/(app)/gardens/page.tsx b/apps/web/app/(app)/gardens/page.tsx index 4efcfeeaf..3df5771b1 100644 --- a/apps/web/app/(app)/gardens/page.tsx +++ b/apps/web/app/(app)/gardens/page.tsx @@ -47,10 +47,26 @@ export default function Page() { return ( <> {tokenGardens - .sort( - (a, b) => - (b.communities?.length ?? 0) - (a.communities?.length ?? 0), - ) + .sort((a, b) => { + const communitiesDiff = + (b.communities?.length ?? 0) - (a.communities?.length ?? 0); + + if (communitiesDiff === 0) { + const aTotalMembers = + a.communities?.reduce( + (sum, community) => sum + (community.members?.length ?? 0), + 0, + ) ?? 0; + const bTotalMembers = + b.communities?.reduce( + (sum, community) => sum + (community.members?.length ?? 0), + 0, + ) ?? 0; + return bTotalMembers - aTotalMembers; + } + + return communitiesDiff; + }) .map((garden) => (
diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index a45fb5107..c6ab3a32e 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -3,4 +3,4 @@ import { redirect } from "next/navigation"; export default function Page() { redirect("/gardens"); -} \ No newline at end of file +} diff --git a/apps/web/components/Forms/PoolForm.tsx b/apps/web/components/Forms/PoolForm.tsx index a931b255a..1270424cf 100644 --- a/apps/web/components/Forms/PoolForm.tsx +++ b/apps/web/components/Forms/PoolForm.tsx @@ -194,7 +194,7 @@ export function PoolForm({ token, communityAddr }: Props) { rulingTime: parseTimeUnit(DEFAULT_RULING_TIMEOUT_SEC, "seconds", "days"), defaultResolution: 1, minThresholdPoints: 0, - poolTokenAddress: token.id, + poolTokenAddress: "", proposalCollateral: chain.id === polygon.id ? defaultMaticProposalColateral @@ -227,6 +227,7 @@ export function PoolForm({ token, communityAddr }: Props) { const { isConnected, missmatchUrl, tooltipMessage } = useDisableButtons(); const watchedAddress = watch("poolTokenAddress").toLowerCase() as Address; + const { data: customTokenData } = useToken({ address: watchedAddress ?? "0x", chainId: +chain, @@ -711,7 +712,7 @@ export function PoolForm({ token, communityAddr }: Props) { registerKey="maxAmount" type="number" placeholder="0" - suffix={token.symbol} + suffix={customTokenData?.symbol} />
)} diff --git a/apps/web/components/PoolCard.tsx b/apps/web/components/PoolCard.tsx index a19c177ea..9e7f512d4 100644 --- a/apps/web/components/PoolCard.tsx +++ b/apps/web/components/PoolCard.tsx @@ -76,11 +76,18 @@ export function PoolCard({ pool, tokenGarden }: Props) { icon={} count={proposals.length} label="proposals" + className={`${isEnabled ? "visible" : "invisible"}`} /> } label="funds" - className={`${poolType && PoolTypes[poolType] === "funding" ? "visible" : "invisible"}`} + className={`${ + isEnabled ? + poolType && PoolTypes[poolType] === "funding" ? + "visible" + : "invisible" + : "invisible" + }`} > -
+

- {ipfsResult?.title} #{poolId} + {ipfsResult?.title}

{(!!isCouncilMember || isCouncilSafe) && (
-
)}
-
- +
+
+ +
+ +
.graphclientrc.yml && graphclient build --fileType js", "build-all": "pnpm create-local && pnpm build && pnpm deploy:local", - "deploy:arbsep:last": "dotenvx run -- ts-node --esm -P ../../apps/web/tsconfig.json ./src/scripts/last-version.ts gv2-arbsepolia", + "deploy:arbsep:last": "dotenvx run -- ts-node --esm -P ../../apps/web/tsconfig.json ./src/scripts/last-version.ts gv2-arbitrum-sepolia", "deploy:ethsep:last": "dotenvx run -- ts-node --esm -P ../../apps/web/tsconfig.json ./src/scripts/last-version.ts gv2-ethsepolia", "codegen": "graph codegen", "tsc": "tsc" diff --git a/pkg/subgraph/subgraph.yaml b/pkg/subgraph/subgraph.yaml index 59c96e9a2..018e8978c 100644 --- a/pkg/subgraph/subgraph.yaml +++ b/pkg/subgraph/subgraph.yaml @@ -6,15 +6,15 @@ schema: dataSources: - kind: ethereum/contract name: RegistryFactoryV0_0 - network: optimism + network: gnosis context: - chainId: + chainId: type: Int - data: 10 + data: 100 source: - address: "0x1fac47cf25f1ca9f20ba366099d26b28401f5715" + address: "0x08df82f74d1f56f650e98da2dd4240f1a31711bc" abi: RegistryFactoryV0_0 - startBlock: 36032423 + startBlock: 36032424 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -33,22 +33,22 @@ dataSources: - event: CommunityValiditySet(address,bool) handler: handleCommunityValiditySet - event: ProtocolFeeSet(address,uint256) - handler: handleProtocolFeeSet + handler: handleProtocolFeeSet - event: Initialized(uint8) - handler: handleRegistryInitialized + handler: handleRegistryInitialized file: ./src/mappings/registry-factory.ts - kind: ethereum/contract name: PassportScorer - network: optimism + network: gnosis context: - chainId: + chainId: type: Int - data: 10 + data: 100 source: - address: "0xc93830dd463516ed5f28f6cd4f837173b87ff389" + address: "0xd7b72fcb6a4e2857685175f609d1498ff5392e46" abi: PassportScorer - startBlock: 36032423 + startBlock: 36032424 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -78,7 +78,7 @@ dataSources: templates: - kind: ethereum/contract name: RegistryCommunityV0_0 - network: optimism + network: gnosis source: abi: RegistryCommunityV0_0 mapping: @@ -100,7 +100,7 @@ templates: file: ../contracts/out/CVStrategyV0_0.sol/CVStrategyV0_0.json - name: RegistryFactoryV0_0 file: ../contracts/out/RegistryFactoryV0_0.sol/RegistryFactoryV0_0.json - + eventHandlers: - event: RegistryInitialized(bytes32,string,(uint256,string)) handler: handleInitialized @@ -129,7 +129,7 @@ templates: - event: MemberPowerIncreased(address,uint256) handler: handleMemberPowerIncreased # - event: BasisStakedAmountSet(uint256) - # handler: handleBasisStakedAmountSet + # handler: handleBasisStakedAmountSet # - event: CouncilSafeSet(address) # handler: handleCouncilSafeSet # - event: CouncilSafeChangeStarted(address,address) @@ -140,7 +140,7 @@ templates: - kind: ethereum/contract name: CVStrategyV0_0 - network: optimism + network: gnosis source: abi: CVStrategyV0_0 mapping: @@ -194,12 +194,12 @@ templates: handler: handleAllowlistMembersRemoved - event: SybilScorerUpdated(address) handler: handleSybilScorerUpdated - + file: ./src/mappings/cv-strategy.ts - kind: ethereum/contract name: CollateralVault - network: optimism + network: gnosis source: abi: CollateralVault mapping: @@ -219,8 +219,8 @@ templates: handler: handleCollateralWithdrawnFor - event: CollateralWithdrawn(uint256,indexed address,uint256,bool) handler: handleCollateralWithdrawn - file: ./src/mappings/cv-strategy.ts - + file: ./src/mappings/cv-strategy.ts + - name: ProposalDisputeMetadata kind: file/ipfs mapping: @@ -233,7 +233,7 @@ templates: abis: - name: CVStrategyV0_0 file: ../contracts/out/CVStrategyV0_0.sol/CVStrategyV0_0.json - + - name: ProposalMetadata kind: file/ipfs mapping: @@ -245,4 +245,4 @@ templates: - ProposalMetadata abis: - name: CVStrategyV0_0 - file: ../contracts/out/CVStrategyV0_0.sol/CVStrategyV0_0.json \ No newline at end of file + file: ../contracts/out/CVStrategyV0_0.sol/CVStrategyV0_0.json