From 72847bd63831bbaeb4aa4a78ddb5c8b4e88b0e91 Mon Sep 17 00:00:00 2001 From: krandder Date: Sun, 5 Jul 2026 23:59:23 +0200 Subject: [PATCH] Fix hardcoded market links in cards2 and wrong default aggregator in debug modal - cards2/ProposalsCard.jsx linked markets as /markets/
, which 404s for any market not in the hardcoded static export list. Route through getMarketUrl() like the live card components already do. - CreateOrganizationModal.jsx defaulted to a non-canonical aggregator address; import the shared DEFAULT_AGGREGATOR constant from config/subgraphEndpoints instead of a local literal. --- src/components/debug/CreateOrganizationModal.jsx | 7 ++----- .../futarchyFi/proposalsList/cards2/ProposalsCard.jsx | 7 ++++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/debug/CreateOrganizationModal.jsx b/src/components/debug/CreateOrganizationModal.jsx index c5e06fd..38127ed 100644 --- a/src/components/debug/CreateOrganizationModal.jsx +++ b/src/components/debug/CreateOrganizationModal.jsx @@ -14,11 +14,8 @@ const CONTRACTS = { ORGANIZATION_FACTORY: '0x2Fa9318E1e29d7435EE9d23B687b10a9CDDD0d9e', }; -// Default aggregator (FutarchyFi) -const DEFAULT_AGGREGATOR = '0x767868874be4b5434bd351410b0b9a6e7f4c3aaf'; - -// Subgraph endpoint -import { AGGREGATOR_SUBGRAPH_URL as SUBGRAPH_URL } from '../../config/subgraphEndpoints'; +// Subgraph endpoint + canonical default aggregator (FutarchyFi) +import { AGGREGATOR_SUBGRAPH_URL as SUBGRAPH_URL, DEFAULT_AGGREGATOR } from '../../config/subgraphEndpoints'; // ABIs (minimal) const ORGANIZATION_FACTORY_ABI = [ diff --git a/src/components/futarchyFi/proposalsList/cards2/ProposalsCard.jsx b/src/components/futarchyFi/proposalsList/cards2/ProposalsCard.jsx index 38d2ce0..07f5cfd 100644 --- a/src/components/futarchyFi/proposalsList/cards2/ProposalsCard.jsx +++ b/src/components/futarchyFi/proposalsList/cards2/ProposalsCard.jsx @@ -1,6 +1,7 @@ import React, { useState, useEffect, useRef } from "react"; import { CheckIcon, CancelIcon, NewspaperIcon, EyeIcon } from "./Resources"; import Image from 'next/image'; +import { getMarketUrl } from "../../../../utils/urlUtils"; // Move statusColors to the top level, after imports const statusColors = { @@ -150,7 +151,7 @@ const Proposals = ({ @@ -372,7 +373,7 @@ export const ProposalsCard = ({ View Details @@ -473,7 +474,7 @@ export const MobileProposalsCard = ({ View Details