const e=require(`../utils/caseInsensitive.utils.cjs`),t=require(`../utils/erc20tokenFunctions.cjs`),n=require(`../../error-handling/logger.cjs`),r=require(`../utils/publicBalance.utils.cjs`);require(`../utils/index.cjs`);var i=async(i,a,o,s)=>{try{return(await Promise.all(i.filter(n=>!e.caseInsensitiveEqual(n.token.erc20TokenAddress,a)&&!t.isNFTToken(n.token)).map(async e=>{let t=await r.getPublicBalance(s,o,e.token);return{token:e.token,balance:t?.balance||0n}}))).filter(({balance:e})=>e>0n)}catch(e){return n.Logger.error(`Error getting tokens to deposit back`,e),[]}};exports.getTokensToDepositBack=i;