Skip to content

Commit

Permalink
Show P&L for DYF (#2423)
Browse files Browse the repository at this point in the history
* Show P&L for DYF

* Add to table
  • Loading branch information
hieronx authored Sep 2, 2024
1 parent ae51a98 commit 131269c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 1 addition & 4 deletions centrifuge-app/src/pages/Loan/KeyMetrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ export function KeyMetrics({ pool, loan }: Props) {
},
]
: []),
...(loan.pricing.maturityDate &&
'valuationMethod' in loan.pricing &&
loan.pricing.valuationMethod === 'oracle' &&
loan.pricing.notional.gtn(0)
...('valuationMethod' in loan.pricing && loan.pricing.valuationMethod === 'oracle'
? [
sumRealizedProfitFifo
? {
Expand Down
8 changes: 8 additions & 0 deletions centrifuge-app/src/pages/Loan/TransactionTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ export const TransactionTable = ({
header: `Principal (${currency})`,
cell: (row: Row) => (row.position ? `${formatBalance(row.position, undefined, 2, 2)}` : '-'),
},
{
align: 'left',
header: `Realized P&L`,
cell: (row: Row) =>
row.realizedProfitFifo
? `${row.type !== 'REPAID' ? '-' : ''}${formatBalance(row.realizedProfitFifo, undefined, 2, 2)}`
: '-',
},
]),
] as Column[]

Expand Down

0 comments on commit 131269c

Please sign in to comment.