fixing the TVL calculation
This commit is contained in:
@@ -567,11 +567,9 @@ export function useGetAllPools(offset: number = 0, limit: number = 100) {
|
||||
priceStr = `$${finalPrice.toFixed(4)}`;
|
||||
}
|
||||
|
||||
// Calculate TVL (approximate by getting first token balance and multiplying by 3)
|
||||
// Calculate TVL (approximate by getting first token balance and multiplying by number of tokens)
|
||||
const tokenBalance = Number(balance) / Math.pow(10, decimals);
|
||||
|
||||
console.log('tokenBalance', tokenBalance);
|
||||
const approximateTVL = tokenBalance * 3;
|
||||
const approximateTVL = tokenBalance * tokens.length;
|
||||
tvlStr = formatTVL(approximateTVL);
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user