We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80373a2 commit 87ead2cCopy full SHA for 87ead2c
projects/phoenix-hub/index.js
@@ -6,7 +6,7 @@ async function tvl() {
6
const tickers = await utils.fetchURL("https://api-phoenix-v2.decentrio.ventures/tickers");
7
8
// Sum up the tvl
9
- const totalTVL = tickers.data.reduce((acc, t) => acc + t.liquidity_in_usd, 0);
+ const totalTVL = tickers.data.reduce((acc, t) => acc + (t.liquidity_in_usd > 0 ? t.liquidity_in_usd : 0), 0);
10
return toUSDTBalances(totalTVL);
11
}
12
0 commit comments