const e=require(`../../API/getGasEstimates.cjs`),t=require(`../web3/etherFunctions.cjs`),n=require(`../utils/amounts.utils.cjs`),r=require(`../../error-handling/logError.cjs`);var i=async(i,a,o,s,c,l=[],u)=>{let d,f;try{({priceOfTransactionInUSD:d,priceOfTransactionInToken:f}=await e.getGasEstimates(i,a.erc20TokenAddress,o,s,l.map(({from:e,to:t,calldata:n,value:r})=>({from:e,to:t,calldata:n,value:`${r}`})),c,u))}catch(e){r.logError(`processGasEstimates error:`,e)}let p=f?t.getAmountInWei(a,n.getValueFirstNDigit(f,a.decimals)):void 0;return{priceOfTransactionInUSD:d,priceOfTransactionInToken:p}};exports.processGasEstimates=i;