Skip to content

Commit

Permalink
Fix links with token address
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Nov 19, 2024
1 parent aa5fa71 commit b1cf508
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,
}))
const links = tranches.map((tranche, index) => {
const tokenAddress = activeDomains?.data?.find((domain) => domain.trancheTokens[tranche.id])?.trancheTokens[
tranche.id
]
return {
text: `View Transactions`,
url: `${baseUrl}token/${tokenAddress}`,
}
})

return <TooltipBody title={networkName} links={links} />
}
Expand Down

0 comments on commit b1cf508

Please sign in to comment.