Skip to content

Commit

Permalink
fix: onchain data defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
gmbronco committed Sep 28, 2023
1 parent a727d66 commit c84dc12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions balancer-js/src/modules/data/pool/onchain-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const poolTypeCalls = (poolType: string, poolTypeVersion = 1) => {

const merge = (pool: SubgraphPoolBase, result: OnchainData) => ({
...pool,
tokens: pool.tokens.map((token) => {
tokens: result.poolTokens ? pool.tokens.map((token) => {

Check failure on line 138 in balancer-js/src/modules/data/pool/onchain-data.ts

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎···`
const idx = result.poolTokens[0]

Check failure on line 139 in balancer-js/src/modules/data/pool/onchain-data.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `····` with `········`
.map((t) => t.toLowerCase())

Check failure on line 140 in balancer-js/src/modules/data/pool/onchain-data.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `······` with `··········`
.indexOf(token.address);

Check failure on line 141 in balancer-js/src/modules/data/pool/onchain-data.ts

View workflow job for this annotation

GitHub Actions / lint

Insert `····`
Expand All @@ -154,11 +154,11 @@ const merge = (pool: SubgraphPoolBase, result: OnchainData) => ({
formatFixed(result.wrappedTokenRate, 18)) ||
token.priceRate,
} as SubgraphToken;
}),
}) : pool.tokens,
totalShares: result.totalShares
? formatFixed(result.totalShares, 18)
: pool.totalShares,
swapFee: formatFixed(result.swapFee, 18),
swapFee: result.swapFee ? formatFixed(result.swapFee, 18) : pool.swapFee,
amp:
(result.amp &&
result.amp[0] &&
Expand Down

0 comments on commit c84dc12

Please sign in to comment.