var e=e=>{if(!e||e.length===0)return[];let t=e.reduce((e,t)=>{if(!t?.token?.symbol||t.amount==null)return e;let n=`${t.token.chainId}-${t.token.erc20TokenAddress.toLowerCase()}`,r=e.get(n);if(t.nftIds!=null){let n=`${t.token.chainId}-${t.token.erc20TokenAddress}-${e.size}`;return e.set(n,{token:t.token,amount:Number(t.amount),nftIds:t.nftIds}),e}return r?r.amount+=Number(t.amount):e.set(n,{token:t.token,amount:Number(t.amount)}),e},new Map);return Array.from(t.values()).map(({token:e,amount:t})=>({token:e,amount:parseFloat(t.toFixed(e.decimals)).toString()}))};exports.aggregateTokensBySymbol=e;