Skip to content

Commit

Permalink
Fix tx table
Browse files Browse the repository at this point in the history
  • Loading branch information
hieronx committed Oct 2, 2023
1 parent 1212d85 commit 51a3932
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions centrifuge-app/src/pages/Loan/TransactionTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export const TransactionTable = ({ transactions, currency, loanType, decimals, p
? new CurrencyBalance(trx.quantity, 18)
.toDecimal()
.mul((pricing as ExternalPricingInfo).notional.toDecimal())
: trx.amount
? trx.amount.toDecimal()
: Dec(0)
)
}
Expand All @@ -64,6 +66,8 @@ export const TransactionTable = ({ transactions, currency, loanType, decimals, p
? new CurrencyBalance(trx.quantity, 18)
.toDecimal()
.mul((pricing as ExternalPricingInfo).notional.toDecimal())
: trx.amount
? trx.amount.toDecimal()
: Dec(0)
)
}
Expand All @@ -82,6 +86,9 @@ export const TransactionTable = ({ transactions, currency, loanType, decimals, p
if (loanType === 'external' && type === 'BORROWED') return 'Purchase'
if (loanType === 'external' && type === 'REPAID') return 'Sale'

if (loanType === 'internal' && type === 'BORROWED') return 'Financed'
if (loanType === 'internal' && type === 'REPAID') return 'Repaid'

return `${type[0]}${type.slice(1).toLowerCase()}`
}

Expand Down

0 comments on commit 51a3932

Please sign in to comment.