File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11const { queryKey, u8ArrayToString, getTokenBalances, } = require ( '../helper/chain/massa.js' ) ;
22const { sumTokens2 } = require ( '../helper/unwrapLPs' )
33
4- const factoryAddress = 'AS1rahehbQkvtynTomfoeLmwRgymJYgktGv5xd1jybRtiJMdu8XX'
4+ const factory1Address = 'AS1rahehbQkvtynTomfoeLmwRgymJYgktGv5xd1jybRtiJMdu8XX'
5+ const factory2Address = "AS127Lxdux4HCUkZL89SrRYR5kq2u8t64Jt3aYj786t6fBF1cZGcu"
56
67const getPairAddress = async ( factoryAddress ) => {
78 const transform = val => {
@@ -16,7 +17,9 @@ const getPairAddress = async (factoryAddress) => {
1617}
1718
1819async function tvl ( api ) {
19- const pools = await getPairAddress ( factoryAddress )
20+ const pools1 = await getPairAddress ( factory1Address )
21+ const pools2 = await getPairAddress ( factory2Address )
22+ const pools = pools1 . concat ( pools2 )
2023 const tokenXs = await queryKey ( pools , "TOKEN_X" )
2124 const tokenYs = await queryKey ( pools , "TOKEN_Y" )
2225 const tokenXBalances = await getTokenBalances ( tokenXs , pools )
You can’t perform that action at this time.
0 commit comments