Skip to content

Commit

Permalink
Fix deploying LP tranches with EVM wallet (#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser authored Aug 26, 2024
1 parent fd9b4a6 commit 54b5ec0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion centrifuge-app/src/pages/IssuerPool/Investors/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useRef } from 'react'
import { useParams } from 'react-router'
import { LayoutBase } from '../../../components/LayoutBase'
import { LoadBoundary } from '../../../components/LoadBoundary'
Expand Down Expand Up @@ -25,10 +26,17 @@ function IssuerPoolInvestors() {
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 && <InvestorStatus />}
{isPoolAdmin && <LiquidityPools />}
{wasAdminRef.current && <LiquidityPools />}
</>
)
}

0 comments on commit 54b5ec0

Please sign in to comment.