const e=require(`../../../types/transactions.types.cjs`);require(`../../../types/index.cjs`);const t=require(`../../utils/time.utils.cjs`);var n=1*1e3,r=30*1e3,i=async(i,a,o=0)=>{if((await i.getTransactionReceipt(a))?.status!==e.TransactionReceiptStatus.Succeeded)return;o>0&&await i.waitForTransaction(a,o);let s=r/n,c=null;for(let e=0;e<s;e+=1){try{if(c=await i.getTransaction(a),c)break}catch{}e<s-1&&await t.waitLittle(n)}return c??void 0};exports.recoverTransactionFromError=i;