From 5b8cc59b8241505ae10dc7773c3f773b9e78f063 Mon Sep 17 00:00:00 2001 From: katty barroso Date: Fri, 15 Nov 2024 15:10:22 +0100 Subject: [PATCH 1/3] Change market price decimal from 2 to 4 --- centrifuge-app/src/components/LoanList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centrifuge-app/src/components/LoanList.tsx b/centrifuge-app/src/components/LoanList.tsx index 75670e5992..03b065e93b 100644 --- a/centrifuge-app/src/components/LoanList.tsx +++ b/centrifuge-app/src/components/LoanList.tsx @@ -193,7 +193,7 @@ export function LoanList({ loans, snapshots }: Props) { { align: 'left', header: , - cell: (l: Row) => formatBalance(l.marketPrice ?? 0, pool.currency, 2, 0), + cell: (l: Row) => formatBalance(l.marketPrice ?? 0, pool.currency, 4, 0), sortKey: 'marketPrice', }, ]), From b8766163473b80eb82cf2cf8d152d53a40d57d14 Mon Sep 17 00:00:00 2001 From: katty barroso Date: Mon, 18 Nov 2024 13:05:32 +0100 Subject: [PATCH 2/3] Add toggle to show/hide repaid assets --- centrifuge-app/src/components/LoanList.tsx | 16 +++++++++++++-- fabric/src/components/Checkbox/index.tsx | 23 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/centrifuge-app/src/components/LoanList.tsx b/centrifuge-app/src/components/LoanList.tsx index 03b065e93b..711103b6d4 100644 --- a/centrifuge-app/src/components/LoanList.tsx +++ b/centrifuge-app/src/components/LoanList.tsx @@ -4,6 +4,7 @@ import { AnchorButton, Box, Button, + Checkbox, IconDownload, Pagination, PaginationContainer, @@ -63,6 +64,7 @@ export function LoanList({ loans, snapshots }: Props) { const templateIds = poolMetadata?.loanTemplates?.map((s) => s.id) ?? [] const templateId = templateIds.at(-1) const { data: templateMetadata } = useMetadata(templateId) + const [showRepaid, setShowRepaid] = React.useState(false) const additionalColumns: Column[] = templateMetadata?.keyAttributes?.map((key, index) => { @@ -268,7 +270,17 @@ export function LoanList({ loans, snapshots }: Props) { <> {rows.filter((row) => !row.marketValue?.isZero()).length} ongoing assets - + + + + Show repaid assets + + } + onChange={(e) => setShowRepaid(!showRepaid)} + /> +