diff --git a/projects/contrax-finance/index.js b/projects/contrax-finance/index.js index bbbcee0f5e4..1561c517172 100644 --- a/projects/contrax-finance/index.js +++ b/projects/contrax-finance/index.js @@ -58,13 +58,14 @@ async function getSteerData(api) { }), ]); - bals.forEach((bal, i) => { + for (const [i, bal] of bals.entries()) { + if (!bal || !supplies[i] || !reserves[i] || !reserves[i][0] || !reserves[i][1]) continue const ratio = bal / supplies[i]; const token0Bal = reserves[i][0] * ratio; const token1Bal = reserves[i][1] * ratio; api.addToken(token0s[i], token0Bal); api.addToken(token1s[i], token1Bal); - }); + } } async function getGMXData(api) {