Skip to content

Commit

Permalink
uniswap-v2 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slasher125 committed Jan 25, 2025
1 parent 29516b0 commit 214aee7
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/adaptors/uniswap-v2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,20 @@ const main = async (timestamp = null) => {
let data = [];

for (const [chain, url] of Object.entries(chains)) {
console.log(`Fetching data for ${chain}...`);
const chainData = await topLvl(
chain,
url,
query,
queryPrior,
'v2',
timestamp
);
data.push(...chainData);
try {
console.log(`Fetching data for ${chain}...`);
const chainData = await topLvl(
chain,
url,
query,
queryPrior,
'v2',
timestamp
);
data.push(...chainData);
} catch (err) {
console.log(chain, err);
}
}

return data.filter((p) => utils.keepFinite(p));
Expand Down

0 comments on commit 214aee7

Please sign in to comment.