Skip to content

Commit

Permalink
fix total apr (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
franzns authored Oct 25, 2024
1 parent 0098dbf commit 8c27fb8
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion modules/pool/lib/pool-gql-loader.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,20 @@ export class PoolGqlLoaderService {
apr: { __typename: 'GqlPoolAprTotal', total: `${item.apr}` },
}),
);
const apr = _.sumBy(items, 'apr');
let apr = 0;
for (const item of items) {
if (
item.type === 'SWAP_FEE_24H' ||
item.type === 'SWAP_FEE_7D' ||
item.type === 'SWAP_FEE_30D' ||
item.type === 'SURPLUS_24H' ||
item.type === 'SURPLUS_7D' ||
item.type === 'SURPLUS_30D'
) {
} else {
apr += item.apr;
}
}
const title = `${group.charAt(0) + group.slice(1).toLowerCase()} boosted APR`;

return {
Expand Down

0 comments on commit 8c27fb8

Please sign in to comment.