@multiversx/sdk-dapp 5.1.3 → 5.1.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/README.md +36 -31
- package/out/__chunks__/{chunk-PBMO4Y47.mjs → chunk-3GZLHBMS.mjs} +2 -2
- package/out/__chunks__/chunk-4SJNM6SL.mjs +2 -0
- package/out/__chunks__/{chunk-JNUF7URZ.mjs → chunk-5JYWEIVX.mjs} +2 -2
- package/out/__chunks__/{chunk-VX6FOSXG.mjs → chunk-5MTV6BYP.mjs} +2 -2
- package/out/__chunks__/chunk-6IP7LJSW.mjs +2 -0
- package/out/__chunks__/{chunk-MZEDBAQE.mjs → chunk-6M6WCTHW.mjs} +2 -2
- package/out/__chunks__/{chunk-S2HQMNW6.mjs → chunk-72FLAB3J.mjs} +2 -2
- package/out/__chunks__/chunk-7AU7TZJF.mjs +2 -0
- package/out/__chunks__/{chunk-ZDCPV3O4.mjs → chunk-7DECU3EO.mjs} +2 -2
- package/out/__chunks__/{chunk-JW2RVDMU.mjs → chunk-7ZARUNA4.mjs} +2 -2
- package/out/__chunks__/{chunk-463K27BJ.mjs → chunk-AN65FUBF.mjs} +2 -2
- package/out/__chunks__/{chunk-7HNMIUES.mjs → chunk-AN7WTTXJ.mjs} +2 -2
- package/out/__chunks__/{chunk-C25AGRYE.mjs → chunk-APLLFKCG.mjs} +2 -2
- package/out/__chunks__/{chunk-ZKAIQNIL.mjs → chunk-ARKNESS3.mjs} +2 -2
- package/out/__chunks__/{chunk-KJCSIEAC.mjs → chunk-BMB5EBCD.mjs} +2 -2
- package/out/__chunks__/{chunk-4N34K4EN.mjs → chunk-BN6QVD7B.mjs} +2 -2
- package/out/__chunks__/{chunk-Y7BUJTYP.mjs → chunk-BZ7SOBES.mjs} +2 -2
- package/out/__chunks__/{chunk-QGTHGE7E.mjs → chunk-C43JUIS3.mjs} +2 -2
- package/out/__chunks__/{chunk-555CAG7Y.mjs → chunk-C6NQEN6N.mjs} +2 -2
- package/out/__chunks__/{chunk-GVTM4RFC.mjs → chunk-CDFO2GVK.mjs} +2 -2
- package/out/__chunks__/{chunk-VQ4GD4WE.mjs → chunk-CS5BSVSE.mjs} +2 -2
- package/out/__chunks__/chunk-D3KKYOYF.mjs +2 -0
- package/out/__chunks__/chunk-DGHPHAOS.mjs +2 -0
- package/out/__chunks__/{chunk-JNJ4L4QD.mjs → chunk-FBE76A3W.mjs} +2 -2
- package/out/__chunks__/{chunk-LC3EPABR.mjs → chunk-G36BWGZR.mjs} +2 -2
- package/out/__chunks__/chunk-GDKW3NI7.mjs +2 -0
- package/out/__chunks__/chunk-GDKW3NI7.mjs.map +7 -0
- package/out/__chunks__/chunk-GE6T2B4E.mjs +2 -0
- package/out/__chunks__/{chunk-BUHHNIJJ.mjs → chunk-GUD6RECQ.mjs} +2 -2
- package/out/__chunks__/chunk-HBB7HL5B.mjs +2 -0
- package/out/__chunks__/{chunk-UGUQSBY5.mjs → chunk-HD6OPS7Q.mjs} +2 -2
- package/out/__chunks__/{chunk-WC4UR2ZF.mjs → chunk-HFN44NHN.mjs} +2 -2
- package/out/__chunks__/{chunk-XQUUCE53.mjs → chunk-HFYBB326.mjs} +2 -2
- package/out/__chunks__/{chunk-SYNNW6IN.mjs → chunk-HLEGJP45.mjs} +2 -2
- package/out/__chunks__/chunk-HO2Y34SD.mjs +2 -0
- package/out/__chunks__/{chunk-NA5CDQ5C.mjs → chunk-IAQCHY3X.mjs} +2 -2
- package/out/__chunks__/chunk-ICF2MAYU.mjs +2 -0
- package/out/__chunks__/{chunk-XDYKH6G4.mjs.map → chunk-ICF2MAYU.mjs.map} +1 -1
- package/out/__chunks__/chunk-IJT27EFF.mjs +2 -0
- package/out/__chunks__/{chunk-W6P2TQ3N.mjs → chunk-IKCEIZK2.mjs} +2 -2
- package/out/__chunks__/{chunk-XJQ4VZS2.mjs → chunk-ISHHMEWX.mjs} +2 -2
- package/out/__chunks__/{chunk-ZMLJXSO5.mjs → chunk-JFRQ37WV.mjs} +2 -2
- package/out/__chunks__/{chunk-XIDZCWKE.mjs → chunk-JKXED2JJ.mjs} +2 -2
- package/out/__chunks__/chunk-KGFWVCB5.mjs +2 -0
- package/out/__chunks__/{chunk-2KE2BNG7.mjs → chunk-L5G2CINO.mjs} +2 -2
- package/out/__chunks__/{chunk-A3CEGIRB.mjs → chunk-L6FN2IMQ.mjs} +2 -2
- package/out/__chunks__/chunk-L6P6YGKR.mjs +2 -0
- package/out/__chunks__/chunk-L6P6YGKR.mjs.map +7 -0
- package/out/__chunks__/{chunk-TJYR4CV6.mjs → chunk-LBCZDKL3.mjs} +2 -2
- package/out/__chunks__/{chunk-CIB3ITZR.mjs → chunk-LNKBLVKB.mjs} +2 -2
- package/out/__chunks__/{chunk-WJXCNHT3.mjs → chunk-MBHXPTPF.mjs} +2 -2
- package/out/__chunks__/chunk-MKUAKB6R.mjs +2 -0
- package/out/__chunks__/{chunk-AYURCZHZ.mjs → chunk-MQE7EP66.mjs} +2 -2
- package/out/__chunks__/{chunk-ZEQI7SII.mjs → chunk-MVFIZ2UW.mjs} +2 -2
- package/out/__chunks__/{chunk-QEU6LCSD.mjs → chunk-MZZNZFMX.mjs} +2 -2
- package/out/__chunks__/{chunk-Q62OP5VI.mjs → chunk-NVA7A4D6.mjs} +2 -2
- package/out/__chunks__/{chunk-76A63VDO.mjs → chunk-QG4OP5CW.mjs} +2 -2
- package/out/__chunks__/{chunk-4PILLRHM.mjs → chunk-QNGOARJQ.mjs} +2 -2
- package/out/__chunks__/{chunk-H3DYNUJU.mjs → chunk-QRW74BOT.mjs} +2 -2
- package/out/__chunks__/{chunk-T2BVHJVW.mjs → chunk-QUX36OME.mjs} +2 -2
- package/out/__chunks__/{chunk-PETVWH5Z.mjs → chunk-QXV4PPZE.mjs} +2 -2
- package/out/__chunks__/chunk-R3XFYXKM.mjs +2 -0
- package/out/__chunks__/{chunk-4AGZHXFR.mjs → chunk-RKIJSY5U.mjs} +2 -2
- package/out/__chunks__/{chunk-ZP44CDGG.mjs → chunk-RPHY4POK.mjs} +2 -2
- package/out/__chunks__/{chunk-PWXUYZF5.mjs → chunk-TBV26EXY.mjs} +2 -2
- package/out/__chunks__/{chunk-QLEOO5UN.mjs → chunk-TF3E3RUT.mjs} +2 -2
- package/out/__chunks__/{chunk-IBM2AHR2.mjs → chunk-U4LAMKLU.mjs} +2 -2
- package/out/__chunks__/chunk-UKC2J7S5.mjs +2 -0
- package/out/__chunks__/{chunk-EEWLVNMR.mjs → chunk-USYO34PE.mjs} +2 -2
- package/out/__chunks__/{chunk-END5ZJQH.mjs → chunk-UZSATXTQ.mjs} +2 -2
- package/out/__chunks__/chunk-VFIT554C.mjs +2 -0
- package/out/__chunks__/{chunk-F4RI663J.mjs → chunk-WFSFMRX4.mjs} +2 -2
- package/out/__chunks__/{chunk-TURUYZA7.mjs → chunk-WIH2HALG.mjs} +2 -2
- package/out/__chunks__/{chunk-TSK44JFJ.mjs → chunk-WJEJIGZL.mjs} +2 -2
- package/out/__chunks__/chunk-WJMZWKHU.mjs +2 -0
- package/out/__chunks__/{chunk-6V76WUHS.mjs → chunk-WV7M6B7H.mjs} +2 -2
- package/out/__chunks__/{chunk-XHRRQNPV.mjs → chunk-XNFTD5SG.mjs} +2 -2
- package/out/__chunks__/{chunk-SZ3AWPZH.mjs → chunk-XOZA4RC2.mjs} +2 -2
- package/out/__chunks__/{chunk-2KPILBQ2.mjs → chunk-XSQDQMCL.mjs} +2 -2
- package/out/__chunks__/{chunk-MUMHVEIZ.mjs → chunk-YKKA4F3Z.mjs} +2 -2
- package/out/__chunks__/{chunk-KIQFGAFN.mjs → chunk-YWZJG5RG.mjs} +2 -2
- package/out/__chunks__/{chunk-YCSATFGK.mjs → chunk-Z3I5UBKJ.mjs} +2 -2
- package/out/__chunks__/chunk-ZN3MQVUF.mjs +2 -0
- package/out/__chunks__/chunk-ZN3MQVUF.mjs.map +7 -0
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.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/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.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/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.cjs +6 -2
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.cjs.map +2 -2
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.d.ts +2 -2
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.cjs +38 -26
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.cjs.map +2 -2
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.cjs +18 -9
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.cjs.map +2 -2
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.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/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.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/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/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/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.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/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +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/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/index.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.cjs +2 -1
- package/out/utils/account/refreshAccount.cjs.map +2 -2
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/visual/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +39 -10
- package/out/__chunks__/chunk-3JHE6RJX.mjs +0 -2
- package/out/__chunks__/chunk-3MJNBS6H.mjs +0 -2
- package/out/__chunks__/chunk-3MJNBS6H.mjs.map +0 -7
- package/out/__chunks__/chunk-AIKQPMR3.mjs +0 -2
- package/out/__chunks__/chunk-CUS6AHOH.mjs +0 -2
- package/out/__chunks__/chunk-J2SRCAF3.mjs +0 -2
- package/out/__chunks__/chunk-J2SRCAF3.mjs.map +0 -7
- package/out/__chunks__/chunk-J5EJIWY3.mjs +0 -2
- package/out/__chunks__/chunk-J5EJIWY3.mjs.map +0 -7
- package/out/__chunks__/chunk-JQDWP4DW.mjs +0 -2
- package/out/__chunks__/chunk-NJSC7RC2.mjs +0 -2
- package/out/__chunks__/chunk-OE5E647N.mjs +0 -2
- package/out/__chunks__/chunk-OFSHYRXC.mjs +0 -2
- package/out/__chunks__/chunk-PIBYPDMV.mjs +0 -2
- package/out/__chunks__/chunk-PIBYPDMV.mjs.map +0 -7
- package/out/__chunks__/chunk-RN2VZOXB.mjs +0 -2
- package/out/__chunks__/chunk-T3JST5WU.mjs +0 -2
- package/out/__chunks__/chunk-T3JST5WU.mjs.map +0 -7
- package/out/__chunks__/chunk-U6OAEGT3.mjs +0 -2
- package/out/__chunks__/chunk-UP7CK2EN.mjs +0 -1
- package/out/__chunks__/chunk-UP7CK2EN.mjs.map +0 -7
- package/out/__chunks__/chunk-WJTCBV34.mjs +0 -2
- package/out/__chunks__/chunk-XDYKH6G4.mjs +0 -2
- package/out/__chunks__/chunk-XFP6N66W.mjs +0 -2
- package/out/__chunks__/chunk-XIQFXEMO.mjs +0 -2
- package/out/__chunks__/chunk-YJFGRD5R.mjs +0 -2
- package/out/__chunks__/chunk-YJIAAC7S.mjs +0 -2
- package/out/__chunks__/chunk-ZQOG6A2Z.mjs +0 -2
- package/out/__chunks__/chunk-ZQOIMST2.mjs +0 -2
- package/out/__chunks__/chunk-ZQOIMST2.mjs.map +0 -7
- package/out/__mocks__/accountConfig.cjs +0 -37
- package/out/__mocks__/accountConfig.cjs.map +0 -7
- package/out/__mocks__/accountConfig.d.ts +0 -3
- package/out/__mocks__/accountConfig.mjs +0 -2
- package/out/__mocks__/accountConfig.mjs.map +0 -7
- package/out/__mocks__/data/account.cjs +0 -38
- package/out/__mocks__/data/account.cjs.map +0 -7
- package/out/__mocks__/data/account.d.ts +0 -10
- package/out/__mocks__/data/account.mjs +0 -2
- package/out/__mocks__/data/account.mjs.map +0 -7
- package/out/__mocks__/data/blocks.cjs +0 -34
- package/out/__mocks__/data/blocks.cjs.map +0 -7
- package/out/__mocks__/data/blocks.d.ts +0 -4
- package/out/__mocks__/data/blocks.mjs +0 -2
- package/out/__mocks__/data/blocks.mjs.map +0 -7
- package/out/__mocks__/data/dappConfig.cjs +0 -43
- package/out/__mocks__/data/dappConfig.cjs.map +0 -7
- package/out/__mocks__/data/dappConfig.d.ts +0 -15
- package/out/__mocks__/data/dappConfig.mjs +0 -2
- package/out/__mocks__/data/dappConfig.mjs.map +0 -7
- package/out/__mocks__/data/index.cjs +0 -35
- package/out/__mocks__/data/index.cjs.map +0 -7
- package/out/__mocks__/data/index.d.ts +0 -7
- package/out/__mocks__/data/index.mjs +0 -2
- package/out/__mocks__/data/index.mjs.map +0 -7
- package/out/__mocks__/data/networkConfig.cjs +0 -56
- package/out/__mocks__/data/networkConfig.cjs.map +0 -7
- package/out/__mocks__/data/networkConfig.d.ts +0 -28
- package/out/__mocks__/data/networkConfig.mjs +0 -2
- package/out/__mocks__/data/networkConfig.mjs.map +0 -7
- package/out/__mocks__/data/socketResponse.cjs +0 -35
- package/out/__mocks__/data/socketResponse.cjs.map +0 -7
- package/out/__mocks__/data/socketResponse.d.ts +0 -7
- package/out/__mocks__/data/socketResponse.mjs +0 -2
- package/out/__mocks__/data/socketResponse.mjs.map +0 -7
- package/out/__mocks__/data/websocketConfig.cjs +0 -29
- package/out/__mocks__/data/websocketConfig.cjs.map +0 -7
- package/out/__mocks__/data/websocketConfig.d.ts +0 -3
- package/out/__mocks__/data/websocketConfig.mjs +0 -2
- package/out/__mocks__/data/websocketConfig.mjs.map +0 -7
- package/out/__mocks__/data/wrapEgldContract.cjs +0 -54
- package/out/__mocks__/data/wrapEgldContract.cjs.map +0 -7
- package/out/__mocks__/data/wrapEgldContract.d.ts +0 -26
- package/out/__mocks__/data/wrapEgldContract.mjs +0 -2
- package/out/__mocks__/data/wrapEgldContract.mjs.map +0 -7
- package/out/__mocks__/index.cjs +0 -27
- package/out/__mocks__/index.cjs.map +0 -7
- package/out/__mocks__/index.d.ts +0 -3
- package/out/__mocks__/index.mjs +0 -2
- package/out/__mocks__/index.mjs.map +0 -7
- package/out/__mocks__/server.cjs +0 -65
- package/out/__mocks__/server.cjs.map +0 -7
- package/out/__mocks__/server.d.ts +0 -4
- package/out/__mocks__/server.mjs +0 -2
- package/out/__mocks__/server.mjs.map +0 -7
- package/out/__mocks__/utils/index.cjs +0 -25
- package/out/__mocks__/utils/index.cjs.map +0 -7
- package/out/__mocks__/utils/index.d.ts +0 -2
- package/out/__mocks__/utils/index.mjs +0 -2
- package/out/__mocks__/utils/index.mjs.map +0 -7
- package/out/__mocks__/utils/mockWindowHistory.cjs +0 -45
- package/out/__mocks__/utils/mockWindowHistory.cjs.map +0 -7
- package/out/__mocks__/utils/mockWindowHistory.d.ts +0 -1
- package/out/__mocks__/utils/mockWindowHistory.mjs +0 -2
- package/out/__mocks__/utils/mockWindowHistory.mjs.map +0 -7
- package/out/__mocks__/utils/mockWindowLocation.cjs +0 -45
- package/out/__mocks__/utils/mockWindowLocation.cjs.map +0 -7
- package/out/__mocks__/utils/mockWindowLocation.d.ts +0 -1
- package/out/__mocks__/utils/mockWindowLocation.mjs +0 -2
- package/out/__mocks__/utils/mockWindowLocation.mjs.map +0 -7
- package/out/controllers/FormatAmountController/tests/formatAmountController.test.d.ts +0 -1
- package/out/controllers/TransactionsTableController/tests/transactionsTableController.test.d.ts +0 -1
- package/out/managers/LogoutManager/helpers/tests/getHumanReadableTokenExpirationTime.test.d.ts +0 -1
- package/out/managers/TransactionManager/tests/getAreTransactionsOnCrossShards.test.d.ts +0 -1
- package/out/managers/TransactionManager/tests/getToastDuration.test.d.ts +0 -1
- package/out/managers/TransactionManager/tests/getTransactionsStatus.test.d.ts +0 -1
- package/out/managers/TransactionManager/tests/isCrossShardTransaction.test.d.ts +0 -1
- package/out/managers/internal/ToastManager/helpers/tests/createToastsFromTransactions.test.d.ts +0 -1
- package/out/managers/internal/ToastManager/helpers/tests/createTransactionToast.test.d.ts +0 -1
- package/out/managers/internal/ToastManager/helpers/tests/getToastDataStateByStatus.test.d.ts +0 -1
- package/out/managers/internal/ToastManager/helpers/tests/getToastTransactionsStatus.test.d.ts +0 -1
- package/out/managers/internal/ToastManager/tests/getToastProceededStatus.test.d.ts +0 -1
- package/out/methods/account/tests/getLatestNonce.test.d.ts +0 -1
- package/out/providers/DappProvider/helpers/login/helpers/tests/getModifiedLoginToken.test.d.ts +0 -1
- package/out/providers/DappProvider/helpers/signMessage/tests/verifyMessage.test.d.ts +0 -1
- package/out/providers/strategies/LedgerProviderStrategy/tests/getLedgerVersionOptions.test.d.ts +0 -1
- package/out/providers/strategies/LedgerProviderStrategy/tests/secondsToTimeString.test.d.ts +0 -1
- package/out/providers/strategies/WebviewProviderStrategy/tests/webview.test.d.ts +0 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/tests/decodeDataField.test.d.ts +0 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/tests/getGasPriceDetails.test.d.ts +0 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/tests/getCommonData.test.d.ts +0 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/tests/getMultiEsdtTransferData.test.d.ts +0 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/tests/calculateFeeInFiat.test.d.ts +0 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/tests/calculateFeeLimit.test.d.ts +0 -1
- package/out/services/nativeAuth/helpers/tests/decodeLoginToken.test.d.ts +0 -1
- package/out/services/nativeAuth/helpers/tests/decodeNativeAuthToken.test.d.ts +0 -1
- package/out/services/nativeAuth/methods/tests/getTokenExpiration.test.d.ts +0 -1
- package/out/services/nativeAuth/tests/nativeAuth.test.d.ts +0 -1
- package/out/utils/decoders/tests/base64Utils.test.d.ts +0 -1
- package/out/utils/decoders/tests/decodePart.test.d.ts +0 -1
- package/out/utils/decoders/tests/isAscii.test.d.ts +0 -1
- package/out/utils/decoders/tests/isUtf8.test.d.ts +0 -1
- package/out/utils/operations/tests/capitalize.test.d.ts +0 -1
- package/out/utils/operations/tests/getUsdValue.test.d.ts +0 -1
- package/out/utils/operations/tests/timeRemaining.test.d.ts +0 -1
- package/out/utils/tests/getElementByDataTestIdDeep.jest.d.ts +0 -9
- package/out/utils/tests/getElementByDataTestIdDeep.playwright.d.ts +0 -9
- package/out/utils/tests/getElementByDataTestIdDeep.puppeteer.d.ts +0 -9
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/tests/getTransactionTokens.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/base-transaction-mock.d.ts +0 -27
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/extended-transaction-mock.d.ts +0 -2
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getOperationsMessages.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getReceiptMessage.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getScResultsMessages.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getShardText.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getTokenFromData.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getTransactionIconInfo.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getTransactionMethod.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getTransactionReceiver.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getTransactionReceiverAssets.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getTransactionTokens.test.d.ts +0 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/tests/getTransactionTransferType.test.d.ts +0 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/tests/createTransactionsHistoryFromSessions.test.d.ts +0 -1
- package/out/utils/transactions/tests/getExplorerkLink.test.d.ts +0 -1
- package/out/utils/transactions/tests/getHumanReadableTimeFormat.test.d.ts +0 -1
- package/out/utils/validation/tests/addressIsValid.test.d.ts +0 -1
- package/out/utils/validation/tests/isContract.test.d.ts +0 -1
- package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.cjs +0 -36
- package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.cjs.map +0 -7
- package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.d.ts +0 -9
- package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.mjs +0 -2
- package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.mjs.map +0 -7
- package/out/utils/window/tests/buildUrlParams.test.d.ts +0 -1
- package/out/utils/window/tests/getIsAuthRoute.test.d.ts +0 -1
- package/out/utils/window/tests/getIsInIframe.test.d.ts +0 -1
- package/out/utils/window/tests/getWindowLocation.test.d.ts +0 -1
- package/out/utils/window/tests/getWindowParentOrigin.test.d.ts +0 -0
- package/out/utils/window/tests/sanitizeCallbackUrl.test.d.ts +0 -1
- /package/out/__chunks__/{chunk-PBMO4Y47.mjs.map → chunk-3GZLHBMS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZQOG6A2Z.mjs.map → chunk-4SJNM6SL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JNUF7URZ.mjs.map → chunk-5JYWEIVX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VX6FOSXG.mjs.map → chunk-5MTV6BYP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OE5E647N.mjs.map → chunk-6IP7LJSW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MZEDBAQE.mjs.map → chunk-6M6WCTHW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S2HQMNW6.mjs.map → chunk-72FLAB3J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XIQFXEMO.mjs.map → chunk-7AU7TZJF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZDCPV3O4.mjs.map → chunk-7DECU3EO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JW2RVDMU.mjs.map → chunk-7ZARUNA4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-463K27BJ.mjs.map → chunk-AN65FUBF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7HNMIUES.mjs.map → chunk-AN7WTTXJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C25AGRYE.mjs.map → chunk-APLLFKCG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZKAIQNIL.mjs.map → chunk-ARKNESS3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KJCSIEAC.mjs.map → chunk-BMB5EBCD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4N34K4EN.mjs.map → chunk-BN6QVD7B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y7BUJTYP.mjs.map → chunk-BZ7SOBES.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QGTHGE7E.mjs.map → chunk-C43JUIS3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-555CAG7Y.mjs.map → chunk-C6NQEN6N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GVTM4RFC.mjs.map → chunk-CDFO2GVK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VQ4GD4WE.mjs.map → chunk-CS5BSVSE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JQDWP4DW.mjs.map → chunk-D3KKYOYF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WJTCBV34.mjs.map → chunk-DGHPHAOS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JNJ4L4QD.mjs.map → chunk-FBE76A3W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LC3EPABR.mjs.map → chunk-G36BWGZR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3JHE6RJX.mjs.map → chunk-GE6T2B4E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BUHHNIJJ.mjs.map → chunk-GUD6RECQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YJIAAC7S.mjs.map → chunk-HBB7HL5B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UGUQSBY5.mjs.map → chunk-HD6OPS7Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WC4UR2ZF.mjs.map → chunk-HFN44NHN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XQUUCE53.mjs.map → chunk-HFYBB326.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SYNNW6IN.mjs.map → chunk-HLEGJP45.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AIKQPMR3.mjs.map → chunk-HO2Y34SD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NA5CDQ5C.mjs.map → chunk-IAQCHY3X.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U6OAEGT3.mjs.map → chunk-IJT27EFF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-W6P2TQ3N.mjs.map → chunk-IKCEIZK2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XJQ4VZS2.mjs.map → chunk-ISHHMEWX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZMLJXSO5.mjs.map → chunk-JFRQ37WV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XIDZCWKE.mjs.map → chunk-JKXED2JJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OFSHYRXC.mjs.map → chunk-KGFWVCB5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2KE2BNG7.mjs.map → chunk-L5G2CINO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A3CEGIRB.mjs.map → chunk-L6FN2IMQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TJYR4CV6.mjs.map → chunk-LBCZDKL3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CIB3ITZR.mjs.map → chunk-LNKBLVKB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WJXCNHT3.mjs.map → chunk-MBHXPTPF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XFP6N66W.mjs.map → chunk-MKUAKB6R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AYURCZHZ.mjs.map → chunk-MQE7EP66.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZEQI7SII.mjs.map → chunk-MVFIZ2UW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QEU6LCSD.mjs.map → chunk-MZZNZFMX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Q62OP5VI.mjs.map → chunk-NVA7A4D6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-76A63VDO.mjs.map → chunk-QG4OP5CW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4PILLRHM.mjs.map → chunk-QNGOARJQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H3DYNUJU.mjs.map → chunk-QRW74BOT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-T2BVHJVW.mjs.map → chunk-QUX36OME.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PETVWH5Z.mjs.map → chunk-QXV4PPZE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NJSC7RC2.mjs.map → chunk-R3XFYXKM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4AGZHXFR.mjs.map → chunk-RKIJSY5U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZP44CDGG.mjs.map → chunk-RPHY4POK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PWXUYZF5.mjs.map → chunk-TBV26EXY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QLEOO5UN.mjs.map → chunk-TF3E3RUT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IBM2AHR2.mjs.map → chunk-U4LAMKLU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RN2VZOXB.mjs.map → chunk-UKC2J7S5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EEWLVNMR.mjs.map → chunk-USYO34PE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-END5ZJQH.mjs.map → chunk-UZSATXTQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YJFGRD5R.mjs.map → chunk-VFIT554C.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F4RI663J.mjs.map → chunk-WFSFMRX4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TURUYZA7.mjs.map → chunk-WIH2HALG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TSK44JFJ.mjs.map → chunk-WJEJIGZL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CUS6AHOH.mjs.map → chunk-WJMZWKHU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6V76WUHS.mjs.map → chunk-WV7M6B7H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XHRRQNPV.mjs.map → chunk-XNFTD5SG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SZ3AWPZH.mjs.map → chunk-XOZA4RC2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2KPILBQ2.mjs.map → chunk-XSQDQMCL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MUMHVEIZ.mjs.map → chunk-YKKA4F3Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KIQFGAFN.mjs.map → chunk-YWZJG5RG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YCSATFGK.mjs.map → chunk-Z3I5UBKJ.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ or
|
|
|
50
50
|
```bash
|
|
51
51
|
yarn add @multiversx/sdk-dapp
|
|
52
52
|
```
|
|
53
|
+
|
|
53
54
|
> **Note:** Make sure you run your app on `https`, not `http`, otherwise some providers will not work.
|
|
54
55
|
|
|
55
56
|
If you're transitioning from `@multiversx/sdk-dapp@4.x`, you can check out the [Migration guide](https://github.com/multiversx/mx-template-dapp/blob/main/MIGRATION_GUIDE.md) and the [migration PR](https://github.com/multiversx/mx-template-dapp/pull/343) of Template Dapp
|
|
@@ -118,6 +119,7 @@ initApp(config).then(() => {
|
|
|
118
119
|
Once your dApp has loaded, the first user action is logging in with a chosen provider. There are two ways to perform a login: using the `UnlockPanelManager` and programmatic login using the `ProviderFactory`.
|
|
119
120
|
|
|
120
121
|
#### 2.1 Using the `UnlockPanelManager`
|
|
122
|
+
|
|
121
123
|
By using the provided UI, you get the benefit of having all supported providers ready for login in a side panel. You simply need to link the `unlockPanelManager.openUnlockPanel` to a user action.
|
|
122
124
|
|
|
123
125
|
```typescript
|
|
@@ -141,17 +143,18 @@ export const ConnectButton = () => {
|
|
|
141
143
|
};
|
|
142
144
|
|
|
143
145
|
```
|
|
146
|
+
|
|
144
147
|
Once the user has logged in, if `nativeAuth` is configured in the `initApp` method, an automatic logout will be performed upon native auth expiration. Before the actual logout is performed, the `LogoutManager` will show a warning toast to the user. This toast can be customized by passing a `tokenExpirationToastWarningSeconds` to the `nativeAuth` config.
|
|
145
148
|
|
|
146
149
|
```typescript
|
|
147
150
|
// in initApp config
|
|
148
151
|
const config: InitAppType = {
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
// ...
|
|
153
|
+
nativeAuth: {
|
|
151
154
|
expirySeconds: 30, // test auto logout after 30 seconds
|
|
152
155
|
tokenExpirationToastWarningSeconds: 10 // show warning toast 10 seconds before auto logout
|
|
153
|
-
|
|
154
|
-
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
155
158
|
```
|
|
156
159
|
|
|
157
160
|
You have the option to stop this behavior by calling `LogoutManager.getInstance().stop()` after the user has logged in.
|
|
@@ -162,11 +165,11 @@ import { LogoutManager } from '@multiversx/sdk-dapp/out/managers/LogoutManager/L
|
|
|
162
165
|
loginHandler: () => {
|
|
163
166
|
navigate('/dashboard');
|
|
164
167
|
// optional, to stop the automatic logout upon native auth expiration
|
|
165
|
-
LogoutManager.getInstance().stop();
|
|
168
|
+
LogoutManager.getInstance().stop();
|
|
166
169
|
},
|
|
167
170
|
```
|
|
168
171
|
|
|
169
|
-
If you want to perform some actions as soon as the user has logged in, you will need to call `ProviderFactory.create` inside a handler accepting arguments.
|
|
172
|
+
If you want to perform some actions as soon as the user has logged in, you will need to call `ProviderFactory.create` inside a handler accepting arguments.
|
|
170
173
|
|
|
171
174
|
```typescript
|
|
172
175
|
export const AdvancedConnectButton = () => {
|
|
@@ -189,6 +192,7 @@ export const AdvancedConnectButton = () => {
|
|
|
189
192
|
```
|
|
190
193
|
|
|
191
194
|
#### 2.2 Programatic login using the `ProviderFactory`
|
|
195
|
+
|
|
192
196
|
If you want to login using your custom UI, you can link user actions to specific providers by calling the `ProviderFactory`.
|
|
193
197
|
|
|
194
198
|
```typescript
|
|
@@ -308,7 +312,6 @@ Then, to send the transactions, you need to use the `TransactionManager` class a
|
|
|
308
312
|
import { TransactionManager } from '@multiversx/sdk-dapp/out/managers/TransactionManager';
|
|
309
313
|
import type { TransactionsDisplayInfoType } from '@multiversx/sdk-dapp/out/types/transactions.types';
|
|
310
314
|
|
|
311
|
-
|
|
312
315
|
const txManager = TransactionManager.getInstance();
|
|
313
316
|
|
|
314
317
|
const sentTransactions = await txManager.send(signedTransactions);
|
|
@@ -317,16 +320,16 @@ const toastInformation: TransactionsDisplayInfoType = {
|
|
|
317
320
|
processingMessage: 'Processing transactions',
|
|
318
321
|
errorMessage: 'An error has occurred during transaction execution',
|
|
319
322
|
successMessage: 'Transactions executed'
|
|
320
|
-
}
|
|
323
|
+
};
|
|
321
324
|
|
|
322
325
|
const sessionId = await txManager.track(sentTransactions, {
|
|
323
|
-
transactionsDisplayInfo: toastInformation
|
|
326
|
+
transactionsDisplayInfo: toastInformation
|
|
324
327
|
});
|
|
325
328
|
```
|
|
326
329
|
|
|
327
330
|
#### 4.3 Using the Notifications Feed
|
|
328
331
|
|
|
329
|
-
The Notifications Feed is a component that displays **session transactions** in a list. Internally it gets initialized in the `initApp` method. It can be accessed via the `NotificationManager.getInstance()` method.
|
|
332
|
+
The Notifications Feed is a component that displays **session transactions** in a list. Internally it gets initialized in the `initApp` method. It can be accessed via the `NotificationManager.getInstance()` method.
|
|
330
333
|
Once the user logs out of the dApp, all transactions displayed by the Notifications Feed are removed from the store. Note that you can switch between toast notifications and Notifications Feed by pressing the View All button above the current pending transaction toast in the UI.
|
|
331
334
|
|
|
332
335
|
```typescript
|
|
@@ -363,8 +366,7 @@ const store = getStore(); // or use useStore hook for reactivity
|
|
|
363
366
|
const pendingSessions = pendingTransactionsSessionsSelector(store.getState());
|
|
364
367
|
const allTransactionSessions = transactionsSliceSelector(store.getState());
|
|
365
368
|
|
|
366
|
-
const isSessionIdPending =
|
|
367
|
-
Object.keys(pendingSessions).includes(sessionId);
|
|
369
|
+
const isSessionIdPending = Object.keys(pendingSessions).includes(sessionId);
|
|
368
370
|
const currentSession = allTransactionSessions[sessionId];
|
|
369
371
|
const currentSessionStatus = currentSession?.status;
|
|
370
372
|
const currentTransaction = currentSession?.transactions?.[0];
|
|
@@ -372,6 +374,7 @@ const currentTransactionStatus = currentTransaction?.status;
|
|
|
372
374
|
```
|
|
373
375
|
|
|
374
376
|
#### 4.5 Logging out
|
|
377
|
+
|
|
375
378
|
The user journey ends with calling the `provider.logout()` method.
|
|
376
379
|
|
|
377
380
|
```typescript
|
|
@@ -396,7 +399,6 @@ We have seen in the previous chapter what are the minimal steps to get up and ru
|
|
|
396
399
|
Since these are mixtures of business logic and UI components, the library is split into several folders to make it easier to navigate.
|
|
397
400
|
When inspecting the package, there is more content under `src`, but the folders of interest are:
|
|
398
401
|
|
|
399
|
-
|
|
400
402
|
```bash
|
|
401
403
|
src/
|
|
402
404
|
├── apiCalls/ ### methods for interacting with the API
|
|
@@ -513,7 +515,7 @@ The transaction lifecycle consists of the following steps:
|
|
|
513
515
|
| 7 | `getSuccessfulTransactions()` | returns an array of successful transactions | `useGetSuccessfulTransactions()`|
|
|
514
516
|
|
|
515
517
|
5. **User feedback** is provided through toast notifications, which are triggered to inform about transactions' progress. Additional tracking details can be optionally displayed in the toast UI.
|
|
516
|
-
There is an option to add custom toast messages by using the `createCustomToast` helper.
|
|
518
|
+
There is an option to add custom toast messages by using the `createCustomToast` helper.
|
|
517
519
|
|
|
518
520
|
```ts
|
|
519
521
|
import { createRoot } from 'react-dom/client';
|
|
@@ -538,14 +540,19 @@ createCustomToast({
|
|
|
538
540
|
message: 'This is a custom toast',
|
|
539
541
|
title: 'My custom toast'
|
|
540
542
|
});
|
|
541
|
-
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
// closing a custom toast
|
|
546
|
+
const toastManager = ToastManager.getInstance();
|
|
547
|
+
toastManager.closeToast('custom-toast') // toastId
|
|
542
548
|
|
|
543
549
|
```
|
|
544
550
|
|
|
545
551
|
6. **Error Handling & Recovery** is done through a custom toast that prompts the user to take appropriate action.
|
|
546
552
|
|
|
547
553
|
#### Methods
|
|
548
|
-
|
|
554
|
+
|
|
555
|
+
---
|
|
549
556
|
|
|
550
557
|
#### 1. Sending Transactions
|
|
551
558
|
|
|
@@ -579,12 +586,14 @@ import { TransactionManagerTrackOptionsType } from '@multiversx/sdk-dapp/out/man
|
|
|
579
586
|
|
|
580
587
|
const options: TransactionManagerTrackOptionsType = {
|
|
581
588
|
disableToasts: false, // `false` by default
|
|
582
|
-
transactionsDisplayInfo: {
|
|
589
|
+
transactionsDisplayInfo: {
|
|
590
|
+
// `undefined` by default
|
|
583
591
|
errorMessage: 'Failed adding stake',
|
|
584
592
|
successMessage: 'Stake successfully added',
|
|
585
593
|
processingMessage: 'Staking in progress'
|
|
586
594
|
},
|
|
587
|
-
sessionInformation: {
|
|
595
|
+
sessionInformation: {
|
|
596
|
+
// `undefined` by default. Use to perform additional actions based on the session information
|
|
588
597
|
stakeAmount: '1000000000000000000000000'
|
|
589
598
|
}
|
|
590
599
|
};
|
|
@@ -670,22 +679,21 @@ The business logic for these components is served by a controller. The component
|
|
|
670
679
|
```tsx
|
|
671
680
|
import { TransactionsTableController } from '@multiversx/sdk-dapp/out/controllers/TransactionsTableController';
|
|
672
681
|
import { MvxTransactionsTable } from '@multiversx/sdk-dapp-ui/react';
|
|
673
|
-
|
|
674
|
-
const processedTransactions =
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
682
|
+
|
|
683
|
+
const processedTransactions =
|
|
684
|
+
await TransactionsTableController.processTransactions({
|
|
685
|
+
address,
|
|
686
|
+
egldLabel: network.egldLabel,
|
|
687
|
+
explorerAddress: network.explorerAddress,
|
|
688
|
+
transactions
|
|
689
|
+
});
|
|
680
690
|
|
|
681
691
|
// and use like this:
|
|
682
692
|
<MvxTransactionsTable transactions={processedTransaction} />;
|
|
683
|
-
|
|
684
693
|
```
|
|
685
694
|
|
|
686
695
|
- `MvxFormatAmount` - used to format the amount of the user's balance
|
|
687
696
|
|
|
688
|
-
|
|
689
697
|
```tsx
|
|
690
698
|
import { MvxFormatAmount } from '@multiversx/sdk-dapp-ui/react';
|
|
691
699
|
import { MvxFormatAmountPropsType } from '@multiversx/sdk-dapp-ui/types';
|
|
@@ -693,9 +701,7 @@ export { DECIMALS, DIGITS } from '@multiversx/sdk-dapp-utils/out/constants';
|
|
|
693
701
|
import { FormatAmountController } from '@multiversx/sdk-dapp/out/controllers/FormatAmountController';
|
|
694
702
|
export { useGetNetworkConfig } from '@multiversx/sdk-dapp/out/react/network/useGetNetworkConfig';
|
|
695
703
|
|
|
696
|
-
|
|
697
|
-
interface IFormatAmountProps
|
|
698
|
-
extends Partial<MvxFormatAmountPropsType> {
|
|
704
|
+
interface IFormatAmountProps extends Partial<MvxFormatAmountPropsType> {
|
|
699
705
|
value: string;
|
|
700
706
|
className?: string;
|
|
701
707
|
}
|
|
@@ -728,7 +734,6 @@ export const FormatAmount = (props: IFormatAmountProps) => {
|
|
|
728
734
|
};
|
|
729
735
|
```
|
|
730
736
|
|
|
731
|
-
|
|
732
737
|
#### 5.2 Internal components (advanced usage)
|
|
733
738
|
|
|
734
739
|
The way internal components are controlled is through a [pub-sub pattern](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern) called EventBus. Each webcomponent has a method of exposing its EventBus, thus allowing `sdk-dapp` to get a reference to it and use it for communication.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as p,q as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as p,q as e}from"./chunk-MQE7EP66.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),a=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).toHex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-3GZLHBMS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-RPHY4POK.mjs";import{d as m,e as l}from"./chunk-YKKA4F3Z.mjs";import{q as a}from"./chunk-MQE7EP66.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as y}from"socket.io-client";var A=3e3,g=3,w=500,E=1e3,f="batchUpdated",p="connect",N="connect_error",b="disconnect";async function M(i){let{apiAddress:k,websocketUrl:I}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,u(e)},d=e=>{o&&clearTimeout(o),o=setTimeout(()=>{m(e)},E)},C=e=>{n&&clearTimeout(n),n=setTimeout(()=>{l(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(b),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},S=async()=>{c("pending");let e=I??await T(k);if(!e){c("not_initialized");return}t.instance=y(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:g,reconnectionDelay:w,timeout:A,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(N,s=>{console.warn("Websocket connect error: ",s.message)}),t.instance.on(b,s=>{console.warn("Websocket disconnected: ",s),c("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await S(),{closeConnection:W}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5JYWEIVX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-BZ7SOBES.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5MTV6BYP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{q as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{q as u}from"./chunk-MQE7EP66.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-6M6WCTHW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-HO2Y34SD.mjs";import{s as e}from"./chunk-MQE7EP66.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-72FLAB3J.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-WJMZWKHU.mjs";import{a as m}from"./chunk-NZYB675D.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7DECU3EO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-DLWDO7M6.mjs";import{d as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-DLWDO7M6.mjs";import{d as p}from"./chunk-AN65FUBF.mjs";import{v as n}from"./chunk-ZN3MQVUF.mjs";import{s as m}from"./chunk-MQE7EP66.mjs";import{d as t}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-PLUWBWJ2.mjs";import{a as f}from"./chunk-WFSFMRX4.mjs";async function u(){let i=s(),o=f()||i?e.webview:t(m());if(!o)return;let r=await p.create({type:o});if(!r)throw new Error("Provider not found");(i||o===e.webview&&r.isInitialized())&&await r.login(),n(r)}export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7ZARUNA4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as se}from"./chunk-AQ6D3F5K.mjs";import{a as te}from"./chunk-2KPILBQ2.mjs";import{a as U}from"./chunk-VX6FOSXG.mjs";import{a as ie}from"./chunk-76A63VDO.mjs";import{a as re}from"./chunk-JNJ4L4QD.mjs";import{a as I}from"./chunk-WJTCBV34.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-XIDZCWKE.mjs";import{a as p}from"./chunk-GVTM4RFC.mjs";import{a as Z}from"./chunk-CIB3ITZR.mjs";import{a as ne}from"./chunk-QGTHGE7E.mjs";import{a as oe}from"./chunk-S2HQMNW6.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,r as M,s as P,t as L}from"./chunk-T3JST5WU.mjs";import{a as y}from"./chunk-WC4UR2ZF.mjs";import{a as q}from"./chunk-YJIAAC7S.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-PBMO4Y47.mjs";import{g as K}from"./chunk-2IUBMLF4.mjs";import{a as F,q as j,s as l}from"./chunk-AYURCZHZ.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!I())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var k=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!I())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=I(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new ae;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return se(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as se}from"./chunk-AQ6D3F5K.mjs";import{a as te}from"./chunk-XSQDQMCL.mjs";import{a as U}from"./chunk-5MTV6BYP.mjs";import{a as ie}from"./chunk-QG4OP5CW.mjs";import{a as re}from"./chunk-FBE76A3W.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-JKXED2JJ.mjs";import{a as p}from"./chunk-CDFO2GVK.mjs";import{a as Z}from"./chunk-LNKBLVKB.mjs";import{a as ne}from"./chunk-C43JUIS3.mjs";import{a as oe}from"./chunk-72FLAB3J.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as I,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,u as M,v as C,w as L}from"./chunk-ZN3MQVUF.mjs";import{a as y}from"./chunk-HFN44NHN.mjs";import{a as P}from"./chunk-DGHPHAOS.mjs";import{a as q}from"./chunk-HBB7HL5B.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-3GZLHBMS.mjs";import{g as K}from"./chunk-2IUBMLF4.mjs";import{a as F,q as j,s as l}from"./chunk-MQE7EP66.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!P())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var k=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[I.CANCEL_ACTION,I.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:I.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!P())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=P(),t=V(l());if(H(l())&&le.push(I.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new ae;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);C(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return se(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),C(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
|
|
2
|
+
//# sourceMappingURL=chunk-AN65FUBF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-WIH2HALG.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AN7WTTXJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-L3MWDI6J.mjs";import{q as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-L3MWDI6J.mjs";import{q as i}from"./chunk-MQE7EP66.mjs";var g=({transactions:s,transactionsDisplayInfo:a,status:e,sessionInformation:t})=>{let o=Date.now().toString();return i().setState(({transactions:n})=>{n[o]={transactions:s,status:e,transactionsDisplayInfo:a,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),o},T=({sessionId:s,status:a,errorMessage:e})=>{i().setState(({transactions:t})=>{t[s].status=a,t[s].errorMessage=e},!1,"updateTransactionsSession")},y=({sessionId:s,transaction:a})=>{let e=null;return i().setState(({transactions:t})=>{let o=t[s]?.transactions;if(o!=null){t[s].transactions=o.map(r=>r.hash===a.hash?{...r,...a??{}}:r);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},h=()=>{i().setState(({transactions:s,toasts:a})=>{let t=Object.keys(s).filter(n=>{let r=s[n];if(!r)return!1;let{status:c}=r;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let o=a.transactionToasts.filter(n=>!t.includes(n.toastId));a.transactionToasts=o},!1,"clearCompletedTransactions")};export{g as a,T as b,y as c,h as d};
|
|
2
|
+
//# sourceMappingURL=chunk-APLLFKCG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-MBHXPTPF.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ARKNESS3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-ICF2MAYU.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BMB5EBCD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-MQE7EP66.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BN6QVD7B.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-USYO34PE.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-BZ7SOBES.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as B}from"./chunk-4SJNM6SL.mjs";import{a as b}from"./chunk-L5G2CINO.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-MZZNZFMX.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as _}from"./chunk-72FLAB3J.mjs";import{a as R}from"./chunk-YY724VZR.mjs";import{a as j}from"./chunk-URJQWHBM.mjs";import{a as A}from"./chunk-LBCZDKL3.mjs";import{a as O}from"./chunk-R3XFYXKM.mjs";import{s as x}from"./chunk-MQE7EP66.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=B(),g=v(x()),C=O(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=A.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await k({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-C43JUIS3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-ICF2MAYU.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
|
|
2
|
+
//# sourceMappingURL=chunk-C6NQEN6N.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-LNKBLVKB.mjs";import{a as e}from"./chunk-HBB7HL5B.mjs";import{a as i}from"./chunk-CDQ2BNUD.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-CDFO2GVK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-MQE7EP66.mjs";import{a as n}from"./chunk-UERJ6AKK.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CS5BSVSE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-FRDR4A7Z.mjs";import{w as g}from"./chunk-ZN3MQVUF.mjs";import{a as c}from"./chunk-DGHPHAOS.mjs";import{s as n}from"./chunk-MQE7EP66.mjs";import{g as a}from"./chunk-UERJ6AKK.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=c(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=g(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FBE76A3W.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-QNGOARJQ.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-UNBTFF6K.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-7CELSV4S.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-G36BWGZR.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as s}from"./chunk-PLTUKRYU.mjs";import{a as r}from"./chunk-VDMJZZU4.mjs";import{j as n}from"./chunk-65L5EBBL.mjs";var l=({toastId:a,address:o,status:e,transactions:t,transactionsDisplayInfo:i,startTime:c,endTime:T})=>{let m=t.some(f=>n(f.status)),u=t[0]?.action?.name,p=s({address:o,sender:t[0]?.interactor??"",toastId:a,status:e,transactionsDisplayInfo:i,txActionName:u}),S=r(t);return{toastDataState:p,processedTransactionsStatus:S,transactionProgressState:m?{endTime:T,startTime:c}:null,toastId:a,transactions:t}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GDKW3NI7.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/internal/ToastManager/helpers/createTransactionToast.ts"],
|
|
4
|
+
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { getIsTransactionPending } from 'store/actions/transactions/transactionStateByStatus';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\nimport { getToastDataStateByStatus } from './getToastDataStateByStatus';\nimport { getToastTransactionsStatus } from './getToastTransactionsStatus';\nimport { ITransactionToast } from '../types/toast.types';\ninterface CreateTransactionToastParamsType {\n toastId: string;\n address: string;\n status: TransactionServerStatusesEnum | TransactionBatchStatusesEnum;\n transactions: ITransactionListItem[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n explorerAddress: string;\n startTime: number;\n endTime: number;\n}\n\nexport const createTransactionToast = ({\n toastId,\n address,\n status,\n transactions,\n transactionsDisplayInfo,\n startTime,\n endTime\n}: CreateTransactionToastParamsType): ITransactionToast => {\n const hasPendingTransaction = transactions.some((tx) =>\n getIsTransactionPending(\n tx.status as TransactionServerStatusesEnum | TransactionBatchStatusesEnum\n )\n );\n // Extracts action name from the first transaction\n const txActionName = transactions[0]?.action?.name;\n\n const toastDataState = getToastDataStateByStatus({\n address,\n sender: transactions[0]?.interactor ?? '',\n toastId,\n status,\n transactionsDisplayInfo,\n txActionName\n });\n\n const processedTransactionsStatus = getToastTransactionsStatus(transactions);\n\n const transactionProgressState = hasPendingTransaction\n ? {\n endTime,\n startTime\n }\n : null;\n\n return {\n toastDataState,\n processedTransactionsStatus,\n transactionProgressState,\n toastId,\n transactions\n };\n};\n"],
|
|
5
|
+
"mappings": "2HAqBO,IAAMA,EAAyB,CAAC,CACrC,QAAAC,EACA,QAAAC,EACA,OAAAC,EACA,aAAAC,EACA,wBAAAC,EACA,UAAAC,EACA,QAAAC,CACF,IAA2D,CACzD,IAAMC,EAAwBJ,EAAa,KAAMK,GAC/CC,EACED,EAAG,MACL,CACF,EAEME,EAAeP,EAAa,CAAC,GAAG,QAAQ,KAExCQ,EAAiBC,EAA0B,CAC/C,QAAAX,EACA,OAAQE,EAAa,CAAC,GAAG,YAAc,GACvC,QAAAH,EACA,OAAAE,EACA,wBAAAE,EACA,aAAAM,CACF,CAAC,EAEKG,EAA8BC,EAA2BX,CAAY,EAS3E,MAAO,CACL,eAAAQ,EACA,4BAAAE,EACA,yBAV+BN,EAC7B,CACE,QAAAD,EACA,UAAAD,CACF,EACA,KAMF,QAAAL,EACA,aAAAG,CACF,CACF",
|
|
6
|
+
"names": ["createTransactionToast", "toastId", "address", "status", "transactions", "transactionsDisplayInfo", "startTime", "endTime", "hasPendingTransaction", "tx", "getIsTransactionPending", "txActionName", "toastDataState", "getToastDataStateByStatus", "processedTransactionsStatus", "getToastTransactionsStatus"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-HO2Y34SD.mjs";import{a as f}from"./chunk-HD6OPS7Q.mjs";import{a as g}from"./chunk-WV7M6B7H.mjs";import{b as a}from"./chunk-MQE7EP66.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GUD6RECQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-U4LAMKLU.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HD6OPS7Q.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-BZ7SOBES.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HFN44NHN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-WIH2HALG.mjs";import{a as p}from"./chunk-IAQCHY3X.mjs";import{a as d}from"./chunk-GE6T2B4E.mjs";import{a as T}from"./chunk-3L7HZ2SO.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await h(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=T({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&p({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HFYBB326.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-NVA7A4D6.mjs";import{a}from"./chunk-HBB7HL5B.mjs";import{a as u}from"./chunk-3GZLHBMS.mjs";import{c as n}from"./chunk-ISHHMEWX.mjs";import{a as s}from"./chunk-ICF2MAYU.mjs";var c=(o,t)=>{let r=`sdk-dapp-logout-event-${o}`,e=t.getItem(r);e&&o!==e||(t.setItem(r,o),t.removeItem(r))};async function L({provider:o,options:t={shouldBroadcastLogoutAcrossTabs:!0}}){let r=a();t.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(r,s.localStorage);try{return u(),n.forEach(g=>g()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HLEGJP45.mjs.map
|