Skip to content

Commit

Permalink
address issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JP Angelle committed Sep 26, 2023
1 parent 647c79a commit 7191c29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions centrifuge-app/src/pages/Loan/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr

const getLatestPrice = () => {
if (loan?.pricing && 'oracle' in loan.pricing) {
const latestSettlementPrice = borrowerAssetTransactions?.[borrowerAssetTransactions.length - 1].settlementPrice
? new BN(borrowerAssetTransactions[borrowerAssetTransactions.length - 1].settlementPrice || '').mul(new BN(100))
: null
const settlementPrice = borrowerAssetTransactions?.[borrowerAssetTransactions.length - 1].settlementPrice
const latestSettlementPrice = settlementPrice ? new BN(settlementPrice).mul(new BN(100)) : null

if (latestSettlementPrice && loan.pricing.oracle.value.isZero()) {
return new CurrencyBalance(latestSettlementPrice, pool.currency.decimals)
Expand Down
4 changes: 2 additions & 2 deletions centrifuge-js/src/modules/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ export function getPoolsModule(inst: Centrifuge) {
}

function financeExternalLoan(
args: [poolId: string, loanId: string, quantity: BN, price: BN, aoProxy: string],
args: [poolId: string, loanId: string, quantity: BN, price: BN],
options?: TransactionOptions
) {
const [poolId, loanId, quantity, price] = args
Expand Down Expand Up @@ -1433,7 +1433,7 @@ export function getPoolsModule(inst: Centrifuge) {
}

function repayExternalLoanPartially(
args: [poolId: string, loanId: string, quantity: BN, interest: BN, unscheduled: BN, price: BN, aoProxy: string],
args: [poolId: string, loanId: string, quantity: BN, interest: BN, unscheduled: BN, price: BN],
options?: TransactionOptions
) {
const [poolId, loanId, quantity, interest, unscheduled, price] = args
Expand Down

0 comments on commit 7191c29

Please sign in to comment.