Skip to content

Commit

Permalink
Open Fix domains shown in the Invest/Redeem component (#2076)
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser authored Apr 8, 2024
1 parent a9ec0b8 commit 58dcb6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions centrifuge-app/src/components/InvestRedeem/InvestRedeem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ export function InvestRedeem({ poolId, trancheId, ...rest }: InvestRedeemProps)
const isTinlakePool = poolId.startsWith('0x')

const { data: domains } = useActiveDomains(poolId, isLiquidityPools)
const domainsWithAtLeastOneLP =
domains && domains.filter((domain) => Object.values(domain.liquidityPools[trancheId]).some((p) => !!p))

const networks: Network[] = poolId.startsWith('0x') ? [ethConfig.network === 'goerli' ? 5 : 1] : ['centrifuge']
if (domains) {
networks.push(...domains.map((d) => d.chainId))
if (domainsWithAtLeastOneLP) {
networks.push(...domainsWithAtLeastOneLP.map((d) => d.chainId))
}

return (
Expand Down

0 comments on commit 58dcb6f

Please sign in to comment.