Skip to content

Commit

Permalink
fix: getLoans
Browse files Browse the repository at this point in the history
  • Loading branch information
JP Angelle committed Oct 4, 2023
1 parent e947f53 commit cc80239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions centrifuge-js/src/modules/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2505,12 +2505,12 @@ export function getPoolsModule(inst: Centrifuge) {
api.query.loans.activeLoans(poolId),
api.query.loans.closedLoan.entries(poolId),
api.query.priceOracle.values.entries(),
api.query.ormlAssetRegistry.metadata((poolValue.toPrimitive() as any).currency),
api.query.ormlAssetRegistry.metadata(poolValue.toPrimitive() as any),
api.call.loansApi.portfolio(poolId), // TODO: remove loans.activeLoans and use values from this runtime call
]).pipe(take(1))
}),
map(([createdLoanValues, activeLoanValues, closedLoanValues, oracles, rawCurrency, rawPortfolio]) => {
const currency = rawCurrency.toPrimitive() as AssetCurrencyData
const currency = (rawCurrency?.toPrimitive() as AssetCurrencyData) || { decimals: 0 }

const oraclePrices: Record<
string,
Expand Down

0 comments on commit cc80239

Please sign in to comment.