Skip to content

Commit

Permalink
Fix links chains (#2540)
Browse files Browse the repository at this point in the history
* Fix links

* Fix links with token address

* Add feedback
  • Loading branch information
kattylucy authored Nov 19, 2024
1 parent af8f470 commit 7de804f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions centrifuge-app/src/components/PoolOverview/KeyMetrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <TooltipBody title={networkName} links={links} />
}
Expand Down

0 comments on commit 7de804f

Please sign in to comment.