@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
3 lines (2 loc) • 1.44 kB
JavaScript
import{a as m}from"./chunk-MT4XEZF5.js";import{a as c}from"./chunk-XARB3IMU.js";import{a as p}from"./chunk-2WJ53VR7.js";import{a as f}from"./chunk-3BRT3RIM.js";import{a as g}from"./chunk-GYPWYUOA.js";import{a as l}from"./chunk-LKGUKJZO.js";import{a as d}from"./chunk-WU6HTRPR.js";import{b as a}from"./chunk-I2NWMXXW.js";import{m as s}from"./chunk-HBP5N4FR.js";s();import o from"react";import{faCircleNotch as w}from"@fortawesome/free-solid-svg-icons";import I from"classnames";var W="Waiting for device",V=({callbackRoute:C,className:u="dapp-ledger-login-container",wrapContentInsideModal:L=!0,onClose:T,onLoginRedirect:x,token:n})=>{let P={spinner:I(a.textPrimary,"fa-spin")},{ledgerAccount:A}=d(),[h,{error:e,isLoading:t},{showAddressList:S,accounts:y,onGoToPrevPage:b,onGoToNextPage:v,onSelectAddress:G,onConfirmSelectedAddress:N,startIndex:k,selectedAddress:r}]=l({callbackRoute:C,token:n,onLoginRedirect:x});function i(){return t?o.createElement(g,{icon:w,iconClass:P.spinner,title:W}):A!=null&&!e?o.createElement(p,{token:n}):S&&!e?o.createElement(c,{accounts:y,loading:t,onGoToNextPage:v,onGoToPrevPage:b,onSelectAddress:G,startIndex:k,selectedAddress:r==null?void 0:r.address,onConfirmSelectedAddress:N}):o.createElement(f,{onClick:h,error:e})}return L?o.createElement(m,{onClose:T,modalConfig:{headerText:"Login with ledger",showHeader:!0,modalDialogClassName:u}},i()):i()};export{V as a};
//# sourceMappingURL=chunk-ZNE6V7ED.js.map