Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
fix(poolpairs-pagination): will be excluded after ApiPagedResponse ha…
Browse files Browse the repository at this point in the history
…ve been created (#825)
  • Loading branch information
fuxingloh authored Mar 4, 2022
1 parent ad0a7f5 commit c5b9f37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/module.api/poolpair.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ export class PoolPairController {

const items: PoolPairData[] = []
for (const [id, info] of Object.entries(result)) {
if (info.symbol === 'BURN-DFI') {
continue
}

const totalLiquidityUsd = await this.poolPairService.getTotalLiquidityUsd(info)
const apr = await this.poolPairService.getAPR(id, info)
const volume = await this.poolPairService.getUSDVolume(id)
items.push(mapPoolPair(id, info, totalLiquidityUsd, apr, volume))
}

return ApiPagedResponse.of(items, query.size, item => {
const response = ApiPagedResponse.of(items, query.size, item => {
return item.id
})
response.data = response.data.filter(value => {
return value.symbol !== 'BURN-DFI'
})
return response
}

/**
Expand Down

0 comments on commit c5b9f37

Please sign in to comment.