Skip to content

Commit

Permalink
impermax fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slasher125 committed Nov 24, 2023
1 parent d6f8b54 commit ee18872
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adaptors/impermax-finance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,9 @@ async function getTokenPrices(tokens, chain, allCoins) {

const totalLiquidity = pairs
.map((p) => p.liquidity.usd)
.reduce((a, b) => a + b);
.reduce((a, b) => a + b, 0);
return (
pairs.map((p) => p.priceUsd * p.liquidity.usd).reduce((a, b) => a + b) /
pairs.map((p) => p.priceUsd * p.liquidity.usd).reduce((a, b) => a + b, 0) /
totalLiquidity
);
}
Expand Down

0 comments on commit ee18872

Please sign in to comment.