const e=require(`../web3/etherFunctions.cjs`),t=require(`../../error-handling/logger.cjs`),n=require(`../utils/publicBalance.utils.cjs`);require(`../utils/index.cjs`),require(`../web3/index.cjs`);var r=async(r,i,a,o,s,c)=>{try{let t=await a.getEthereumAddressByChain(i),l=await a.getBalances(i,a.userKeys.getShieldedPrivateKey(),a.userKeys.getShieldedPublicKey(),t);return await Promise.all(r.map(async t=>{let r=t.erc20TokenAddress.toLowerCase(),i=l.get(r)?.balance??0n,a=(await n.getPublicBalance(s,o,t))?.balance??0n,u=c.get(r)??0,d=parseFloat(e.getAmountInToken(t,i))*u,f=parseFloat(e.getAmountInToken(t,a))*u;return{erc20Token:t,privateUsdBalance:d,publicUsdBalance:f,totalUsdBalance:d+f}}))}catch(e){return t.Logger.error(`Error getting gas token records`,e),[]}};exports.getGasTokenRecords=r;