From 4a528f1d56b355a422b994e2eebe6ddbf394fce8 Mon Sep 17 00:00:00 2001 From: Onno Visser <23527729+onnovisser@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:47:41 +0200 Subject: [PATCH] show lp section --- .../src/pages/IssuerPool/Investors/index.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/centrifuge-app/src/pages/IssuerPool/Investors/index.tsx b/centrifuge-app/src/pages/IssuerPool/Investors/index.tsx index ff5b51b2f8..74f3e69ee0 100644 --- a/centrifuge-app/src/pages/IssuerPool/Investors/index.tsx +++ b/centrifuge-app/src/pages/IssuerPool/Investors/index.tsx @@ -1,4 +1,3 @@ -import { useRef } from 'react' import { useParams } from 'react-router' import { LoadBoundary } from '../../../components/LoadBoundary' import { useSuitableAccounts } from '../../../utils/usePermissions' @@ -23,19 +22,15 @@ function IssuerPoolInvestors() { if (!poolId) throw new Error('Pool not found') const canEditInvestors = useSuitableAccounts({ poolId, poolRole: ['InvestorAdmin'] }).length > 0 - const isPoolAdmin = useSuitableAccounts({ poolId, poolRole: ['PoolAdmin'] }).length > 0 - - // This is a bit hacky, but when deploying a pool to a domain, the user needs to switch networks - // And when they're connected to the other network, they won't register as a pool admin anymore - const wasAdminRef = useRef(isPoolAdmin) - if (isPoolAdmin) { - wasAdminRef.current = true - } return ( <> {canEditInvestors && } - {wasAdminRef.current && } + {/* + Always render the Liquidity Pools section, because the admin needs to do actions with an EVM wallet and + won't be able to see it if we check for admin permissions. + */} + ) }