From 957087f64a02485eb3c39f12d28243638941fbf8 Mon Sep 17 00:00:00 2001 From: Sophia Date: Thu, 25 Jan 2024 14:06:27 -0500 Subject: [PATCH] Add archived pool status and filter (#1902) --- centrifuge-app/src/components/PoolCard/PoolStatus.tsx | 3 ++- centrifuge-app/src/components/PoolList.tsx | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/centrifuge-app/src/components/PoolCard/PoolStatus.tsx b/centrifuge-app/src/components/PoolCard/PoolStatus.tsx index 842f9bea36..fa0fcc766d 100644 --- a/centrifuge-app/src/components/PoolCard/PoolStatus.tsx +++ b/centrifuge-app/src/components/PoolCard/PoolStatus.tsx @@ -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 }) { diff --git a/centrifuge-app/src/components/PoolList.tsx b/centrifuge-app/src/components/PoolList.tsx index 03f4e71f1c..a20b2bc422 100644 --- a/centrifuge-app/src/components/PoolList.tsx +++ b/centrifuge-app/src/components/PoolList.tsx @@ -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'