diff --git a/pages/api/getAllGauges.js b/pages/api/getAllGauges.js index 28502b65..49abdf6b 100644 --- a/pages/api/getAllGauges.js +++ b/pages/api/getAllGauges.js @@ -217,6 +217,10 @@ export default fn(async ({ blockchainId } = {}) => { ])), })).map((gaugeData) => { const pool = getPoolByLpTokenAddress(gaugeData.lpTokenAddress, 'ethereum'); + if (!pool) { + console.log('MISSING POOL:', gaugeData.lpTokenAddress) + return null; + } return { ...gaugeData, @@ -228,7 +232,7 @@ export default fn(async ({ blockchainId } = {}) => { type: ((pool.registryId === 'crypto' || pool.registryId === 'factory-crypto') ? 'crypto' : 'stable'), lpTokenPrice: (pool.usdTotal / (pool.totalSupply / 1e18)), }; - }); + }).filter((o) => o !== null); const mainGaugesEthereum = arrayToHashmap(gaugesData.map(({ address,