@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
3 lines (2 loc) • 1.04 kB
JavaScript
import{c as p,d as f}from"./chunk-ZUW3EYNS.js";import{a as l}from"./chunk-PFI6RQVA.js";import{g as m}from"./chunk-V2DQWH6R.js";import{a as T}from"./chunk-SIAIYQNL.js";import{k as e}from"./chunk-JXBPRUT3.js";import{k as c,l as o,s as h}from"./chunk-ZR7YL3KO.js";import{k as g}from"./chunk-P6M5SGWP.js";import{m as a}from"./chunk-HBP5N4FR.js";a();h();import{useEffect as w}from"react";import{WalletProvider as I}from"@elrondnetwork/erdjs-web-wallet-provider";import E from"qs";T();g();function q(d){let{search:s}=window.location,u=f(m),r=p();w(()=>{if(s!=null){let t=E.parse(s.replace("?",""));if(t&&o in t){let n=String(t[o]),i=new I(`${u.walletAddress}${c}`).getTransactionsFromWalletUrl();if(t.status==="cancelled"){r(e({sessionId:n,status:"cancelled"})),d(),history.pushState({},document==null?void 0:document.title,"?");return}i.length>0&&(r(e({sessionId:n,status:"signed",transactions:i.map(S=>l(S))})),history.pushState({},document==null?void 0:document.title,"?"))}}},[s])}export{q as a};
//# sourceMappingURL=chunk-BQ7HF5HX.js.map