UNPKG

@sofaws/dapp-core

Version:

A library to hold the main logic for a dapp on the Elrond Network

3 lines (2 loc) 729 B
import{h as c}from"./chunk-V2DQWH6R.js";import{a as d}from"./chunk-UB233QTH.js";import{j as i,m as n}from"./chunk-HBP5N4FR.js";n();import h from"axios";function H(e){return i(this,null,function*(){let m=c(d.getState()),o=e.map(s=>s.hash),{data:u}=yield h.get(`${m}/transactions`,{params:{hashes:o.join(","),withScResults:!0}});return e.map(({hash:s,previousStatus:t})=>{let a=u.find(r=>(r==null?void 0:r.txHash)===s);return{hash:s,data:a==null?void 0:a.data,invalidTransaction:a==null,status:a==null?void 0:a.status,results:a==null?void 0:a.results,sender:a==null?void 0:a.sender,receiver:a==null?void 0:a.receiver,previousStatus:t,hasStatusChanged:a&&a.status!==t}})})}export{H as a}; //# sourceMappingURL=chunk-MSAK7AB3.js.map