diff --git a/centrifuge-app/src/pages/Loan/index.tsx b/centrifuge-app/src/pages/Loan/index.tsx index 3199cfc67e..3a644127cc 100644 --- a/centrifuge-app/src/pages/Loan/index.tsx +++ b/centrifuge-app/src/pages/Loan/index.tsx @@ -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) diff --git a/centrifuge-js/src/modules/pools.ts b/centrifuge-js/src/modules/pools.ts index 1fa5015392..74e931d87a 100644 --- a/centrifuge-js/src/modules/pools.ts +++ b/centrifuge-js/src/modules/pools.ts @@ -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 @@ -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