Skip to content

Commit

Permalink
chore(subgraph): Remove not necessary fields (Uniswap#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeki authored May 9, 2024
1 parent 9df621c commit 9862bd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/providers/v2/subgraph-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ export class V2SubgraphProvider implements IV2SubgraphProvider {
})
.map((pool) => {
return {
...pool,
id: pool.id.toLowerCase(),
token0: {
id: pool.token0.id.toLowerCase(),
Expand Down
5 changes: 3 additions & 2 deletions src/providers/v3/subgraph-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,18 @@ export class V3SubgraphProvider implements IV3SubgraphProvider {
parseFloat(pool.totalValueLockedETH) > 0.01
)
.map((pool) => {
const { totalValueLockedETH, totalValueLockedUSD, ...rest } = pool;
const { totalValueLockedETH, totalValueLockedUSD } = pool;

return {
...rest,
id: pool.id.toLowerCase(),
feeTier: pool.feeTier,
token0: {
id: pool.token0.id.toLowerCase(),
},
token1: {
id: pool.token1.id.toLowerCase(),
},
liquidity: pool.liquidity,
tvlETH: parseFloat(totalValueLockedETH),
tvlUSD: parseFloat(totalValueLockedUSD),
};
Expand Down

0 comments on commit 9862bd9

Please sign in to comment.