@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
3 lines (2 loc) • 979 B
JavaScript
import{a as u}from"./chunk-EL2MAJQB.js";import{a as f}from"./chunk-PH57BHSD.js";import{a as l}from"./chunk-UXKRFUDC.js";import{d}from"./chunk-LG3EKWP7.js";import{a as s}from"./chunk-UB233QTH.js";import{a as p}from"./chunk-SIAIYQNL.js";import{c as a}from"./chunk-IZ52XEZC.js";import{a as n,b as o,j as r,m as c}from"./chunk-HBP5N4FR.js";c();p();var m=()=>r(void 0,null,function*(){try{let t=yield u();try{let i=yield l(t);if(i!=null){let e=o(n({},i),{nonce:f(i)});return s.dispatch(a(e)),e}}catch(i){console.error("Failed getting account ",i)}}catch(t){console.error("Failed getting address ",t)}return null});function N(){return r(this,null,function*(){let t=d();if(t==null)throw"Provider not initialized";if(!t.isInitialized||t.isInitialized())return m();try{if(!t.init)throw"Current provider does not have init() function";return(yield t.init())?m():void 0}catch(i){console.error("Failed initializing provider ",i)}})}export{N as a};
//# sourceMappingURL=chunk-6VE3BRC5.js.map