From 7de804fb7008fe774ffa8aff30765995939faf76 Mon Sep 17 00:00:00 2001 From: Katty Barroso <51223655+kattylucy@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:00:04 +0100 Subject: [PATCH] Fix links chains (#2540) * Fix links * Fix links with token address * Add feedback --- .../src/components/PoolOverview/KeyMetrics.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/centrifuge-app/src/components/PoolOverview/KeyMetrics.tsx b/centrifuge-app/src/components/PoolOverview/KeyMetrics.tsx index e9a0376013..107302352f 100644 --- a/centrifuge-app/src/components/PoolOverview/KeyMetrics.tsx +++ b/centrifuge-app/src/components/PoolOverview/KeyMetrics.tsx @@ -285,10 +285,15 @@ const AvailableNetworks = ({ poolId }: { poolId: string }) => { const pool = usePool(poolId) const renderTooltipBody = (networkName: string, tranches: Tranche[], baseUrl: string) => { - const links = tranches.map((tranche) => ({ - text: `View Transactions`, - url: `${baseUrl}/token/${tranche.id}`, - })) + const links = tranches + .map( + (tranche) => activeDomains?.data?.find((domain) => domain.trancheTokens[tranche.id])?.trancheTokens[tranche.id] + ) + .filter(Boolean) + .map((tokenAddress) => ({ + text: `View Transactions`, + url: `${baseUrl}token/${tokenAddress}`, + })) return }