Skip to content

Commit edbcd72

Browse files
authored
Merge pull request #2191 from nvduc91/feat/kyber-add-arbitrum
add bsc pools
2 parents 1726b29 + c0373f2 commit edbcd72

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/adaptors/kyberswap-fairflow/index.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ const topLvl = async (timestamp) => {
2929
// Fetch all pools from the exchange for this chain
3030
const poolsResponse = await axios.get(`${BASE_URL}${chain}/api/v1/pools?exchange=kem_univ4_fairflow%`);
3131
const pools = poolsResponse.data.data;
32-
33-
if (!pools || pools.length === 0) {
34-
continue;
35-
}
36-
32+
if (chain === 'bsc') {
33+
// Call pool with exchange = kem_pancake_infinity_cl_fairflow_eg_lm and append to pools
34+
const pancakePoolsResponse = await axios.get(`${BASE_URL}${chain}/api/v1/pools?exchange=kem_pancake_infinity_cl_fairflow_eg_lm`);
35+
const pancakePools = pancakePoolsResponse.data.data;
36+
if (pancakePools.length > 0) {
37+
pools.push(...pancakePools);
38+
}
39+
}
40+
3741
// Fetch pool state data for each pool
3842
const poolAddresses = pools.map(pool => pool.poolAddress);
3943

0 commit comments

Comments
 (0)