message: Try-catch fetchAmmPrices getLpInfo
diff: @@ -69,13 +69,18 @@ const fetchAmmPrices = async (pools, knownPrices) => {
  const query = filtered.map(p => [p.address, p.lp0.address, p.lp1.address]);
  for (let i = 0; i < filtered.length; i += BATCH_SIZE) {
  const batch = query.slice(i, i + BATCH_SIZE);
  - const buf = await multicall.getLpInfo(batch);
  + let buf = [];
  + try {
  + buf = await multicall.getLpInfo(batch);
  + } catch (e) {
  + console.error('fetchAmmPrices', e);
  + }
  // Merge fetched data
  for (let j = 0; j < batch.length; j++) {
  - filtered[j + i].totalSupply = new BigNumber(buf[j * 3 + 0].toString());
  - filtered[j + i].lp0.balance = new BigNumber(buf[j * 3 + 1].toString());
  - filtered[j + i].lp1.balance = new BigNumber(buf[j * 3 + 2].toString());
  + filtered[j + i].totalSupply = new BigNumber(buf[j * 3 + 0]?.toString());
  + filtered[j + i].lp0.balance = new BigNumber(buf[j * 3 + 1]?.toString());
  + filtered[j + i].lp1.balance = new BigNumber(buf[j * 3 + 2]?.toString());
  }
  }
  @@ -86,12 +91,6 @@ const fetchAmmPrices = async (pools, knownPrices) => {
  const balance = await provider.getBalance(oneInch.address);
  oneInch.lp0.balance = new BigNumber(balance.toString());
  }
  - const peraBnb = filtered.filter(p => p.name === 'pera-pera-bnb')[0];
  - if (peraBnb) {
  - const pera = new ethers.Contract(peraBnb.lp0.address, ERC20, provider);
  - const balance = await pera.balanceOf(peraBnb.address);
  - peraBnb.lp0.balance = new BigNumber(balance.toString());
  - }
  }
  if (chain == '250') {
  @@ -99,8 +98,12 @@ const fetchAmmPrices = async (pools, knownPrices) => {
  if (beets) {
  const beetVault = new ethers.Contract(beets.vault, IBalancerVault, provider);
  const balance = await beetVault.getPoolTokens(beets.vaultPoolId);
  - beets.lp0.balance = new BigNumber(balance.balances[0].toString()).times(100 - beets.lp0.split);
  - beets.lp1.balance = new BigNumber(balance.balances[1].toString()).times(100 - beets.lp1.split);
  + beets.lp0.balance = new BigNumber(balance.balances[0].toString()).times(
  + 100 - beets.lp0.split
  + );
  + beets.lp1.balance = new BigNumber(balance.balances[1].toString()).times(
  + 100 - beets.lp1.split
  + );
  }
  }
  