Skip to content

Commit

Permalink
Merge branch 'main' into pool-create-type-debug-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser authored Sep 6, 2023
2 parents d4ea334 + 3e24e57 commit 2d22718
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion centrifuge-app/src/pages/Pools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function poolsToPoolCardProps(
status:
tinlakePool && tinlakePool.addresses.CLERK !== undefined && tinlakePool.tinlakeMetadata.maker?.ilk
? 'Maker Pool'
: pool.tranches.at(-1)?.capacity.toFloat()
: pool.tranches.at(0)?.capacity.toFloat() // pool is displayed as "open for investments" if the most junior tranche has a capacity
? 'Open for investments'
: ('Closed' as PoolStatusKey),
iconUri: metaData?.pool?.icon?.uri ? cent.metadata.parseMetadataUrl(metaData?.pool?.icon?.uri) : undefined,
Expand Down
4 changes: 3 additions & 1 deletion centrifuge-app/src/utils/usePodAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { usePodUrl } from './usePools'
export function usePodAuth(poolId: string, accountOverride?: CombinedSubstrateAccount) {
const { selectedCombinedAccount } = useWallet().substrate
const podUrl = usePodUrl(poolId)
const suitableAccounts = useSuitableAccounts({ poolId, poolRole: ['Borrower'], proxyType: ['PodAuth'] })
const suitableAccounts = useSuitableAccounts({ poolId, poolRole: ['Borrower'], proxyType: ['PodAuth'] }).filter(
(acc) => acc.proxies?.length === 1
)
const account = accountOverride || selectedCombinedAccount || suitableAccounts[0]
const cent = useCentrifuge()
const utils = useCentrifugeUtils()
Expand Down

0 comments on commit 2d22718

Please sign in to comment.