From cbc95e24b601be9af490c297ac831456d50a72a3 Mon Sep 17 00:00:00 2001 From: Katty Barroso <51223655+kattylucy@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:25:49 +0100 Subject: [PATCH] Assets feedback (#2541) * Change market price decimal from 2 to 4 * Add toggle to show/hide repaid assets * Fix bug on wallet button --- centrifuge-app/src/components/LoanList.tsx | 18 ++++++++++++--- .../components/WalletMenu/ConnectButton.tsx | 8 +++++-- .../src/components/WalletMenu/WalletMenu.tsx | 1 + fabric/src/components/Button/WalletButton.tsx | 6 ++--- fabric/src/components/Checkbox/index.tsx | 23 +++++++++++++++++++ 5 files changed, 48 insertions(+), 8 deletions(-) diff --git a/centrifuge-app/src/components/LoanList.tsx b/centrifuge-app/src/components/LoanList.tsx index 75670e5992..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) => { @@ -193,7 +195,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', }, ]), @@ -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)} + /> +