Skip to content

Commit

Permalink
Fix account bug (#1825)
Browse files Browse the repository at this point in the history
  • Loading branch information
hieronx authored Dec 20, 2023
1 parent f86f164 commit ab84e59
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions centrifuge-app/src/components/LiquidityEpochSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ function EpochStatusOngoing({ pool }: { pool: Pool }) {
const poolPermissions = usePoolPermissions(pool.id)
const { showOrderExecution } = useDebugFlags()

const isIssuer = Object.keys(poolPermissions || {})
.filter(
(address) =>
poolPermissions?.[address].roles.includes('InvestorAdmin') ||
poolPermissions?.[address].roles.includes('LoanAdmin')
)
.includes(account.actingAddress)
const isIssuer = account
? Object.keys(poolPermissions || {})
.filter(
(address) =>
poolPermissions?.[address].roles.includes('InvestorAdmin') ||
poolPermissions?.[address].roles.includes('LoanAdmin')
)
.includes(account.actingAddress)
: false

const { execute: closeEpochTx, isLoading: loadingClose } = useCentrifugeTransaction(
'Start order execution',
Expand Down

0 comments on commit ab84e59

Please sign in to comment.