@multiversx/sdk-dapp 5.0.0-alpha.3 → 5.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/__chunks__/{chunk-ZLBHLHQ3.mjs → chunk-46WBKAT4.mjs} +2 -2
- package/out/__chunks__/{chunk-Y2GZNJKO.mjs → chunk-4NMRZJSQ.mjs} +2 -2
- package/out/__chunks__/{chunk-TFQFZ5M2.mjs → chunk-773UPGVZ.mjs} +2 -2
- package/out/__chunks__/{chunk-XCXU3BVP.mjs → chunk-CRSZQV7V.mjs} +2 -2
- package/out/__chunks__/{chunk-ZK3OCDKZ.mjs → chunk-DELLFT6H.mjs} +2 -2
- package/out/__chunks__/chunk-GDSFFLIR.mjs +2 -0
- package/out/__chunks__/{chunk-D4MNCAND.mjs → chunk-HNEBEFTL.mjs} +2 -2
- package/out/__chunks__/{chunk-ZGNDECGJ.mjs → chunk-HWH2SKSH.mjs} +2 -2
- package/out/__chunks__/chunk-J7P6SJOM.mjs +2 -0
- package/out/__chunks__/chunk-J7P6SJOM.mjs.map +7 -0
- package/out/__chunks__/{chunk-G7ZMNJIE.mjs → chunk-MJGS5LXB.mjs} +2 -2
- package/out/__chunks__/chunk-N7KSN2OU.mjs +2 -0
- package/out/__chunks__/chunk-N7KSN2OU.mjs.map +7 -0
- package/out/__chunks__/chunk-OZ3OBQJ6.mjs +2 -0
- package/out/__chunks__/chunk-OZ3OBQJ6.mjs.map +7 -0
- package/out/__chunks__/{chunk-XKTDOIMV.mjs → chunk-PBIRC7U4.mjs} +2 -2
- package/out/__chunks__/{chunk-DHSATBNM.mjs → chunk-PUSIK3N4.mjs} +2 -2
- package/out/__chunks__/{chunk-ZIQFQWVJ.mjs → chunk-TCCW2HZK.mjs} +2 -2
- package/out/__chunks__/{chunk-643LVXSN.mjs → chunk-U5PPKFAJ.mjs} +2 -2
- package/out/__chunks__/{chunk-BTDFQCSV.mjs → chunk-XQLVTH7K.mjs} +2 -2
- package/out/__chunks__/{chunk-BJRGP56G.mjs → chunk-YDXS2C4W.mjs} +2 -2
- package/out/index.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/network/getNetworkConfig.d.ts +1 -1
- package/out/methods/network/getNetworkConfig.js +1 -1
- package/out/methods/network/getNetworkConfig.js.map +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.js +2 -2
- package/out/providers/DappProvider/helpers/login/login.js.map +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.js +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.js.map +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.d.ts +1 -1
- package/out/react/network/useGetNetworkConfig.js +1 -1
- package/out/react/network/useGetNetworkConfig.js.map +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs.map +3 -3
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.js +1 -1
- package/out/utils/account/refreshAccount.js.map +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/out/__chunks__/chunk-3PAMS4NB.mjs +0 -2
- package/out/__chunks__/chunk-3PAMS4NB.mjs.map +0 -7
- package/out/__chunks__/chunk-53TM7EG4.mjs +0 -2
- package/out/__chunks__/chunk-53TM7EG4.mjs.map +0 -7
- package/out/__chunks__/chunk-57KVKSEC.mjs +0 -2
- package/out/__chunks__/chunk-57KVKSEC.mjs.map +0 -7
- package/out/__chunks__/chunk-5KRDLFR5.mjs +0 -2
- /package/out/__chunks__/{chunk-ZLBHLHQ3.mjs.map → chunk-46WBKAT4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y2GZNJKO.mjs.map → chunk-4NMRZJSQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TFQFZ5M2.mjs.map → chunk-773UPGVZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XCXU3BVP.mjs.map → chunk-CRSZQV7V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZK3OCDKZ.mjs.map → chunk-DELLFT6H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5KRDLFR5.mjs.map → chunk-GDSFFLIR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D4MNCAND.mjs.map → chunk-HNEBEFTL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZGNDECGJ.mjs.map → chunk-HWH2SKSH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G7ZMNJIE.mjs.map → chunk-MJGS5LXB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XKTDOIMV.mjs.map → chunk-PBIRC7U4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DHSATBNM.mjs.map → chunk-PUSIK3N4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZIQFQWVJ.mjs.map → chunk-TCCW2HZK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-643LVXSN.mjs.map → chunk-U5PPKFAJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BTDFQCSV.mjs.map → chunk-XQLVTH7K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BJRGP56G.mjs.map → chunk-YDXS2C4W.mjs.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.ts"],
|
|
4
|
-
"sourcesContent": ["import BigNumber from 'bignumber.js';\n\nimport { getEconomics } from 'apiCalls/economics/getEconomics';\nimport { formatAmount } from 'lib/sdkDappUtils';\nimport { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { ProviderErrorsEnum } from 'types';\nimport { fetchAccount } from 'utils/account/fetchAccount';\nimport { getUsdValue } from 'utils/operations/getUsdValue';\n\nimport {\n IUpdateAccountsList,\n UpdateAccountObjectType\n} from './updateAccountsList.types';\nimport { ILedgerAccount } from '../../types/ledger.types';\n\n/**\n * Updates the list of accounts and fetches their balances.\n *\n * This function performs the following steps:\n * 1. Checks if the manager and provider are initialized; if not, throws an error.\n * 2. Retrieves the starting index for pagination and the current list of accounts.\n * 3. Checks if there is already data for the current page to avoid unnecessary fetching.\n * 4. If no data is present, it fetches the accounts from the wallet provider.\n * 5. Updates the state manager with the new account data and their balances.\n * 6. Handles errors by reverting to existing accounts and logging the error.\n */\nexport const updateAccountsList = async ({\n manager,\n provider\n}: IUpdateAccountsList) => {\n if (!manager || !provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n const network = getNetworkConfig();\n const startIndex = manager.getAccountScreenData()?.startIndex || 0;\n const allAccounts = manager.getAllAccounts();\n const economics = await getEconomics({ baseURL: network.apiAddress });\n\n const filterByStartIndexRange = (account: ILedgerAccount) =>\n account.index >= startIndex &&\n account.index < startIndex + manager.addressesPerPage;\n\n const allAccountsObject = allAccounts.reduce(\n (accountsObject: UpdateAccountObjectType, account) =>\n Object.assign(accountsObject, { [account.index]: account }),\n {}\n );\n\n const currentAccounts = allAccounts.filter(filterByStartIndexRange);\n const isStartIndexInAccounts = Boolean(allAccountsObject[startIndex]);\n\n manager.updateAccountScreen({\n isLoading: !isStartIndexInAccounts\n });\n\n if (currentAccounts.length > 0) {\n manager.updateAccountScreen({ accounts: currentAccounts });\n return;\n }\n\n try {\n const accountsArray = await provider.getAccounts(\n startIndex,\n manager.addressesPerPage\n );\n\n const accountsWithBalance = accountsArray.map(\n (address, accountIindex): ILedgerAccount => ({\n address,\n balance: '...',\n index: accountIindex + startIndex\n })\n );\n\n const newAllAccounts = [...allAccounts, ...accountsWithBalance];\n const balancePromises = accountsArray.map((address) =>\n fetchAccount({ address, baseURL: network.apiAddress })\n );\n\n const balances = await Promise.all(balancePromises);\n const newAllAccountsObject = newAllAccounts.reduce(\n (accountsObject: UpdateAccountObjectType, account) =>\n Object.assign(accountsObject, { [account.address]: account }),\n\n {}\n );\n\n balances.forEach((account) => {\n if (!account || !economics || !economics.price) {\n return;\n }\n\n const balanceBigNumber = new BigNumber(account.balance);\n const formattedBalance = balanceBigNumber\n .dividedBy(BigNumber(10).pow(18))\n .toFormat(4)\n .toString();\n\n if (balanceBigNumber.isNaN()) {\n return;\n }\n\n const usdValue = getUsdValue({\n amount: formatAmount({ input: account.balance }),\n usd: economics?.price\n });\n\n newAllAccountsObject[account.address].balance = formattedBalance;\n newAllAccountsObject[account.address].usdValue = usdValue;\n });\n\n const newAllAccountsArray = Object.values(newAllAccountsObject).sort(\n (alpha, beta) => alpha.index - beta.index\n );\n\n const accountsScreenArray = newAllAccountsArray.filter(\n filterByStartIndexRange\n );\n\n manager.updateAllAccounts(newAllAccountsArray);\n manager.updateAccountScreen({\n accounts: accountsScreenArray,\n isLoading: false\n });\n } catch (error) {\n console.error('Failed to fetch accounts:', error);\n }\n};\n"],
|
|
5
|
-
"mappings": "6MAAA,OAAOA,MAAe,eA0Bf,IAAMC,EAAqB,MAAO,CACvC,QAAAC,EACA,SAAAC,CACF,IAA2B,CACzB,GAAI,CAACD,GAAW,CAACC,EACf,MAAM,IAAI,oCAAuC,EAGnD,I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,UAAUC,EAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAC/B,SAAS,CAAC,EACV,SAAS,EAEZ,GAAID,EAAiB,MAAM,EACzB,OAGF,IAAMG,EAAWC,EAAY,CAC3B,OAAQC,EAAa,CAAE,MAAOnB,EAAQ,OAAQ,CAAC,EAC/C,IAAKH,GAAW,KAClB,CAAC,EAEDgB,EAAqBb,EAAQ,OAAO,EAAE,QAAUgB,EAChDH,EAAqBb,EAAQ,OAAO,EAAE,SAAWiB,CACnD,CAAC,EAED,IAAMG,EAAsB,OAAO,OAAOP,CAAoB,EAAE,KAC9D,CAACQ,EAAOC,IAASD,EAAM,MAAQC,EAAK,KACtC,EAEMC,EAAsBH,EAAoB,OAC9CrB,CACF,EAEAR,EAAQ,kBAAkB6B,CAAmB,EAC7C7B,EAAQ,oBAAoB,CAC1B,SAAUgC,EACV,UAAW,EACb,CAAC,CACH,OAASC,EAAO,CACd,QAAQ,MAAM,4BAA6BA,CAAK,CAClD,CACF",
|
|
6
|
-
"names": ["BigNumber", "updateAccountsList", "manager", "provider", "network", "getNetworkConfig", "startIndex", "allAccounts", "economics", "getEconomics", "filterByStartIndexRange", "account", "allAccountsObject", "accountsObject", "currentAccounts", "isStartIndexInAccounts", "accountsArray", "accountsWithBalance", "address", "accountIindex", "newAllAccounts", "balancePromises", "fetchAccount", "balances", "newAllAccountsObject", "balanceBigNumber", "BigNumber", "formattedBalance", "usdValue", "getUsdValue", "formatAmount", "newAllAccountsArray", "alpha", "beta", "accountsScreenArray", "error"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as F}from"./chunk-YPNKNMW5.mjs";import{a as v}from"./chunk-M3C5NS6M.mjs";import{a as b,b as D,g as R}from"./chunk-QD3CFFVT.mjs";import{a as _}from"./chunk-UFMHCVBL.mjs";import{b as l}from"./chunk-SBQJGS63.mjs";import{a as W}from"./chunk-672ZNZKR.mjs";import{a as V}from"./chunk-4ODPAHHA.mjs";import{a as G}from"./chunk-OTBTZ3NI.mjs";import{a as z}from"./chunk-WVTCO3AV.mjs";import{a as d}from"./chunk-3PAMS4NB.mjs";import{a as L}from"./chunk-6746F2FY.mjs";import{a as $}from"./chunk-CBIH5QMT.mjs";import{a as g}from"./chunk-R7SGL2HW.mjs";import{a as f,f as O}from"./chunk-YAXVLGG3.mjs";import{a as M}from"./chunk-TLKMUVQJ.mjs";import{b as U}from"./chunk-QI2QMNTG.mjs";import{a as T}from"./chunk-6FXEHNGW.mjs";import{a as B}from"./chunk-NJN53MJV.mjs";import{a as k}from"./chunk-YSCND2MX.mjs";import{a as h}from"./chunk-HORSXVIV.mjs";import{b as N,s as m,u as E}from"./chunk-CN4RHVUE.mjs";import{b as I}from"./chunk-IEJTMYFW.mjs";import{b as C,c as P,e as S}from"./chunk-2CNSQULM.mjs";import{b as j}from"./chunk-THQWNWSE.mjs";async function y({address:t,provider:o,apiAddress:r}){let e=await T({address:t,baseURL:r});if(!e)throw new Error("Account not found");U({address:t,providerType:o.getType()});let n={...e,username:h(e.username),nonce:g(e)};f(n),await l(t),v(),e.shard!=null&&await F({shard:Number(e.shard),apiAddress:r})}async function tt(t){let{apiAddress:o}=d();await t.login();let r=await t.getAddress();if(!r)throw new Error("Address not found");return await y({address:r,provider:t,apiAddress:o}),{address:r}}async function ot(t,o){let{apiAddress:r}=d(),e=M(o),n=await e.initialize({noCache:!0}),{address:s,signature:i,...c}=await t.login({token:n});if(!s)return console.warn("Login cancelled."),null;if(!i)return console.error("Failed to sign login token"),null;let a=e.getToken({address:s,token:n,signature:i});N({loginToken:n,signature:i,nativeAuthToken:a});let p=await W({loginToken:n,extraInfoData:{multisig:c?.multisig,impersonate:c?.impersonate},address:s});return await y({address:p,provider:t,apiAddress:r}),{address:p,signature:i}}async function K(t){let o=I(E());if(o)return await ot(t,o);let{address:r}=await tt(t);return await l(r),v(),{address:r}}var w={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${D}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${b}-${Date.now()}`}},rt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},et=t=>{for(let[o,r]of Object.entries(rt))if(t.includes(o))return r;return"Error when signing"};function A(t,o="error"){let r=t?.message,e=et(r),s=e!=="Error when signing"?"warning":o,i=Object.keys(w).includes(s)?w[s]:w.error,{toastId:c,iconClassName:a,title:p}=i;return H({toastId:c,duration:1e4,icon:"times",iconClassName:a,message:e,title:p}),e}async function q({provider:t,transactions:o,options:r={}}){await J();let{isGuarded:e,activeGuardianAddress:n,nonce:s}=$(),i=t.getType()==="ledger",c=V({latestNonce:s,transactions:o}),a=n&&e&&!r.skipGuardian?c?.map(u=>(u.version=C.withTxOptions().valueOf(),u.options=S.withOptions({guarded:!0,...i?{hashSign:!0}:{}}).valueOf(),u.guardian=P.newFromBech32(n),u)):c,p=await t.signTransactions(a)??[];return O(s+p.length),p}var x=class{constructor(o){this.provider=o}init(){return this.provider.init()}async login(){return await K(this.provider)}isInitialized(){return this.provider.isInitialized()}async logout(o={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}){return await _({provider:this.provider,options:o})}setShouldShowConsentPopup(o){this.provider.setShouldShowConsentPopup?.(o)}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(o,r){try{return await q({provider:this.provider,transactions:o,options:r})}catch(e){let n=A(e);throw new Error(n)}}async signMessage(o,r){try{return await z({provider:this.provider,message:o,options:r})}catch(e){let n=A(e,"warning");throw new Error(n)}}async verifyMessage(o){return await G(o)}async cancelLogin(){this.provider.cancelLogin?.()}};var Q=null;function To(t){Q=t}function X(){return Q||new x(j)}var nt=async()=>{try{let t=L(),o=d();try{let r=await T({address:t,baseURL:o.apiAddress});if(r!=null){let e={...r,username:h(r.username),nonce:g(r)};return f(e),e}}catch(r){console.error("Failed getting account ",r)}}catch(t){console.error("Failed getting address ",t)}return null};async function J(){let t=X();if(t==null)throw"Provider not initialized";try{if(!t.init)throw"Current provider does not have init() function";return await t.init()?nt():void 0}catch(o){console.error("Failed initializing provider ",o)}}var Y={},Z={},st=(t,o)=>{m().setState(({toasts:r})=>{let e=r.customToasts.length>0?Math.max(...r.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=o??`custom-toast-${e+1}`,s=r.customToasts.findIndex(a=>a.toastId===n),i={...t,toastId:n};if(s!==-1){r.customToasts[s]=i;return}r.customToasts.push({...i,toastId:n})},!1,"addCustomToast")},_o=t=>{m().setState(({toasts:o})=>{o.customToasts=o.customToasts.filter(r=>r.toastId!==t)},!1,"removeCustomToast")},zo=()=>{m().setState(({toasts:t})=>{t.customToasts=[]},!1,"removeAllCustomToasts")},Go=()=>{m().setState(({toasts:t})=>{t.transactionToasts=[]})},$o=({toastId:t,totalDuration:o})=>{m().setState(({toasts:r})=>{let e=r.transactionToasts.length>0?Math.max(...r.transactionToasts.map(s=>parseInt(s.toastId.split("-").pop()??"0"))):0,n=t||`transaction-toast-${e+1}`;r.transactionToasts.push({startTime:k(),endTime:B(o),toastId:n})},!1,"addTransactionToast")},Vo=t=>{m().setState(({toasts:o})=>{o.transactionToasts=o.transactionToasts.filter(r=>r.toastId!==t)},!1,"removeTransactionToast"),delete Z[t],delete Y[t]},H=t=>{let{toasts:o}=m().getState(),r=o.customToasts.length>0?Math.max(...o.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=t.toastId||`custom-toast-${r+1}`;return t.onClose&&(Z[e]=t.onClose),t.instantiateToastElement?(Y[e]=t.instantiateToastElement,m().setState(({toasts:n})=>{let s=n.customToasts.findIndex(a=>a.toastId===e),i={...t,instantiateToastElement:null,toastId:e};s!==-1?n.customToasts[s]=i:n.customToasts.push(i)},!1,"createCustomToast"),e):(st(t,e),e)};export{Y as a,Z as b,st as c,_o as d,zo as e,Go as f,$o as g,Vo as h,H as i,y as j,K as k,A as l,q as m,x as n,To as o,X as p,J as q};
|
|
2
|
-
//# sourceMappingURL=chunk-57KVKSEC.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/providers/DappProvider/helpers/login/helpers/accountLogin.ts", "../../src/providers/DappProvider/helpers/login/login.ts", "../../src/providers/DappProvider/helpers/signErrors/handleSignError.ts", "../../src/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.ts", "../../src/providers/DappProvider/DappProvider.ts", "../../src/providers/helpers/accountProvider.ts", "../../src/utils/account/refreshAccount.ts", "../../src/store/actions/toasts/toastsActions.ts"],
|
|
4
|
-
"sourcesContent": ["import { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { setGasStationMetadata } from 'methods/initApp/gastStationMetadata/setGasStationMetadata';\nimport { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { loginAction } from 'store/actions';\nimport { setAccount } from 'store/actions/account';\nimport { AccountType } from 'types/account.types';\nimport { fetchAccount } from 'utils/account/fetchAccount';\nimport { trimUsernameDomain } from 'utils/account/trimUsernameDomain';\n\ninterface IAccountLoginProps {\n address: string;\n provider: IProvider;\n apiAddress: string;\n}\n\nexport async function accountLogin({\n address,\n provider,\n apiAddress\n}: IAccountLoginProps) {\n const account = await fetchAccount({\n address,\n baseURL: apiAddress\n });\n\n if (!account) {\n throw new Error('Account not found');\n }\n\n loginAction({\n address,\n providerType: provider.getType()\n });\n\n const newAccount: AccountType = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(newAccount);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n if (account.shard != null) {\n await setGasStationMetadata({\n shard: Number(account.shard),\n apiAddress\n });\n }\n}\n", "import { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuth } from 'services/nativeAuth';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { setTokenLogin } from 'store/actions/loginInfo/loginInfoActions';\nimport { nativeAuthConfigSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport { accountLogin } from './helpers/accountLogin';\nimport { extractAddressFromToken } from './helpers/extractAddressFromToken';\n\nasync function loginWithoutNativeToken(provider: IProvider) {\n const { apiAddress } = getNetworkConfig();\n\n await provider.login();\n\n const address = await provider.getAddress();\n\n if (!address) {\n throw new Error('Address not found');\n }\n\n await accountLogin({ address, provider, apiAddress });\n\n return {\n address\n };\n}\n\nasync function loginWithNativeToken(\n provider: IProvider,\n nativeAuthConfig: NativeAuthConfigType\n) {\n const { apiAddress } = getNetworkConfig();\n\n const nativeAuthClient = nativeAuth(nativeAuthConfig);\n\n const loginToken = await nativeAuthClient.initialize({\n noCache: true\n });\n\n const { address, signature, ...loginResult } = await provider.login({\n token: loginToken\n });\n\n if (!address) {\n console.warn('Login cancelled.');\n return null;\n }\n\n if (!signature) {\n console.error('Failed to sign login token');\n return null;\n }\n\n const nativeAuthToken = nativeAuthClient.getToken({\n address,\n token: loginToken,\n signature\n });\n\n setTokenLogin({\n loginToken,\n signature,\n nativeAuthToken\n });\n\n const extractedAddress = await extractAddressFromToken({\n loginToken,\n extraInfoData: {\n multisig: loginResult?.multisig,\n impersonate: loginResult?.impersonate\n },\n address\n });\n\n await accountLogin({\n address: extractedAddress,\n provider,\n apiAddress\n });\n\n return {\n address: extractedAddress,\n signature\n };\n}\n\nexport async function login(provider: IProvider) {\n const nativeAuthConfig = nativeAuthConfigSelector(getState());\n\n if (nativeAuthConfig) {\n return await loginWithNativeToken(provider, nativeAuthConfig);\n }\n\n const { address } = await loginWithoutNativeToken(provider);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n return { address };\n}\n", "import {\n CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n CANCEL_TRANSACTION_TOAST_ID,\n ERROR_SIGNING_TOAST_ID\n} from 'constants/transactions.constants';\nimport { ToastIconsEnum } from 'managers/internal/ToastManager/helpers/getToastDataStateByStatus';\nimport { createCustomToast } from 'store/actions';\nimport { SigningErrorsEnum, SigningWarningsEnum } from 'types/enums.types';\n\nconst states = {\n error: {\n title: SigningErrorsEnum.errorSigning.toString(),\n iconClassName: 'danger',\n toastId: `${ERROR_SIGNING_TOAST_ID}-${Date.now()}`\n },\n warning: {\n title: SigningWarningsEnum.cancelled.toString(),\n iconClassName: 'warning',\n toastId: `${CANCEL_TRANSACTION_TOAST_ID}-${Date.now()}`\n }\n};\n\nconst errorsMap = {\n extensionResponse: 'Unable to sign transactions', // extension\n 'Transaction canceled': 'Transaction canceled', // web wallet\n 'cancelled by user': 'Transaction signing cancelled by user', // custom\n 'denied by the user': 'Transaction signing denied by the user' // ledger\n};\n\nconst getUserError = (error: string) => {\n for (const [key, value] of Object.entries(errorsMap)) {\n if (error.includes(key)) {\n return value;\n }\n }\n return SigningErrorsEnum.errorSigning;\n};\n\nexport function handleSignError(\n error: unknown,\n type: 'error' | 'warning' = 'error'\n) {\n const originalError = (error as Error)?.message;\n const errorMessage = getUserError(originalError);\n\n const isKnownError = errorMessage !== SigningErrorsEnum.errorSigning;\n\n const errorType = isKnownError ? 'warning' : type;\n\n const state = Object.keys(states).includes(errorType)\n ? states[errorType]\n : states.error;\n\n const { toastId, iconClassName, title } = state;\n\n createCustomToast({\n toastId,\n duration: CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n icon: ToastIconsEnum.times,\n iconClassName,\n message: errorMessage,\n title\n });\n\n return errorMessage;\n}\n", "import {\n Address,\n Transaction,\n TransactionOptions,\n TransactionVersion\n} from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport {\n IProvider,\n ProviderTypeEnum\n} from 'providers/types/providerFactory.types';\nimport { setAccountNonce } from 'store/actions';\nimport { refreshAccount } from 'utils';\nimport { computeNonces } from '../computeNonces/computeNonces';\n\nexport type SignTransactionsOptionsType = {\n skipGuardian?: boolean;\n};\n\ntype SignTransactionsType = {\n provider: IProvider;\n transactions: Transaction[];\n options?: SignTransactionsOptionsType;\n};\n\nexport async function signTransactionsWithProvider({\n provider,\n transactions,\n options = {}\n}: SignTransactionsType): Promise<Transaction[]> {\n await refreshAccount();\n const { isGuarded, activeGuardianAddress, nonce } = getAccount();\n const isLedger = provider.getType() === ProviderTypeEnum.ledger;\n\n const transactionsWithComputedNonce = computeNonces({\n latestNonce: nonce,\n transactions\n });\n\n const transactionsToSign =\n activeGuardianAddress && isGuarded && !options.skipGuardian\n ? transactionsWithComputedNonce?.map((transaction) => {\n transaction.version = TransactionVersion.withTxOptions().valueOf();\n transaction.options = TransactionOptions.withOptions({\n guarded: true,\n ...(isLedger ? { hashSign: true } : {})\n }).valueOf();\n\n transaction.guardian = Address.newFromBech32(activeGuardianAddress);\n\n return transaction;\n })\n : transactionsWithComputedNonce;\n\n const signedTransactions: Transaction[] =\n (await provider.signTransactions(transactionsToSign)) ?? [];\n\n setAccountNonce(nonce + signedTransactions.length);\n\n return signedTransactions;\n}\n", "import { Message, Transaction } from 'lib/sdkCore';\nimport { IProvider } from '../types/providerFactory.types';\nimport { login } from './helpers/login/login';\nimport { logout } from './helpers/logout/logout';\nimport { handleSignError } from './helpers/signErrors/handleSignError';\nimport { signMessageWithProvider } from './helpers/signMessage/signMessageWithProvider';\nimport {\n verifyMessage,\n VerifyMessageReturnType\n} from './helpers/signMessage/verifyMessage';\nimport {\n signTransactionsWithProvider,\n SignTransactionsOptionsType\n} from './helpers/signTransactions/signTransactionsWithProvider';\n\nexport class DappProvider {\n private provider: IProvider;\n\n constructor(provider: IProvider) {\n this.provider = provider;\n }\n\n init() {\n return this.provider.init();\n }\n\n async login() {\n return await login(this.provider);\n }\n\n isInitialized() {\n return this.provider.isInitialized();\n }\n\n async logout(\n options = {\n shouldBroadcastLogoutAcrossTabs: true,\n hasConsentPopup: false\n }\n ) {\n return await logout({ provider: this.provider, options });\n }\n\n setShouldShowConsentPopup(shouldShow: boolean) {\n this.provider.setShouldShowConsentPopup?.(shouldShow);\n }\n\n getType() {\n return this.provider.getType();\n }\n\n getProvider() {\n return this.provider;\n }\n\n async signTransactions(\n transactions: Transaction[],\n options?: SignTransactionsOptionsType\n ): Promise<Transaction[]> {\n try {\n const signedTransactions = await signTransactionsWithProvider({\n provider: this.provider,\n transactions,\n options\n });\n return signedTransactions;\n } catch (error) {\n const errorMessage = handleSignError(error);\n throw new Error(errorMessage);\n }\n }\n\n async signMessage(\n message: Message,\n options?: {\n hasConsentPopup?: boolean;\n }\n ): Promise<Message | null> {\n try {\n const signedMessage = await signMessageWithProvider({\n provider: this.provider,\n message,\n options\n });\n return signedMessage;\n } catch (error) {\n const errorMessage = handleSignError(error, 'warning');\n throw new Error(errorMessage);\n }\n }\n\n async verifyMessage(signedMessage: string): Promise<VerifyMessageReturnType> {\n return await verifyMessage(signedMessage);\n }\n\n async cancelLogin() {\n this.provider.cancelLogin?.();\n }\n}\n", "import { IProvider } from 'providers/types/providerFactory.types';\nimport { DappProvider } from '../DappProvider';\nimport { emptyProvider } from './emptyProvider';\n\nexport type ProvidersType = IProvider;\n\nlet accountProvider: DappProvider | null = null;\n\nexport function setAccountProvider<TProvider extends DappProvider | null>(\n provider: TProvider\n) {\n accountProvider = provider;\n}\n\nexport function getAccountProvider(): DappProvider {\n return accountProvider || new DappProvider(emptyProvider);\n}\n", "import { getAddress } from 'methods/account/getAddress';\nimport { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { setAccount } from 'store/actions';\nimport { fetchAccount } from './fetchAccount';\nimport { trimUsernameDomain } from './trimUsernameDomain';\n\nconst setNewAccount = async () => {\n try {\n const address = getAddress();\n const network = getNetworkConfig();\n\n try {\n const account = await fetchAccount({\n address,\n baseURL: network.apiAddress\n });\n\n if (account != null) {\n const accountData = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(accountData);\n\n return accountData;\n }\n } catch (e) {\n console.error('Failed getting account ', e);\n }\n } catch (e) {\n console.error('Failed getting address ', e);\n }\n\n return null;\n};\n\nexport async function refreshAccount() {\n const provider = getAccountProvider();\n\n if (provider == null) {\n throw 'Provider not initialized';\n }\n\n try {\n if (!provider.init) {\n throw 'Current provider does not have init() function';\n }\n\n const initialized = await provider.init();\n\n if (!initialized) {\n return;\n }\n\n return setNewAccount();\n } catch (e) {\n console.error('Failed initializing provider ', e);\n }\n\n return undefined;\n}\n", "import {\n CustomToastType,\n IComponentToast\n} from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { getUnixTimestamp, getUnixTimestampWithAddedMilliseconds } from 'utils';\n\nexport const customToastComponentDictionary: Record<\n string,\n IComponentToast['instantiateToastElement']\n> = {};\nexport const customToastCloseHandlersDictionary: Record<string, () => void> =\n {};\n\nexport const addCustomToast = (\n customToast: CustomToastType,\n currentToastId?: string\n) => {\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.customToasts.length > 0\n ? Math.max(\n ...state.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n const toastId = currentToastId ?? `custom-toast-${lastToastIndex + 1}`;\n\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const newToast: CustomToastType = {\n ...customToast,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = newToast;\n return;\n }\n\n state.customToasts.push({\n ...newToast,\n toastId\n });\n },\n false,\n 'addCustomToast'\n );\n};\n\nexport const removeCustomToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = state.customToasts.filter(\n (toast) => toast.toastId !== toastId\n );\n },\n false,\n 'removeCustomToast'\n );\n};\n\nexport const removeAllCustomToasts = () => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = [];\n },\n false,\n 'removeAllCustomToasts'\n );\n};\n\nexport const removeAllTransactionToasts = () => {\n getStore().setState(({ toasts: state }) => {\n state.transactionToasts = [];\n });\n};\n\nexport const addTransactionToast = ({\n toastId,\n totalDuration\n}: {\n toastId: string;\n totalDuration: number;\n}) => {\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.transactionToasts.length > 0\n ? Math.max(\n ...state.transactionToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n const newToastId = toastId || `transaction-toast-${lastToastIndex + 1}`;\n\n state.transactionToasts.push({\n startTime: getUnixTimestamp(),\n endTime: getUnixTimestampWithAddedMilliseconds(totalDuration),\n toastId: newToastId\n });\n },\n false,\n 'addTransactionToast'\n );\n};\n\nexport const removeTransactionToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.transactionToasts = state.transactionToasts.filter((toast) => {\n return toast.toastId !== toastId;\n });\n },\n false,\n 'removeTransactionToast'\n );\n\n delete customToastCloseHandlersDictionary[toastId];\n delete customToastComponentDictionary[toastId];\n};\n\nexport const createCustomToast = (props: CustomToastType) => {\n const { toasts } = getStore().getState();\n\n const lastToastIndex =\n toasts.customToasts.length > 0\n ? Math.max(\n ...toasts.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n\n const toastId = props.toastId || `custom-toast-${lastToastIndex + 1}`;\n\n if (props.onClose) {\n customToastCloseHandlersDictionary[toastId] = props.onClose;\n }\n\n if (props.instantiateToastElement) {\n customToastComponentDictionary[toastId] = props.instantiateToastElement;\n\n getStore().setState(\n ({ toasts: state }) => {\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const toast: CustomToastType = {\n ...props,\n instantiateToastElement: null,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = toast;\n } else {\n state.customToasts.push(toast);\n }\n },\n false,\n 'createCustomToast'\n );\n\n return toastId;\n }\n\n addCustomToast(props, toastId);\n return toastId;\n};\n"],
|
|
5
|
-
"mappings": "ygCAiBA,eAAsBA,EAAa,CACjC,QAAAC,EACA,SAAAC,EACA,WAAAC,CACF,EAAuB,CACrB,IAAMC,EAAU,MAAMC,EAAa,CACjC,QAAAJ,EACA,QAASE,CACX,CAAC,EAED,GAAI,CAACC,EACH,MAAM,IAAI,MAAM,mBAAmB,EAGrCE,EAAY,CACV,QAAAL,EACA,aAAcC,EAAS,QAAQ,CACjC,CAAC,EAED,IAAMK,EAA0B,CAC9B,GAAGH,EACH,SAAUI,EAAmBJ,EAAQ,QAAQ,EAC7C,MAAOK,EAAeL,CAAO,CAC/B,EAEAM,EAAWH,CAAU,EAErB,MAAMI,EAA0BV,CAAO,EACvCW,EAAkB,EAEdR,EAAQ,OAAS,MACnB,MAAMS,EAAsB,CAC1B,MAAO,OAAOT,EAAQ,KAAK,EAC3B,WAAAD,CACF,CAAC,CAEL,CCzCA,eAAeW,GAAwBC,EAAqB,CAC1D,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAiB,EAExC,MAAMF,EAAS,MAAM,EAErB,IAAMG,EAAU,MAAMH,EAAS,WAAW,EAE1C,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,mBAAmB,EAGrC,aAAMC,EAAa,CAAE,QAAAD,EAAS,SAAAH,EAAU,WAAAC,CAAW,CAAC,EAE7C,CACL,QAAAE,CACF,CACF,CAEA,eAAeE,GACbL,EACAM,EACA,CACA,GAAM,CAAE,WAAAL,CAAW,EAAIC,EAAiB,EAElCK,EAAmBC,EAAWF,CAAgB,EAE9CG,EAAa,MAAMF,EAAiB,WAAW,CACnD,QAAS,EACX,CAAC,EAEK,CAAE,QAAAJ,EAAS,UAAAO,EAAW,GAAGC,CAAY,EAAI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F,EACA,EAEAC,EAAUa,EAAM,SAAW,gBAAgBf,EAAiB,CAAC,GAMnE,OAJIe,EAAM,UACRrB,EAAmCQ,CAAO,EAAIa,EAAM,SAGlDA,EAAM,yBACRtB,EAA+BS,CAAO,EAAIa,EAAM,wBAEhDjB,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrB,IAAMI,EAAqBJ,EAAM,aAAa,UAC3CE,GAAUA,EAAM,UAAYC,CAC/B,EAEMD,EAAyB,CAC7B,GAAGc,EACH,wBAAyB,KACzB,QAAAb,CACF,EAEqBC,IAAuB,GAG1CJ,EAAM,aAAaI,CAAkB,EAAIF,EAEzCF,EAAM,aAAa,KAAKE,CAAK,CAEjC,EACA,GACA,mBACF,EAEOC,IAGTP,GAAeoB,EAAOb,CAAO,EACtBA,EACT",
|
|
6
|
-
"names": ["accountLogin", "address", "provider", "apiAddress", "account", "fetchAccount", "loginAction", "newAccount", "trimUsernameDomain", "getLatestNonce", "setAccount", "registerWebsocketListener", "trackTransactions", "setGasStationMetadata", "loginWithoutNativeToken", "provider", "apiAddress", "getNetworkConfig", "address", "accountLogin", "loginWithNativeToken", "nativeAuthConfig", "nativeAuthClient", "nativeAuth", "loginToken", "signature", "loginResult", "nativeAuthToken", "setTokenLogin", "extractedAddress", "extractAddressFromToken", "login", "nativeAuthConfigSelector", "getState", "registerWebsocketListener", "trackTransactions", "states", "ERROR_SIGNING_TOAST_ID", "CANCEL_TRANSACTION_TOAST_ID", "errorsMap", "getUserError", "error", "key", "value", "handleSignError", "type", "originalError", "errorMessage", "errorType", "state", "toastId", "iconClassName", "title", "createCustomToast", "signTransactionsWithProvider", "provider", "transactions", "options", "refreshAccount", "isGuarded", "activeGuardianAddress", "nonce", "getAccount", "isLedger", "transactionsWithComputedNonce", "computeNonces", "transactionsToSign", "transaction", "TransactionVersion", "TransactionOptions", "Address", "signedTransactions", "setAccountNonce", "DappProvider", "provider", "login", "options", "logout", "shouldShow", "transactions", "signTransactionsWithProvider", "error", "errorMessage", "handleSignError", "message", "signMessageWithProvider", "signedMessage", "verifyMessage", "accountProvider", "setAccountProvider", "provider", "getAccountProvider", "DappProvider", "emptyProvider", "setNewAccount", "address", "getAddress", "network", "getNetworkConfig", "account", "fetchAccount", "accountData", "trimUsernameDomain", "getLatestNonce", "setAccount", "e", "refreshAccount", "provider", "getAccountProvider", "customToastComponentDictionary", "customToastCloseHandlersDictionary", "addCustomToast", "customToast", "currentToastId", "getStore", "state", "lastToastIndex", "toast", "toastId", "existingToastIndex", "newToast", "removeCustomToast", "removeAllCustomToasts", "removeAllTransactionToasts", "addTransactionToast", "totalDuration", "newToastId", "getUnixTimestamp", "getUnixTimestampWithAddedMilliseconds", "removeTransactionToast", "createCustomToast", "props", "toasts"]
|
|
7
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|