Skip to content

Commit

Permalink
Add archived pool status and filter (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn authored Jan 25, 2024
1 parent b710338 commit 957087f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion centrifuge-app/src/components/PoolCard/PoolStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { StatusChip, StatusChipProps } from '@centrifuge/fabric'
import * as React from 'react'

export type PoolStatusKey = 'Maker Pool' | 'Open for investments' | 'Closed' | 'Upcoming'
export type PoolStatusKey = 'Maker Pool' | 'Open for investments' | 'Closed' | 'Upcoming' | 'Archived'

const statusColor: { [key in PoolStatusKey]: StatusChipProps['status'] } = {
'Maker Pool': 'info',
'Open for investments': 'ok',
Closed: 'default',
Upcoming: 'default',
Archived: 'default',
}

export function PoolStatus({ status }: { status?: PoolStatusKey }) {
Expand Down
4 changes: 3 additions & 1 deletion centrifuge-app/src/components/PoolList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ export function poolsToPoolCardProps(
currencySymbol: pool.currency.symbol,
apr: mostSeniorTranche?.interestRatePerSec,
status:
tinlakePool && tinlakePool.addresses.CLERK !== undefined && tinlakePool.tinlakeMetadata.maker?.ilk
tinlakePool && tinlakePool.tinlakeMetadata.isArchived
? 'Archived'
: tinlakePool && tinlakePool.addresses.CLERK !== undefined && tinlakePool.tinlakeMetadata.maker?.ilk
? 'Maker Pool'
: pool.tranches.at(0)?.capacity.toFloat() // pool is displayed as "open for investments" if the most junior tranche has a capacity
? 'Open for investments'
Expand Down

0 comments on commit 957087f

Please sign in to comment.