From e356033d68f108af5542de99e37f9a84fd03b3b1 Mon Sep 17 00:00:00 2001 From: christian harrington Date: Thu, 19 Mar 2026 10:42:42 +0000 Subject: [PATCH 1/5] date range fix --- .../productDetailPoolGraph.tsx | 80 ++++++------------- .../productDetailPoolGraphUtils.test.ts | 78 ++++++++++++++++++ .../productDetailPoolGraphUtils.ts | 74 +++++++++++++++++ 3 files changed, 178 insertions(+), 54 deletions(-) create mode 100644 src/features/productDetail/productDetailContent/productDetailPoolGraphUtils.test.ts create mode 100644 src/features/productDetail/productDetailContent/productDetailPoolGraphUtils.ts diff --git a/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx b/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx index 04060e0..e43cd6c 100644 --- a/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx +++ b/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx @@ -7,6 +7,7 @@ import type { AgTimeAxisOptions, AgTooltipRendererResult, } from 'ag-charts-community'; +import { time } from 'ag-charts-community'; import { Grid, Row, Col } from 'antd'; import styles from './productDetailPoolGraph.module.scss'; @@ -26,6 +27,7 @@ import { } from './components/productDetailDropdownSelect'; import { ProductDetailGraphTimeRangeSelector } from './components/productDetailGraphTimeRangeSelector'; import { filterByTimeRange } from './helpers'; +import { getProductDetailTimeAxisPreset } from './productDetailPoolGraphUtils'; const { useBreakpoint } = Grid; @@ -260,46 +262,6 @@ const ProductDetailPoolGraphImpl: FC = ({ () => [...firstAxisSeries, ...secondaryAxisSeries], [firstAxisSeries, secondaryAxisSeries] ); - // ---- time helpers (ms) ---- - const HOUR = 60 * 60 * 1000; - const DAY = 24 * HOUR; - const WEEK = 7 * DAY; - const MONTH = 30 * DAY; - const getTimeAxisIntervalStepMs = useCallback( - (range: string | undefined, spanMs: number): number => { - const maxDataPoints = 4; - const oneDay = DAY; - - if (isMobile) { - const daysForThreeLabels = Math.ceil(spanMs / (2 * oneDay)); - return daysForThreeLabels * oneDay; // Adjusted for 3 labels on mobile - } - - switch (range) { - case '7d': - return DAY; - case '1m': - return 2 * DAY; - case '3m': - return WEEK; - case '6m': - return 2 * WEEK; - case '1y': - return MONTH; - case 'max': - return Math.max(MONTH, Math.round(spanMs / 12)); - default: { - if (spanMs <= maxDataPoints * oneDay) { - return oneDay; // Daily steps - } else { - const interval = Math.ceil(spanMs / (maxDataPoints * oneDay)); - return interval * oneDay; // Adjusted interval to fit max data points - } - } - } - }, - [DAY, MONTH, WEEK, isMobile] - ); const totalSpanMs = useMemo(() => { if (filteredTs.length < 2) return 0; @@ -308,31 +270,41 @@ const ProductDetailPoolGraphImpl: FC = ({ return last - first; }, [filteredTs]); - const timeIntervalStepMs = useMemo( - () => getTimeAxisIntervalStepMs(selectedTimeRange, totalSpanMs), - [getTimeAxisIntervalStepMs, selectedTimeRange, totalSpanMs] + const timeAxisPreset = useMemo( + () => getProductDetailTimeAxisPreset(totalSpanMs, isMobile), + [totalSpanMs, isMobile] ); - const timeLabelFormat = useMemo(() => { - if (!totalSpanMs) return '%b %Y'; - return totalSpanMs <= 90 * DAY - ? isMobile - ? '%m/%y' - : '%d %b %Y' - : '%b %Y'; - }, [totalSpanMs, DAY, isMobile]); const axes: (AgNumberAxisOptions | AgTimeAxisOptions)[] = useMemo(() => { const maxVol = filteredTs.length ? Math.max(...filteredTs.map((d) => d.volume24h ?? 0)) : 0; + const timeAxisStep = + timeAxisPreset.intervalUnit === 'day' + ? time.day.every(timeAxisPreset.intervalStep) + : timeAxisPreset.intervalUnit === 'week' + ? time.monday.every(timeAxisPreset.intervalStep) + : timeAxisPreset.intervalUnit === 'month' + ? time.month.every(timeAxisPreset.intervalStep) + : time.year.every(timeAxisPreset.intervalStep); + const base: (AgNumberAxisOptions | AgTimeAxisOptions)[] = [ { type: 'time', position: 'bottom', nice: true, - label: { format: timeLabelFormat }, - interval: { step: timeIntervalStepMs }, + label: { + format: timeAxisPreset.labelFormat, + autoRotate: true, + autoRotateAngle: 320, + avoidCollisions: true, + minSpacing: timeAxisPreset.labelMinSpacing, + }, + interval: { + step: timeAxisStep, + minSpacing: timeAxisPreset.intervalMinSpacing, + }, }, { type: 'number', position: 'left', keys: ['benchmarkValue', 'value'] }, { @@ -352,7 +324,7 @@ const ProductDetailPoolGraphImpl: FC = ({ }); } return base; - }, [filteredTs, selectedSecondAxis, timeLabelFormat, timeIntervalStepMs]); + }, [filteredTs, selectedSecondAxis, timeAxisPreset]); const options = useMemo( () => ({ diff --git a/src/features/productDetail/productDetailContent/productDetailPoolGraphUtils.test.ts b/src/features/productDetail/productDetailContent/productDetailPoolGraphUtils.test.ts new file mode 100644 index 0000000..cdef684 --- /dev/null +++ b/src/features/productDetail/productDetailContent/productDetailPoolGraphUtils.test.ts @@ -0,0 +1,78 @@ +import { describe, expect, it } from 'vitest'; +import { getProductDetailTimeAxisPreset } from './productDetailPoolGraphUtils'; + +const DAY_MS = 24 * 60 * 60 * 1000; + +describe('productDetailPoolGraphUtils', () => { + it('uses daily ticks for short spans', () => { + expect(getProductDetailTimeAxisPreset(7 * DAY_MS, false)).toEqual({ + intervalUnit: 'day', + intervalStep: 1, + intervalMinSpacing: 72, + labelFormat: '%d %b', + labelMinSpacing: 14, + }); + }); + + it('uses weekly ticks with shorter date labels for 1m and 3m views', () => { + expect(getProductDetailTimeAxisPreset(30 * DAY_MS, false)).toEqual({ + intervalUnit: 'week', + intervalStep: 1, + intervalMinSpacing: 80, + labelFormat: '%d %b', + labelMinSpacing: 16, + }); + + expect(getProductDetailTimeAxisPreset(90 * DAY_MS, false)).toEqual({ + intervalUnit: 'week', + intervalStep: 2, + intervalMinSpacing: 88, + labelFormat: '%d %b', + labelMinSpacing: 16, + }); + }); + + it('broadens long-range labels to months or years', () => { + expect(getProductDetailTimeAxisPreset(300 * DAY_MS, false)).toEqual({ + intervalUnit: 'month', + intervalStep: 1, + intervalMinSpacing: 92, + labelFormat: '%b %Y', + labelMinSpacing: 16, + }); + + expect(getProductDetailTimeAxisPreset(800 * DAY_MS, false)).toEqual({ + intervalUnit: 'month', + intervalStep: 3, + intervalMinSpacing: 96, + labelFormat: '%b %Y', + labelMinSpacing: 16, + }); + + expect(getProductDetailTimeAxisPreset(1500 * DAY_MS, false)).toEqual({ + intervalUnit: 'year', + intervalStep: 1, + intervalMinSpacing: 104, + labelFormat: '%Y', + labelMinSpacing: 16, + }); + }); + + it('coarsens intervals further on mobile layouts', () => { + expect(getProductDetailTimeAxisPreset(90 * DAY_MS, true)).toEqual({ + intervalUnit: 'week', + intervalStep: 3, + intervalMinSpacing: 72, + labelFormat: '%d %b', + labelMinSpacing: 12, + }); + + expect(getProductDetailTimeAxisPreset(300 * DAY_MS, true)).toEqual({ + intervalUnit: 'month', + intervalStep: 2, + intervalMinSpacing: 76, + labelFormat: '%b %Y', + labelMinSpacing: 12, + }); + }); +}); diff --git a/src/features/productDetail/productDetailContent/productDetailPoolGraphUtils.ts b/src/features/productDetail/productDetailContent/productDetailPoolGraphUtils.ts new file mode 100644 index 0000000..4c352c6 --- /dev/null +++ b/src/features/productDetail/productDetailContent/productDetailPoolGraphUtils.ts @@ -0,0 +1,74 @@ +const DAY_MS = 24 * 60 * 60 * 1000; + +export type ProductDetailAxisIntervalUnit = 'day' | 'week' | 'month' | 'year'; + +export interface ProductDetailTimeAxisPreset { + intervalUnit: ProductDetailAxisIntervalUnit; + intervalStep: number; + intervalMinSpacing: number; + labelFormat: string; + labelMinSpacing: number; +} + +export const getProductDetailTimeAxisPreset = ( + totalSpanMs: number, + isMobile: boolean +): ProductDetailTimeAxisPreset => { + if (totalSpanMs <= 14 * DAY_MS) { + return { + intervalUnit: 'day', + intervalStep: isMobile ? 2 : 1, + intervalMinSpacing: isMobile ? 56 : 72, + labelFormat: '%d %b', + labelMinSpacing: isMobile ? 10 : 14, + }; + } + + if (totalSpanMs <= 45 * DAY_MS) { + return { + intervalUnit: 'week', + intervalStep: 1, + intervalMinSpacing: isMobile ? 64 : 80, + labelFormat: '%d %b', + labelMinSpacing: isMobile ? 12 : 16, + }; + } + + if (totalSpanMs <= 120 * DAY_MS) { + return { + intervalUnit: 'week', + intervalStep: isMobile ? 3 : 2, + intervalMinSpacing: isMobile ? 72 : 88, + labelFormat: '%d %b', + labelMinSpacing: isMobile ? 12 : 16, + }; + } + + if (totalSpanMs <= 370 * DAY_MS) { + return { + intervalUnit: 'month', + intervalStep: isMobile ? 2 : 1, + intervalMinSpacing: isMobile ? 76 : 92, + labelFormat: '%b %Y', + labelMinSpacing: isMobile ? 12 : 16, + }; + } + + if (totalSpanMs <= 3 * 365 * DAY_MS) { + return { + intervalUnit: 'month', + intervalStep: isMobile ? 6 : 3, + intervalMinSpacing: isMobile ? 84 : 96, + labelFormat: '%b %Y', + labelMinSpacing: isMobile ? 12 : 16, + }; + } + + return { + intervalUnit: 'year', + intervalStep: 1, + intervalMinSpacing: isMobile ? 88 : 104, + labelFormat: '%Y', + labelMinSpacing: isMobile ? 12 : 16, + }; +}; From f67ac924be0e93873da5b755d0f214f9098c7304 Mon Sep 17 00:00:00 2001 From: christian harrington Date: Fri, 20 Mar 2026 08:32:31 +0000 Subject: [PATCH 2/5] temporary banner --- .../productDetailAnalyticsNotice.module.scss | 18 ++++++ .../productDetailAnalyticsNotice.tsx | 20 ++++++ .../productDetailPoolGraph.module.scss | 4 ++ .../productDetailPoolGraph.tsx | 4 ++ .../productDetailSidebarGraph.module.scss | 6 ++ .../productDetailSidebarPerformanceGraph.tsx | 62 ++++++++++--------- 6 files changed, 85 insertions(+), 29 deletions(-) create mode 100644 src/features/productDetail/productDetailAnalyticsNotice.module.scss create mode 100644 src/features/productDetail/productDetailAnalyticsNotice.tsx diff --git a/src/features/productDetail/productDetailAnalyticsNotice.module.scss b/src/features/productDetail/productDetailAnalyticsNotice.module.scss new file mode 100644 index 0000000..c932154 --- /dev/null +++ b/src/features/productDetail/productDetailAnalyticsNotice.module.scss @@ -0,0 +1,18 @@ +.notice { + width: 100%; + box-sizing: border-box; + padding: 10px 14px; + border: 1px solid rgba(255, 166, 0, 0.5); + border-radius: 12px; + background: rgba(255, 166, 0, 0.14); + color: #ffd28b; + font-size: 0.95rem; + line-height: 1.45; +} + +@media (max-width: 768px) { + .notice { + padding: 10px 12px; + font-size: 0.9rem; + } +} diff --git a/src/features/productDetail/productDetailAnalyticsNotice.tsx b/src/features/productDetail/productDetailAnalyticsNotice.tsx new file mode 100644 index 0000000..1fda9b4 --- /dev/null +++ b/src/features/productDetail/productDetailAnalyticsNotice.tsx @@ -0,0 +1,20 @@ +import { FC, memo } from 'react'; + +import styles from './productDetailAnalyticsNotice.module.scss'; + +const NOTICE_MESSAGE = + 'Token pricing API is currently down for analytics only. LP token pricing on the balancer page and the QuantAMM landing page is still active'; + +export const ProductDetailAnalyticsNotice: FC = memo( + function ProductDetailAnalyticsNoticeImpl() { + return ( +
+ {NOTICE_MESSAGE} +
+ ); + } +); diff --git a/src/features/productDetail/productDetailContent/productDetailPoolGraph.module.scss b/src/features/productDetail/productDetailContent/productDetailPoolGraph.module.scss index a670fa9..174bc11 100644 --- a/src/features/productDetail/productDetailContent/productDetailPoolGraph.module.scss +++ b/src/features/productDetail/productDetailContent/productDetailPoolGraph.module.scss @@ -35,6 +35,10 @@ } } +.product-detail-graph__notice { + margin-bottom: 12px; +} + .product-detail-graph__top-right { grid-area: top-right; @include grid-area; diff --git a/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx b/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx index e43cd6c..3fa421f 100644 --- a/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx +++ b/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx @@ -28,6 +28,7 @@ import { import { ProductDetailGraphTimeRangeSelector } from './components/productDetailGraphTimeRangeSelector'; import { filterByTimeRange } from './helpers'; import { getProductDetailTimeAxisPreset } from './productDetailPoolGraphUtils'; +import { ProductDetailAnalyticsNotice } from '../productDetailAnalyticsNotice'; const { useBreakpoint } = Grid; @@ -354,6 +355,9 @@ const ProductDetailPoolGraphImpl: FC = ({ return ( +
+ +
- {product.oneWeekPerformance && - product.oneMonthPerformance && - product.threeMonthPerformance && - product.sixMonthPerformance && - product.oneYearPerformance && - product.inceptionPerformance && ( - = 7 - ? product.oneWeekPerformance - : performancePeriod, - performanceLength >= 30 - ? product.oneMonthPerformance - : performancePeriod, - performanceLength >= 90 - ? product.threeMonthPerformance - : performancePeriod, - performanceLength >= 180 - ? product.sixMonthPerformance - : performancePeriod, - performanceLength >= 365 - ? product.oneYearPerformance - : performancePeriod, - ]} - wide={false} - /> - )} +
+ +
+ {product.oneWeekPerformance && + product.oneMonthPerformance && + product.threeMonthPerformance && + product.sixMonthPerformance && + product.oneYearPerformance && + product.inceptionPerformance && ( + = 7 + ? product.oneWeekPerformance + : performancePeriod, + performanceLength >= 30 + ? product.oneMonthPerformance + : performancePeriod, + performanceLength >= 90 + ? product.threeMonthPerformance + : performancePeriod, + performanceLength >= 180 + ? product.sixMonthPerformance + : performancePeriod, + performanceLength >= 365 + ? product.oneYearPerformance + : performancePeriod, + ]} + wide={false} + /> + )} +
); }; From 70f4e7d897f8cbc25cb02385a66a65072d7a9fb9 Mon Sep 17 00:00:00 2001 From: christian harrington Date: Fri, 20 Mar 2026 08:36:30 +0000 Subject: [PATCH 3/5] remove banner and fix graph --- .../productDetailContent/productDetailPoolGraph.tsx | 4 ---- .../productDetailSidebarPerformanceGraph.tsx | 2 -- src/hooks/utils.test.ts | 1 + src/hooks/utils.ts | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx b/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx index 3fa421f..e43cd6c 100644 --- a/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx +++ b/src/features/productDetail/productDetailContent/productDetailPoolGraph.tsx @@ -28,7 +28,6 @@ import { import { ProductDetailGraphTimeRangeSelector } from './components/productDetailGraphTimeRangeSelector'; import { filterByTimeRange } from './helpers'; import { getProductDetailTimeAxisPreset } from './productDetailPoolGraphUtils'; -import { ProductDetailAnalyticsNotice } from '../productDetailAnalyticsNotice'; const { useBreakpoint } = Grid; @@ -355,9 +354,6 @@ const ProductDetailPoolGraphImpl: FC = ({ return ( -
- -
-
{product.oneWeekPerformance && product.oneMonthPerformance && diff --git a/src/hooks/utils.test.ts b/src/hooks/utils.test.ts index 4eec710..33eedd1 100644 --- a/src/hooks/utils.test.ts +++ b/src/hooks/utils.test.ts @@ -50,6 +50,7 @@ describe('hooks/utils view-model logic', () => { expect(findClosestPrice(prices, 1704067200)).toBe(100); expect(findClosestPrice(prices, 1704067200 + 60 * 60 * 20)).toBe(110); + expect(findClosestPrice(prices, 1704067200 + 60 * 60 * 24)).toBe(110); expect(findClosestPrice(prices, 1704067200 + 60 * 60 * 80)).toBe(0); }); diff --git a/src/hooks/utils.ts b/src/hooks/utils.ts index 1f7be4d..d4066b8 100644 --- a/src/hooks/utils.ts +++ b/src/hooks/utils.ts @@ -74,7 +74,7 @@ export const findClosestPrice = ( for (const priceEntry of prices) { const diff = Math.abs(Number(priceEntry.timestamp) - targetTimestamp); - if (diff < range && diff < bestDiff) { + if (diff <= range && diff < bestDiff) { bestDiff = diff; bestPrice = priceEntry.price; } From 87cc10ab9a04f405ba8401202f3a1c7552bad7b1 Mon Sep 17 00:00:00 2001 From: christian harrington Date: Fri, 20 Mar 2026 09:37:09 +0000 Subject: [PATCH 4/5] changes to include lower tvl featured pools and also change the current featured pools --- .../landing/desktop/bannerProductSection.tsx | 68 ++++++++++++++++++- .../documentation/landing/landingPage.tsx | 45 ++++++------ src/hooks/useFetchPoolsSummaryByParams.tsx | 16 +++-- 3 files changed, 104 insertions(+), 25 deletions(-) diff --git a/src/features/documentation/landing/desktop/bannerProductSection.tsx b/src/features/documentation/landing/desktop/bannerProductSection.tsx index bb1478c..bf9c826 100644 --- a/src/features/documentation/landing/desktop/bannerProductSection.tsx +++ b/src/features/documentation/landing/desktop/bannerProductSection.tsx @@ -51,7 +51,9 @@ export function BannerProductSection({ productData }: ProductBannerProps) { }; }, [productData]); - const { data, loading } = useFetchPoolsSummaryByParams(params); + const { data, loading, error } = useFetchPoolsSummaryByParams(params, { + includeDefaultWhereFilters: false, + }); const poolsByKey = useMemo(() => { const map: Record = {}; @@ -145,6 +147,70 @@ export function BannerProductSection({ productData }: ProductBannerProps) { return (cur / inc - 1) * 100; }; + const featuredPoolDiagnostics = useMemo( + () => + productData.map((tag) => { + const summaryKey = `${tag.poolChain}:${tag.poolId}`; + const priceKey = `${tag.poolChain}:${tag.poolId.toLowerCase()}`; + const poolSummary = poolsByKey[summaryKey]; + const currentPrice = neededPrices[priceKey]; + const itdPerfPct = computeItdPerfPct(currentPrice, tag.inceptionLpPrice); + + return { + title: tag.title, + status: tag.status, + poolId: tag.poolId, + poolChain: tag.poolChain, + summaryKey, + priceKey, + summaryFound: Boolean(poolSummary), + tvl: poolSummary?.tvl ?? null, + volume24h: poolSummary?.volume ?? null, + currentPrice: currentPrice ?? null, + inceptionLpPrice: tag.inceptionLpPrice, + itdPerfPct, + }; + }), + [computeItdPerfPct, neededPrices, poolsByKey, productData] + ); + + useEffect(() => { + if (loading) { + return; + } + + console.groupCollapsed('[landing-page][featured-btf] pool item diagnostics'); + console.log('featured pool config', productData); + console.log('pool summary query params', params); + console.log('pool summary raw response', data?.poolGetPools ?? []); + console.log('pool summary error', error ?? null); + console.log('mapped pool summaries', poolsByKey); + console.log('landing page LP prices', neededPrices); + console.log('featured pool diagnostics', featuredPoolDiagnostics); + + const missingPoolSummaries = featuredPoolDiagnostics.filter( + (item) => !item.summaryFound + ); + + if (missingPoolSummaries.length > 0) { + console.warn( + 'featured pools missing summary data', + missingPoolSummaries + ); + } + + console.groupEnd(); + }, [ + data, + error, + featuredPoolDiagnostics, + loading, + neededPrices, + params, + poolsByKey, + productData, + ]); + return ( dispatch(setAcceptedTermsAndConditions(true)); - const productData = CURRENT_LIVE_FACTSHEETS.factsheets.map((factsheet) => ({ - title: factsheet.iconTitle, - imgSrc: factsheet.factsheetImage.image, - description: factsheet.iconDescription, - status: factsheet.status, - opacity: factsheet.iconOpacity, - imgWidth: '30%', - focus: factsheet.iconFocus, - poolId: factsheet.poolId, - poolChain: factsheet.poolChain, - inceptionLpPrice: factsheet.inceptionLpPrice, - factsheetRoute: '/factsheet/' + factsheet.poolId, - productExplorerRoute: - ROUTES.PRODUCT_EXPLORER + - '/' + - factsheet.poolChain.toUpperCase() + - '/' + - factsheet.poolId, - })); + const featuredPoolIds = new Set([ + ROUTES.TRUFLATIONBITCOINFACTSHEET, + ROUTES.SAFEHAVENFACTSHEET, + ]); + + const productData = CURRENT_LIVE_FACTSHEETS.factsheets + .filter((factsheet) => featuredPoolIds.has(factsheet.poolId)) + .map((factsheet) => ({ + title: factsheet.iconTitle, + imgSrc: factsheet.factsheetImage.image, + description: factsheet.iconDescription, + status: factsheet.status, + opacity: factsheet.iconOpacity, + imgWidth: '30%', + focus: factsheet.iconFocus, + poolId: factsheet.poolId, + poolChain: factsheet.poolChain, + inceptionLpPrice: factsheet.inceptionLpPrice, + factsheetRoute: '/factsheet/' + factsheet.poolId, + productExplorerRoute: + ROUTES.PRODUCT_EXPLORER + + '/' + + factsheet.poolChain.toUpperCase() + + '/' + + factsheet.poolId, + })); //stub //productData.push({ diff --git a/src/hooks/useFetchPoolsSummaryByParams.tsx b/src/hooks/useFetchPoolsSummaryByParams.tsx index 972a1a7..fbdb6d4 100644 --- a/src/hooks/useFetchPoolsSummaryByParams.tsx +++ b/src/hooks/useFetchPoolsSummaryByParams.tsx @@ -15,9 +15,19 @@ export const useFetchPoolsSummaryByParams = ( params: GetPoolsSummaryQueryVariables, options?: { skip?: boolean; + includeDefaultWhereFilters?: boolean; } ) => { const { first, orderBy, orderDirection, skip, where } = params; + const includeDefaultWhereFilters = options?.includeDefaultWhereFilters ?? true; + + const whereWithDefaults = includeDefaultWhereFilters + ? { + minTvl: DEFAULT_MIN_TVL, + tagNotIn: ['BLACK_LISTED'], + ...where, + } + : where; const { data, loading, error } = useGetPoolsSummaryQuery({ skip: options?.skip ?? false, @@ -26,11 +36,7 @@ export const useFetchPoolsSummaryByParams = ( orderBy: orderBy ?? DEFAULT_ORDER_BY, orderDirection: orderDirection ?? DEFAULT_ORDER_DIRECTION, skip: skip ?? DEFAULT_SKIPPED_POOLS, - where: { - minTvl: DEFAULT_MIN_TVL, - tagNotIn: ['BLACK_LISTED'], - ...where, - }, + where: whereWithDefaults, }, }); From 06465ac2710015724265316e0740cd3247ac2713 Mon Sep 17 00:00:00 2001 From: christian harrington Date: Thu, 16 Apr 2026 15:14:19 +0100 Subject: [PATCH 5/5] fix linting error --- .../landing/desktop/bannerProductSection.tsx | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/features/documentation/landing/desktop/bannerProductSection.tsx b/src/features/documentation/landing/desktop/bannerProductSection.tsx index bf9c826..f2634ff 100644 --- a/src/features/documentation/landing/desktop/bannerProductSection.tsx +++ b/src/features/documentation/landing/desktop/bannerProductSection.tsx @@ -3,6 +3,7 @@ import { Button, Col, Row, Tag, Tooltip, Spin } from 'antd'; import { motion } from 'framer-motion'; import { useNavigate } from 'react-router-dom'; import { + useCallback, useEffect, useMemo, useRef, @@ -82,6 +83,17 @@ export function BannerProductSection({ productData }: ProductBannerProps) { const timersRef = useRef>({}); const [flashByKey, setFlashByKey] = useState>({}); + const computeItdPerfPct = useCallback( + (currentPrice?: number, inceptionPrice?: number) => { + const cur = Number(currentPrice); + const inc = Number(inceptionPrice); + if (!Number.isFinite(cur) || !Number.isFinite(inc) || inc === 0) + return null; + return (cur / inc - 1) * 100; + }, + [] + ); + useEffect(() => { productData.forEach((p) => { const k = `${p.poolChain}:${p.poolId.toLowerCase()}`; @@ -120,7 +132,7 @@ export function BannerProductSection({ productData }: ProductBannerProps) { Object.values(timersRef.current).forEach((t) => window.clearTimeout(t)); timersRef.current = {}; }; - }, [neededPrices, productData]); + }, [computeItdPerfPct, neededPrices, productData]); const handleNavigation = (route?: string) => { if (route) navigate(route); @@ -136,17 +148,6 @@ export function BannerProductSection({ productData }: ProductBannerProps) { const formatPct = (value: number) => `${value >= 0 ? '+' : ''}${value.toFixed(1)}%`; - const computeItdPerfPct = ( - currentPrice?: number, - inceptionPrice?: number - ) => { - const cur = Number(currentPrice); - const inc = Number(inceptionPrice); - if (!Number.isFinite(cur) || !Number.isFinite(inc) || inc === 0) - return null; - return (cur / inc - 1) * 100; - }; - const featuredPoolDiagnostics = useMemo( () => productData.map((tag) => {