@multiversx/sdk-dapp 5.3.0 → 5.3.2
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 +2 -0
- package/out/__chunks__/chunk-2JKCBTYK.mjs +2 -0
- package/out/__chunks__/{chunk-KD2IQ32V.mjs.map → chunk-2JKCBTYK.mjs.map} +3 -3
- package/out/__chunks__/chunk-2KGBHCEN.mjs +2 -0
- package/out/__chunks__/chunk-2KGBHCEN.mjs.map +7 -0
- package/out/__chunks__/chunk-2RTOYKHB.mjs +2 -0
- package/out/__chunks__/{chunk-F33ERG33.mjs → chunk-3CG4C7T4.mjs} +2 -2
- package/out/__chunks__/{chunk-IE3A2COQ.mjs → chunk-3IYTFWEN.mjs} +2 -2
- package/out/__chunks__/chunk-3S3EXLLM.mjs +2 -0
- package/out/__chunks__/chunk-4GCIE2BM.mjs +2 -0
- package/out/__chunks__/chunk-4MCQ27VQ.mjs +2 -0
- package/out/__chunks__/chunk-4MCQ27VQ.mjs.map +7 -0
- package/out/__chunks__/{chunk-W6M5WJ3V.mjs → chunk-4QDHKULK.mjs} +2 -2
- package/out/__chunks__/{chunk-RUE5QYSG.mjs → chunk-55U3WK3C.mjs} +2 -2
- package/out/__chunks__/chunk-573JTRNC.mjs +2 -0
- package/out/__chunks__/{chunk-YPV63DYG.mjs → chunk-5AGKFSA6.mjs} +2 -2
- package/out/__chunks__/chunk-5AGKFSA6.mjs.map +7 -0
- package/out/__chunks__/chunk-5HEWN34K.mjs +2 -0
- package/out/__chunks__/chunk-5HEWN34K.mjs.map +7 -0
- package/out/__chunks__/{chunk-MBNRIXNQ.mjs → chunk-5KYXNO4J.mjs} +2 -2
- package/out/__chunks__/{chunk-MH3RDOC5.mjs → chunk-5W7PFHTT.mjs} +2 -2
- package/out/__chunks__/{chunk-MH3RDOC5.mjs.map → chunk-5W7PFHTT.mjs.map} +1 -1
- package/out/__chunks__/chunk-6BOC75BF.mjs +2 -0
- package/out/__chunks__/{chunk-AQNUGUG3.mjs → chunk-6CLCXSHA.mjs} +2 -2
- package/out/__chunks__/chunk-6CQMLD25.mjs +1 -0
- package/out/__chunks__/{chunk-OEXP5D2Q.mjs → chunk-6EKK7AJE.mjs} +2 -2
- package/out/__chunks__/{chunk-5KCP7UJT.mjs → chunk-6F4OKEUQ.mjs} +2 -2
- package/out/__chunks__/{chunk-UERJ6AKK.mjs → chunk-7MBSWJUD.mjs} +2 -2
- package/out/__chunks__/chunk-7PE652LB.mjs +2 -0
- package/out/__chunks__/chunk-7PE652LB.mjs.map +7 -0
- package/out/__chunks__/{chunk-ZGMF4QYV.mjs → chunk-7WJMUTGI.mjs} +2 -2
- package/out/__chunks__/chunk-AFLCI6IF.mjs +2 -0
- package/out/__chunks__/chunk-AGJVEK6I.mjs +2 -0
- package/out/__chunks__/{chunk-QDX2JCQH.mjs → chunk-ATLICLWT.mjs} +2 -2
- package/out/__chunks__/{chunk-WXC5EE2F.mjs → chunk-AZA2GNTR.mjs} +2 -2
- package/out/__chunks__/chunk-AZA2GNTR.mjs.map +7 -0
- package/out/__chunks__/{chunk-6UIF2KFV.mjs → chunk-BCSNXRMR.mjs} +1 -1
- package/out/__chunks__/{chunk-6UIF2KFV.mjs.map → chunk-BCSNXRMR.mjs.map} +1 -1
- package/out/__chunks__/{chunk-MODSKR2X.mjs → chunk-BUJNOQZJ.mjs} +2 -2
- package/out/__chunks__/chunk-C4SERLP4.mjs +1 -0
- package/out/__chunks__/{chunk-6MNQSWGO.mjs → chunk-C72ZHRFA.mjs} +2 -2
- package/out/__chunks__/{chunk-6MNQSWGO.mjs.map → chunk-C72ZHRFA.mjs.map} +2 -2
- package/out/__chunks__/chunk-CUDPQDXY.mjs +1 -0
- package/out/__chunks__/{chunk-C2FLFZOO.mjs → chunk-CVXQYCEE.mjs} +2 -2
- package/out/__chunks__/{chunk-ONSO75O2.mjs → chunk-CXAX5TAG.mjs} +2 -2
- package/out/__chunks__/chunk-CZ2S4XSL.mjs +2 -0
- package/out/__chunks__/{chunk-KQV57RV3.mjs → chunk-D3VRMBRS.mjs} +2 -2
- package/out/__chunks__/{chunk-G5MRPRWI.mjs → chunk-DW6RO5LJ.mjs} +2 -2
- package/out/__chunks__/{chunk-XG6DEDBU.mjs → chunk-E77ZH5JT.mjs} +2 -2
- package/out/__chunks__/{chunk-OFVUWY2K.mjs → chunk-EKWN4V73.mjs} +2 -2
- package/out/__chunks__/chunk-EPL2CHU6.mjs +2 -0
- package/out/__chunks__/{chunk-WWYX7L4I.mjs → chunk-FF45FPD3.mjs} +2 -2
- package/out/__chunks__/{chunk-STBF3KTB.mjs → chunk-FNHO66WN.mjs} +2 -2
- package/out/__chunks__/chunk-FRUJEORM.mjs +2 -0
- package/out/__chunks__/{chunk-5OMQOYP7.mjs → chunk-G5N56FHJ.mjs} +2 -2
- package/out/__chunks__/chunk-GBEJIZDR.mjs +1 -0
- package/out/__chunks__/chunk-GEB2W7CV.mjs +1 -0
- package/out/__chunks__/chunk-H73D4VUZ.mjs +2 -0
- package/out/__chunks__/{chunk-AAQCK4UU.mjs → chunk-HBPQEY3L.mjs} +2 -2
- package/out/__chunks__/{chunk-2XGXXRSH.mjs → chunk-HFX5WAAI.mjs} +2 -2
- package/out/__chunks__/chunk-HKDRMMI5.mjs +2 -0
- package/out/__chunks__/{chunk-MCXQTDAK.mjs → chunk-HUXPA4C2.mjs} +2 -2
- package/out/__chunks__/chunk-HYH55J3D.mjs +2 -0
- package/out/__chunks__/{chunk-WBF6D374.mjs → chunk-I424CDNL.mjs} +2 -2
- package/out/__chunks__/{chunk-WZGG2YKQ.mjs → chunk-IVHD32VC.mjs} +2 -2
- package/out/__chunks__/{chunk-YK7T6MBD.mjs → chunk-IWP36NOU.mjs} +2 -2
- package/out/__chunks__/{chunk-4POCTP6S.mjs → chunk-IYM4ZX72.mjs} +2 -2
- package/out/__chunks__/{chunk-MQJQMAW3.mjs → chunk-J5TLE6SA.mjs} +2 -2
- package/out/__chunks__/{chunk-ITZJPUDG.mjs → chunk-JDP24JPD.mjs} +2 -2
- package/out/__chunks__/{chunk-5JQ3V6QZ.mjs → chunk-JPSW3MCK.mjs} +2 -2
- package/out/__chunks__/{chunk-B6VRKK6A.mjs → chunk-JZ22ZC2D.mjs} +2 -2
- package/out/__chunks__/{chunk-AWQZ56BT.mjs → chunk-K4JJZCL3.mjs} +2 -2
- package/out/__chunks__/chunk-K5K2FVFB.mjs +2 -0
- package/out/__chunks__/{chunk-OA5BWGGO.mjs → chunk-KDTDQL52.mjs} +1 -1
- package/out/__chunks__/{chunk-OA5BWGGO.mjs.map → chunk-KDTDQL52.mjs.map} +1 -1
- package/out/__chunks__/{chunk-CUQBPPWE.mjs → chunk-KIMRQMXB.mjs} +2 -2
- package/out/__chunks__/{chunk-PGAJUAPG.mjs → chunk-KLI6N26E.mjs} +2 -2
- package/out/__chunks__/{chunk-PGAJUAPG.mjs.map → chunk-KLI6N26E.mjs.map} +1 -1
- package/out/__chunks__/chunk-L3EOHIBG.mjs +2 -0
- package/out/__chunks__/chunk-L3EOHIBG.mjs.map +7 -0
- package/out/__chunks__/chunk-LBPTOWPX.mjs +2 -0
- package/out/__chunks__/chunk-LBPTOWPX.mjs.map +7 -0
- package/out/__chunks__/chunk-LG6Q3PRI.mjs +2 -0
- package/out/__chunks__/chunk-LG6Q3PRI.mjs.map +7 -0
- package/out/__chunks__/{chunk-KMJMQEXI.mjs → chunk-LGGG3HW7.mjs} +2 -2
- package/out/__chunks__/{chunk-OILJUNFX.mjs → chunk-LKOWOTL2.mjs} +2 -2
- package/out/__chunks__/{chunk-YLD26I5H.mjs → chunk-LYSI4URP.mjs} +2 -2
- package/out/__chunks__/chunk-M7B26JXO.mjs +2 -0
- package/out/__chunks__/chunk-M7B26JXO.mjs.map +7 -0
- package/out/__chunks__/{chunk-2JTLNZM3.mjs → chunk-MLDUGECH.mjs} +2 -2
- package/out/__chunks__/{chunk-7ZIJXDPY.mjs → chunk-MS7BFY27.mjs} +2 -2
- package/out/__chunks__/{chunk-SKBL5PDX.mjs → chunk-N4KX33RW.mjs} +2 -2
- package/out/__chunks__/chunk-N56SMVGU.mjs +2 -0
- package/out/__chunks__/chunk-N56SMVGU.mjs.map +7 -0
- package/out/__chunks__/{chunk-U24DHQDI.mjs → chunk-N5VJJRWV.mjs} +2 -2
- package/out/__chunks__/{chunk-BT2J2GH4.mjs → chunk-NAYC2B72.mjs} +2 -2
- package/out/__chunks__/{chunk-H24QGHAH.mjs → chunk-NAYDJEWI.mjs} +2 -2
- package/out/__chunks__/{chunk-PBXNAY2B.mjs → chunk-NVBWPLR7.mjs} +2 -2
- package/out/__chunks__/{chunk-JBZR35CW.mjs → chunk-O65OBG5D.mjs} +2 -2
- package/out/__chunks__/{chunk-SR7TVATV.mjs → chunk-O6ALDFLM.mjs} +2 -2
- package/out/__chunks__/{chunk-3S57OP4Z.mjs → chunk-OAPLU7UX.mjs} +2 -2
- package/out/__chunks__/chunk-ODHXJQOF.mjs +2 -0
- package/out/__chunks__/{chunk-PQVNWTWJ.mjs → chunk-OIRXFS5Q.mjs} +2 -2
- package/out/__chunks__/chunk-OIRXFS5Q.mjs.map +7 -0
- package/out/__chunks__/{chunk-BENZKRAG.mjs → chunk-OSG4UY2Z.mjs} +2 -2
- package/out/__chunks__/chunk-P2MHA65O.mjs +2 -0
- package/out/__chunks__/chunk-PKLBZG2R.mjs +2 -0
- package/out/__chunks__/chunk-PW34EFS7.mjs +2 -0
- package/out/__chunks__/chunk-PW34EFS7.mjs.map +7 -0
- package/out/__chunks__/{chunk-IS3TZ43F.mjs → chunk-QJJEW7MB.mjs} +2 -2
- package/out/__chunks__/{chunk-DBIIY2TX.mjs → chunk-QNELH2S2.mjs} +2 -2
- package/out/__chunks__/{chunk-7MOSAB64.mjs → chunk-QO62QJ5H.mjs} +2 -2
- package/out/__chunks__/{chunk-3KFEBW7N.mjs → chunk-RV6SJMD7.mjs} +2 -2
- package/out/__chunks__/{chunk-GNHD56P3.mjs → chunk-SALLGAGD.mjs} +2 -2
- package/out/__chunks__/chunk-SAN5F2PW.mjs +2 -0
- package/out/__chunks__/chunk-SNPF3BD2.mjs +2 -0
- package/out/__chunks__/chunk-SNPF3BD2.mjs.map +7 -0
- package/out/__chunks__/{chunk-QHXZ354C.mjs → chunk-TFARIEZF.mjs} +2 -2
- package/out/__chunks__/{chunk-W4QMH63P.mjs → chunk-TMRKN7VL.mjs} +2 -2
- package/out/__chunks__/chunk-TOZ7EGCZ.mjs +2 -0
- package/out/__chunks__/chunk-TOZ7EGCZ.mjs.map +7 -0
- package/out/__chunks__/chunk-TQ7T6ULY.mjs +2 -0
- package/out/__chunks__/chunk-TQ7T6ULY.mjs.map +7 -0
- package/out/__chunks__/{chunk-BJOEWWLZ.mjs → chunk-TR2KNDCH.mjs} +2 -2
- package/out/__chunks__/chunk-TVXZBSUY.mjs +2 -0
- package/out/__chunks__/chunk-U6RAWQXO.mjs +1 -0
- package/out/__chunks__/{chunk-22ELCCFJ.mjs → chunk-UCFMVEOZ.mjs} +2 -2
- package/out/__chunks__/chunk-UPABDY55.mjs +2 -0
- package/out/__chunks__/chunk-UPABDY55.mjs.map +7 -0
- package/out/__chunks__/chunk-URTM5OGN.mjs +2 -0
- package/out/__chunks__/{chunk-7EWMP5BY.mjs.map → chunk-URTM5OGN.mjs.map} +1 -1
- package/out/__chunks__/{chunk-QXC4D3AC.mjs → chunk-UT4BWFQH.mjs} +2 -2
- package/out/__chunks__/{chunk-TZTP57OK.mjs → chunk-UY22M7WB.mjs} +2 -2
- package/out/__chunks__/{chunk-J62UCITY.mjs → chunk-VGGJESXR.mjs} +2 -2
- package/out/__chunks__/chunk-VIQAOU2F.mjs +2 -0
- package/out/__chunks__/chunk-VIQAOU2F.mjs.map +7 -0
- package/out/__chunks__/chunk-VTEOS2MM.mjs +2 -0
- package/out/__chunks__/{chunk-J76GINM5.mjs → chunk-WEZV6U4A.mjs} +2 -2
- package/out/__chunks__/{chunk-MRIKSX32.mjs → chunk-WYVAFCPU.mjs} +2 -2
- package/out/__chunks__/chunk-XLLBREX7.mjs +2 -0
- package/out/__chunks__/{chunk-EGO5R7IZ.mjs → chunk-XNSSZDSU.mjs} +2 -2
- package/out/__chunks__/chunk-XSUHHPZ2.mjs +2 -0
- package/out/__chunks__/{chunk-P6HDK262.mjs → chunk-XTATC65P.mjs} +2 -2
- package/out/__chunks__/{chunk-VGO3VD5N.mjs → chunk-XV3H7VOE.mjs} +2 -2
- package/out/__chunks__/{chunk-TKTDGTN7.mjs → chunk-XXSANEEO.mjs} +2 -2
- package/out/__chunks__/{chunk-UCI2LZF5.mjs → chunk-YGMILCHH.mjs} +2 -2
- package/out/__chunks__/chunk-YGMILCHH.mjs.map +7 -0
- package/out/__chunks__/{chunk-FRDR4A7Z.mjs → chunk-YYH2GKPL.mjs} +1 -1
- package/out/__chunks__/{chunk-FRDR4A7Z.mjs.map → chunk-YYH2GKPL.mjs.map} +1 -1
- package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.cjs +1 -1
- package/out/apiCalls/account/getScamAddressData.cjs.map +3 -3
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.cjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.cjs.map +3 -3
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/configuration/getNetworkConfigFromApi.mjs +1 -1
- package/out/apiCalls/configuration/getServerConfiguration.mjs +1 -1
- package/out/apiCalls/economics/getEconomics.mjs +1 -1
- package/out/apiCalls/endpoints.cjs +1 -1
- package/out/apiCalls/endpoints.cjs.map +3 -3
- package/out/apiCalls/endpoints.d.ts +1 -0
- package/out/apiCalls/endpoints.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedToken.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs.map +4 -4
- package/out/apiCalls/tokens/tokenDataStorage.cjs +1 -1
- package/out/apiCalls/tokens/tokenDataStorage.cjs.map +3 -3
- package/out/apiCalls/tokens/tokenDataStorage.d.ts +1 -3
- package/out/apiCalls/tokens/tokenDataStorage.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactions.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/utils/axiosFetcher.mjs +1 -1
- package/out/apiCalls/utils/axiosFetcher.mjs.map +4 -4
- package/out/apiCalls/utils/axiosInstance.cjs +1 -1
- package/out/apiCalls/utils/axiosInstance.cjs.map +3 -3
- package/out/apiCalls/utils/axiosInstance.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.cjs +1 -1
- package/out/index.cjs.map +2 -2
- package/out/index.d.ts +0 -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/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
- package/out/managers/ToastManager/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/helpers/getTransactionsStatus.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/UIBaseManager/UIBaseManager.cjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.cjs.map +3 -3
- package/out/managers/internal/UIBaseManager/UIBaseManager.d.ts +3 -0
- 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/getAccountInfo.mjs.map +4 -4
- 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 → gasStationMetadata}/setGasStationMetadata.cjs.map +1 -1
- package/out/methods/initApp/{gastStationMetadata → gasStationMetadata}/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/helpers/waitForStoreRehydration.cjs +2 -0
- package/out/methods/initApp/helpers/waitForStoreRehydration.cjs.map +7 -0
- package/out/methods/initApp/helpers/waitForStoreRehydration.d.ts +6 -0
- package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +2 -0
- package/out/methods/initApp/initApp.cjs +1 -1
- package/out/methods/initApp/initApp.cjs.map +3 -3
- package/out/methods/initApp/initApp.d.ts +5 -0
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +3 -3
- package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs.map +3 -3
- 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/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.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.cjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.cjs.map +2 -2
- 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/helpers/getMultisigLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.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/authenticateLedgerAccount.cjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.cjs.map +7 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{authenticateLedgerAccount.d.ts → authenticateLedgerAccount/authenticateLedgerAccount.d.ts} +1 -3
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{getAuthTokenText.cjs → authenticateLedgerAccount/helpers/getAuthTokenText.cjs} +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{getAuthTokenText.cjs.map → authenticateLedgerAccount/helpers/getAuthTokenText.cjs.map} +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/getAuthTokenText.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/getLedgerVersionOptions.cjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerVersionOptions.cjs.map → authenticateLedgerAccount/helpers/getLedgerVersionOptions.cjs.map} +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/getLedgerVersionOptions.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{secondsToTimeString.cjs.map → authenticateLedgerAccount/helpers/secondsToTimeString.cjs.map} +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/secondsToTimeString.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/index.cjs.map +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.cjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.cjs.map +7 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.types.cjs.map +7 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.types.d.ts +2 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.cjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.cjs.map +7 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.d.ts +19 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +2 -0
- package/out/{apiCalls/configuration → providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount}/index.cjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.cjs.map +7 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.d.ts +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.cjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.cjs.map +7 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerProvider.d.ts → getLedgerProvider/getLedgerProvider.d.ts} +2 -4
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerConfiguration.cjs → getLedgerProvider/helpers/getLedgerConfiguration.cjs} +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerConfiguration.cjs.map → getLedgerProvider/helpers/getLedgerConfiguration.cjs.map} +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/getLedgerConfiguration.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.cjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.cjs.map +7 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.d.ts +12 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.mjs +2 -0
- package/out/{apiCalls/account → providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider}/index.cjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.cjs.map +7 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.d.ts +1 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +2 -0
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.cjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.cjs.map +2 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.d.ts +3 -4
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.cjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.cjs.map +2 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.d.ts +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/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.cjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.cjs.map +3 -3
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.cjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.cjs.map +3 -3
- 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.cjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs.map +3 -3
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/tests/mocks.d.ts +16 -0
- 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/helpers/getLatestBlockHash.mjs +1 -1
- package/out/services/nativeAuth/helpers/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/selectors/accountSelectors.mjs +1 -1
- package/out/store/selectors/index.mjs +1 -1
- package/out/store/slices/account/accountSlice.mjs +1 -1
- package/out/store/slices/account/emptyAccount.mjs +1 -1
- package/out/store/slices/account/index.mjs +1 -1
- package/out/store/slices/index.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/types/index.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/fetchAccount.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/dateTime/index.mjs +1 -1
- package/out/utils/index.cjs +1 -1
- package/out/utils/index.cjs.map +2 -2
- package/out/utils/index.d.ts +0 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/explorerUrlBuilder.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.cjs.map +2 -2
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs.map +4 -4
- package/out/utils/transactions/getDecodedDataField/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTitleText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTransactionActionNftText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.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/getTransactionAction.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.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/helpers/mapTransactionToListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.cjs +1 -1
- package/out/utils/transactions/index.cjs.map +2 -2
- package/out/utils/transactions/index.d.ts +0 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/validation/index.mjs +1 -1
- package/out/utils/validation/isContract.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 +4 -3
- package/out/__chunks__/chunk-33MSDZAP.mjs +0 -2
- package/out/__chunks__/chunk-4BOXOL6P.mjs +0 -2
- package/out/__chunks__/chunk-4BOXOL6P.mjs.map +0 -7
- package/out/__chunks__/chunk-4YLN3MHG.mjs +0 -2
- package/out/__chunks__/chunk-4YLN3MHG.mjs.map +0 -7
- package/out/__chunks__/chunk-6ET5BDZH.mjs +0 -1
- package/out/__chunks__/chunk-6SC2DWV6.mjs +0 -2
- package/out/__chunks__/chunk-6WUHHOG2.mjs +0 -2
- package/out/__chunks__/chunk-7EWMP5BY.mjs +0 -2
- package/out/__chunks__/chunk-ABNK74B7.mjs +0 -2
- package/out/__chunks__/chunk-ABNK74B7.mjs.map +0 -7
- package/out/__chunks__/chunk-AGO2Z4FM.mjs +0 -2
- package/out/__chunks__/chunk-AGO2Z4FM.mjs.map +0 -7
- package/out/__chunks__/chunk-AVXL7ZQK.mjs +0 -2
- package/out/__chunks__/chunk-B2RHOOA6.mjs +0 -2
- package/out/__chunks__/chunk-BSFYNH6O.mjs +0 -2
- package/out/__chunks__/chunk-C4TBDJVT.mjs +0 -2
- package/out/__chunks__/chunk-C4TBDJVT.mjs.map +0 -7
- package/out/__chunks__/chunk-CJTGYQ5L.mjs +0 -2
- package/out/__chunks__/chunk-D2ULWBRR.mjs +0 -2
- package/out/__chunks__/chunk-DBNPRNJV.mjs +0 -2
- package/out/__chunks__/chunk-DM3C2PPR.mjs +0 -2
- package/out/__chunks__/chunk-DXRSXWLQ.mjs +0 -1
- package/out/__chunks__/chunk-EG5H4QZV.mjs +0 -2
- package/out/__chunks__/chunk-EG5H4QZV.mjs.map +0 -7
- package/out/__chunks__/chunk-GMQMFRLW.mjs +0 -2
- package/out/__chunks__/chunk-GMQMFRLW.mjs.map +0 -7
- package/out/__chunks__/chunk-INRKVOET.mjs +0 -1
- package/out/__chunks__/chunk-J7LJM36W.mjs +0 -2
- package/out/__chunks__/chunk-J7LJM36W.mjs.map +0 -7
- package/out/__chunks__/chunk-JKR5DRPM.mjs +0 -1
- package/out/__chunks__/chunk-JMC7CMTU.mjs +0 -2
- package/out/__chunks__/chunk-K5MJ4FMD.mjs +0 -1
- package/out/__chunks__/chunk-KD2IQ32V.mjs +0 -2
- package/out/__chunks__/chunk-LS425JKB.mjs +0 -2
- package/out/__chunks__/chunk-LS425JKB.mjs.map +0 -7
- package/out/__chunks__/chunk-NZFUM3VC.mjs +0 -2
- package/out/__chunks__/chunk-O5MS2L3D.mjs +0 -2
- package/out/__chunks__/chunk-OCTCR7WH.mjs +0 -2
- package/out/__chunks__/chunk-OCTCR7WH.mjs.map +0 -7
- package/out/__chunks__/chunk-PDMEOQYV.mjs +0 -2
- package/out/__chunks__/chunk-PNSB4HHK.mjs +0 -2
- package/out/__chunks__/chunk-PQVNWTWJ.mjs.map +0 -7
- package/out/__chunks__/chunk-PSJELFEY.mjs +0 -2
- package/out/__chunks__/chunk-PSJELFEY.mjs.map +0 -7
- package/out/__chunks__/chunk-QA23TRYO.mjs +0 -2
- package/out/__chunks__/chunk-RSAYFMIM.mjs +0 -2
- package/out/__chunks__/chunk-S2PZQQCM.mjs +0 -2
- package/out/__chunks__/chunk-S2PZQQCM.mjs.map +0 -7
- package/out/__chunks__/chunk-SHNAULDW.mjs +0 -2
- package/out/__chunks__/chunk-SVR3TUOY.mjs +0 -1
- package/out/__chunks__/chunk-TFZ46GCB.mjs +0 -1
- package/out/__chunks__/chunk-UCI2LZF5.mjs.map +0 -7
- package/out/__chunks__/chunk-UFDELD3B.mjs +0 -2
- package/out/__chunks__/chunk-UFDELD3B.mjs.map +0 -7
- package/out/__chunks__/chunk-VJGOUAZ2.mjs +0 -2
- package/out/__chunks__/chunk-VJGOUAZ2.mjs.map +0 -7
- package/out/__chunks__/chunk-WC6DHH2B.mjs +0 -2
- package/out/__chunks__/chunk-WG5ONYK4.mjs +0 -2
- package/out/__chunks__/chunk-WHEXX3BD.mjs +0 -1
- package/out/__chunks__/chunk-WXC5EE2F.mjs.map +0 -7
- package/out/__chunks__/chunk-YFPMAZOS.mjs +0 -1
- package/out/__chunks__/chunk-YPV63DYG.mjs.map +0 -7
- package/out/__chunks__/chunk-YV7ZJBAY.mjs +0 -1
- package/out/__chunks__/chunk-YV7ZJBAY.mjs.map +0 -7
- package/out/__chunks__/chunk-ZFXAT6MD.mjs +0 -1
- package/out/__chunks__/chunk-ZFXAT6MD.mjs.map +0 -7
- package/out/__chunks__/chunk-ZNYD34VT.mjs +0 -2
- package/out/__chunks__/chunk-ZZ6Z3QEX.mjs +0 -2
- package/out/apiCalls/account/index.cjs.map +0 -7
- package/out/apiCalls/account/index.d.ts +0 -1
- package/out/apiCalls/account/index.mjs +0 -2
- package/out/apiCalls/configuration/index.cjs.map +0 -7
- package/out/apiCalls/configuration/index.d.ts +0 -2
- package/out/apiCalls/configuration/index.mjs +0 -2
- package/out/apiCalls/index.cjs +0 -2
- package/out/apiCalls/index.cjs.map +0 -7
- package/out/apiCalls/index.d.ts +0 -6
- package/out/apiCalls/index.mjs +0 -2
- package/out/apiCalls/tokens/index.cjs +0 -2
- package/out/apiCalls/tokens/index.cjs.map +0 -7
- package/out/apiCalls/tokens/index.d.ts +0 -1
- package/out/apiCalls/tokens/index.mjs +0 -2
- package/out/apiCalls/tokens/index.mjs.map +0 -7
- package/out/apiCalls/utils/index.cjs +0 -2
- package/out/apiCalls/utils/index.cjs.map +0 -7
- package/out/apiCalls/utils/index.d.ts +0 -3
- package/out/apiCalls/utils/index.mjs +0 -2
- package/out/apiCalls/utils/index.mjs.map +0 -7
- package/out/apiCalls/websocket/index.cjs +0 -2
- package/out/apiCalls/websocket/index.cjs.map +0 -7
- package/out/apiCalls/websocket/index.d.ts +0 -1
- package/out/apiCalls/websocket/index.mjs +0 -2
- package/out/apiCalls/websocket/index.mjs.map +0 -7
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.cjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.cjs.map +0 -7
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.cjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.cjs.map +0 -7
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.cjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/secondsToTimeString.mjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs.map +0 -7
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.cjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.cjs.map +0 -7
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +0 -2
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.types.cjs.map +0 -7
- package/out/utils/visual/index.cjs +0 -2
- package/out/utils/visual/index.cjs.map +0 -7
- package/out/utils/visual/index.d.ts +0 -1
- package/out/utils/visual/index.mjs +0 -2
- package/out/utils/visual/index.mjs.map +0 -7
- /package/out/__chunks__/{chunk-DM3C2PPR.mjs.map → chunk-2RTOYKHB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F33ERG33.mjs.map → chunk-3CG4C7T4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IE3A2COQ.mjs.map → chunk-3IYTFWEN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DBNPRNJV.mjs.map → chunk-3S3EXLLM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6SC2DWV6.mjs.map → chunk-4GCIE2BM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-W6M5WJ3V.mjs.map → chunk-4QDHKULK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RUE5QYSG.mjs.map → chunk-55U3WK3C.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6WUHHOG2.mjs.map → chunk-573JTRNC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MBNRIXNQ.mjs.map → chunk-5KYXNO4J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WC6DHH2B.mjs.map → chunk-6BOC75BF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AQNUGUG3.mjs.map → chunk-6CLCXSHA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6ET5BDZH.mjs.map → chunk-6CQMLD25.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OEXP5D2Q.mjs.map → chunk-6EKK7AJE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5KCP7UJT.mjs.map → chunk-6F4OKEUQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UERJ6AKK.mjs.map → chunk-7MBSWJUD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZGMF4QYV.mjs.map → chunk-7WJMUTGI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O5MS2L3D.mjs.map → chunk-AFLCI6IF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B2RHOOA6.mjs.map → chunk-AGJVEK6I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QDX2JCQH.mjs.map → chunk-ATLICLWT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MODSKR2X.mjs.map → chunk-BUJNOQZJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DXRSXWLQ.mjs.map → chunk-C4SERLP4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-INRKVOET.mjs.map → chunk-CUDPQDXY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C2FLFZOO.mjs.map → chunk-CVXQYCEE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ONSO75O2.mjs.map → chunk-CXAX5TAG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PNSB4HHK.mjs.map → chunk-CZ2S4XSL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KQV57RV3.mjs.map → chunk-D3VRMBRS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G5MRPRWI.mjs.map → chunk-DW6RO5LJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XG6DEDBU.mjs.map → chunk-E77ZH5JT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OFVUWY2K.mjs.map → chunk-EKWN4V73.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-33MSDZAP.mjs.map → chunk-EPL2CHU6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WWYX7L4I.mjs.map → chunk-FF45FPD3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-STBF3KTB.mjs.map → chunk-FNHO66WN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SHNAULDW.mjs.map → chunk-FRUJEORM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5OMQOYP7.mjs.map → chunk-G5N56FHJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JKR5DRPM.mjs.map → chunk-GBEJIZDR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K5MJ4FMD.mjs.map → chunk-GEB2W7CV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RSAYFMIM.mjs.map → chunk-H73D4VUZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AAQCK4UU.mjs.map → chunk-HBPQEY3L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2XGXXRSH.mjs.map → chunk-HFX5WAAI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QA23TRYO.mjs.map → chunk-HKDRMMI5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MCXQTDAK.mjs.map → chunk-HUXPA4C2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AVXL7ZQK.mjs.map → chunk-HYH55J3D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WBF6D374.mjs.map → chunk-I424CDNL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WZGG2YKQ.mjs.map → chunk-IVHD32VC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YK7T6MBD.mjs.map → chunk-IWP36NOU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4POCTP6S.mjs.map → chunk-IYM4ZX72.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MQJQMAW3.mjs.map → chunk-J5TLE6SA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ITZJPUDG.mjs.map → chunk-JDP24JPD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5JQ3V6QZ.mjs.map → chunk-JPSW3MCK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B6VRKK6A.mjs.map → chunk-JZ22ZC2D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AWQZ56BT.mjs.map → chunk-K4JJZCL3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CJTGYQ5L.mjs.map → chunk-K5K2FVFB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CUQBPPWE.mjs.map → chunk-KIMRQMXB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KMJMQEXI.mjs.map → chunk-LGGG3HW7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OILJUNFX.mjs.map → chunk-LKOWOTL2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YLD26I5H.mjs.map → chunk-LYSI4URP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2JTLNZM3.mjs.map → chunk-MLDUGECH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7ZIJXDPY.mjs.map → chunk-MS7BFY27.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SKBL5PDX.mjs.map → chunk-N4KX33RW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U24DHQDI.mjs.map → chunk-N5VJJRWV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BT2J2GH4.mjs.map → chunk-NAYC2B72.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H24QGHAH.mjs.map → chunk-NAYDJEWI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PBXNAY2B.mjs.map → chunk-NVBWPLR7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JBZR35CW.mjs.map → chunk-O65OBG5D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SR7TVATV.mjs.map → chunk-O6ALDFLM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3S57OP4Z.mjs.map → chunk-OAPLU7UX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NZFUM3VC.mjs.map → chunk-ODHXJQOF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BENZKRAG.mjs.map → chunk-OSG4UY2Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZZ6Z3QEX.mjs.map → chunk-P2MHA65O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D2ULWBRR.mjs.map → chunk-PKLBZG2R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IS3TZ43F.mjs.map → chunk-QJJEW7MB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DBIIY2TX.mjs.map → chunk-QNELH2S2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7MOSAB64.mjs.map → chunk-QO62QJ5H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3KFEBW7N.mjs.map → chunk-RV6SJMD7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GNHD56P3.mjs.map → chunk-SALLGAGD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BSFYNH6O.mjs.map → chunk-SAN5F2PW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QHXZ354C.mjs.map → chunk-TFARIEZF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-W4QMH63P.mjs.map → chunk-TMRKN7VL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BJOEWWLZ.mjs.map → chunk-TR2KNDCH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JMC7CMTU.mjs.map → chunk-TVXZBSUY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SVR3TUOY.mjs.map → chunk-U6RAWQXO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-22ELCCFJ.mjs.map → chunk-UCFMVEOZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QXC4D3AC.mjs.map → chunk-UT4BWFQH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TZTP57OK.mjs.map → chunk-UY22M7WB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J62UCITY.mjs.map → chunk-VGGJESXR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZNYD34VT.mjs.map → chunk-VTEOS2MM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J76GINM5.mjs.map → chunk-WEZV6U4A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MRIKSX32.mjs.map → chunk-WYVAFCPU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WG5ONYK4.mjs.map → chunk-XLLBREX7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EGO5R7IZ.mjs.map → chunk-XNSSZDSU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PDMEOQYV.mjs.map → chunk-XSUHHPZ2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P6HDK262.mjs.map → chunk-XTATC65P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VGO3VD5N.mjs.map → chunk-XV3H7VOE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TKTDGTN7.mjs.map → chunk-XXSANEEO.mjs.map} +0 -0
- /package/out/methods/initApp/{gastStationMetadata → gasStationMetadata}/setGasStationMetadata.cjs +0 -0
- /package/out/methods/initApp/{gastStationMetadata → gasStationMetadata}/setGasStationMetadata.d.ts +0 -0
- /package/out/methods/initApp/{gastStationMetadata → gasStationMetadata}/setGasStationMetadata.mjs.map +0 -0
- /package/out/{__chunks__/chunk-TFZ46GCB.mjs.map → methods/initApp/helpers/waitForStoreRehydration.mjs.map} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{authenticateLedgerAccount.mjs.map → authenticateLedgerAccount/authenticateLedgerAccount.mjs.map} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getAuthTokenText.d.ts → authenticateLedgerAccount/helpers/getAuthTokenText.d.ts} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getAuthTokenText.mjs.map → authenticateLedgerAccount/helpers/getAuthTokenText.mjs.map} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerVersionOptions.d.ts → authenticateLedgerAccount/helpers/getLedgerVersionOptions.d.ts} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerVersionOptions.mjs.map → authenticateLedgerAccount/helpers/getLedgerVersionOptions.mjs.map} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{secondsToTimeString.cjs → authenticateLedgerAccount/helpers/secondsToTimeString.cjs} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{secondsToTimeString.d.ts → authenticateLedgerAccount/helpers/secondsToTimeString.d.ts} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{secondsToTimeString.mjs.map → authenticateLedgerAccount/helpers/secondsToTimeString.mjs.map} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/index.cjs +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/index.d.ts +0 -0
- /package/out/{apiCalls/account → providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList}/index.mjs.map +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.d.ts +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.mjs.map +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.types.cjs +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.types.mjs +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{updateAccountsList → authenticateLedgerAccount/helpers/updateAccountsList}/updateAccountsList.types.mjs.map +0 -0
- /package/out/{__chunks__/chunk-WHEXX3BD.mjs.map → providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs.map} +0 -0
- /package/out/{apiCalls/configuration → providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount}/index.mjs.map +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerProvider.mjs.map → getLedgerProvider/getLedgerProvider.mjs.map} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerConfiguration.d.ts → getLedgerProvider/helpers/getLedgerConfiguration.d.ts} +0 -0
- /package/out/providers/strategies/LedgerProviderStrategy/helpers/{getLedgerConfiguration.mjs.map → getLedgerProvider/helpers/getLedgerConfiguration.mjs.map} +0 -0
- /package/out/{__chunks__/chunk-YFPMAZOS.mjs.map → providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/helpers/initHwProvider.mjs.map} +0 -0
- /package/out/{apiCalls → providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider}/index.mjs.map +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/managers/LogoutManager/LogoutManager.ts", "../../src/managers/ToastManager/ToastManager.ts", "../../src/managers/ToastManager/helpers/LifetimeManager.ts", "../../src/managers/NotificationsFeedManager/NotificationsFeedManager.ts", "../../src/managers/ToastManager/ToastUICoordinator.ts", "../../src/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.ts", "../../src/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.ts", "../../src/methods/trackTransactions/trackTransactions.ts", "../../src/providers/DappProvider/helpers/login/helpers/accountLogin.ts", "../../src/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.ts", "../../src/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.ts", "../../src/providers/DappProvider/helpers/login/login.ts", "../../src/providers/DappProvider/helpers/signErrors/handleSignError.ts", "../../src/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.ts", "../../src/providers/DappProvider/DappProvider.ts", "../../src/providers/helpers/accountProvider.ts", "../../src/utils/account/refreshAccount.ts", "../../src/store/actions/toasts/toastsActions.ts"],
|
|
4
|
-
"sourcesContent": ["import BigNumber from 'bignumber.js';\nimport { ToastManager } from 'managers/ToastManager';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { ProviderTypeEnum } from 'providers/types/providerFactory.types';\nimport { getTokenExpiration } from 'services/nativeAuth/methods/getTokenExpiration';\nimport {\n addressSelector,\n isLoggedInSelector\n} from 'store/selectors/accountSelectors';\nimport { nativeAuthConfigSelector } from 'store/selectors/configSelectors';\nimport { tokenLoginSelector } from 'store/selectors/loginInfoSelectors';\nimport { getStore } from 'store/store';\nimport { IconNamesEnum } from 'types';\nimport { getHumanReadableTokenExpirationTime } from './helpers/getHumanReadableTokenExpirationTime';\n\nexport class LogoutManager {\n private static instance: LogoutManager;\n private store = getStore();\n private warningLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private actualLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutKey: string | null = null;\n\n public static getInstance(): LogoutManager {\n if (!LogoutManager.instance) {\n LogoutManager.instance = new LogoutManager();\n }\n return LogoutManager.instance;\n }\n\n private constructor() {}\n\n public init = async () => {\n if (!this.shouldStart()) {\n return;\n }\n\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n\n const { isExpired: isNativeAuthTokenExpired } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n if (isNativeAuthTokenExpired) {\n const provider = getAccountProvider();\n provider.logout();\n } else {\n this.addPlannedLogout();\n }\n };\n\n public stop = () => {\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n clearTimeout(this.actualLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = null;\n this.plannedLogoutTimeoutRef = null;\n this.actualLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n };\n\n private readonly shouldStart = (): boolean => {\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n const isLoggedIn = isLoggedInSelector(state);\n return Boolean(tokenLogin?.nativeAuthToken && isLoggedIn);\n };\n\n private addPlannedLogout = () => {\n const provider = getAccountProvider();\n const address = addressSelector(this.store.getState());\n const isWebviewLogin = provider.getType() === ProviderTypeEnum.webview;\n\n // prevent unexpected logout if webview login\n if (!address || isWebviewLogin) {\n return;\n }\n\n this.addLogoutWarning();\n\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires, expiresAt } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n // Handle the actual logout functionality.\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const plannedLogoutKey = `${address}_${expiresAt}`;\n const plannedLogoutSet = this.plannedLogoutKey === plannedLogoutKey;\n\n const isValidInterval =\n secondsUntilExpires && secondsUntilExpiresBN.isGreaterThan(0);\n\n if (!isValidInterval || plannedLogoutSet) {\n return;\n }\n\n this.plannedLogoutKey = plannedLogoutKey;\n\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n this.actualLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-logout',\n iconClassName: 'warning',\n title: 'Logging out',\n icon: IconNamesEnum.close,\n message: 'Your session has expired!'\n });\n this.actualLogoutTimeoutRef = null;\n }, millisecondsUntilLogout.toNumber() - 3000);\n\n this.plannedLogoutTimeoutRef = setTimeout(() => {\n provider.logout();\n this.plannedLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n }, millisecondsUntilLogout.toNumber());\n };\n\n private readonly addLogoutWarning = () => {\n if (this.warningLogoutTimeoutRef) {\n return;\n }\n\n const nativeAuthConfig = nativeAuthConfigSelector(this.store.getState());\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n if (\n !secondsUntilExpires ||\n secondsUntilExpiresBN.isLessThanOrEqualTo(0) ||\n !nativeAuthConfig?.tokenExpirationToastWarningSeconds\n ) {\n return;\n }\n\n const logoutWarningOffsetSeconds = new BigNumber(\n nativeAuthConfig?.tokenExpirationToastWarningSeconds ?? 0\n );\n\n const logoutWarningOffsetMilliseconds =\n logoutWarningOffsetSeconds.times(1000);\n\n const millisecondsUntilLogoutWarning = secondsUntilExpiresBN\n .times(1000)\n .minus(logoutWarningOffsetMilliseconds);\n\n const readableMinutesUntilLogout = getHumanReadableTokenExpirationTime(\n millisecondsUntilLogout.toNumber()\n );\n\n const timeoutUntilLogoutWarning =\n millisecondsUntilLogoutWarning.isLessThanOrEqualTo(0)\n ? 0\n : millisecondsUntilLogoutWarning.toNumber();\n\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-expired',\n iconClassName: 'warning',\n title: 'Session Expiration Warning',\n icon: IconNamesEnum.hourglass,\n message: `Your session will expire in ${readableMinutesUntilLogout}!`\n });\n this.warningLogoutTimeoutRef = null;\n }, timeoutUntilLogoutWarning);\n };\n}\n", "import isEqual from 'lodash.isequal';\nimport { DEFAULT_TOAST_LIFETIME } from 'constants/transactions.constants';\nimport {\n customToastCloseHandlersDictionary,\n customToastComponentDictionary,\n removeAllCustomToasts,\n removeCustomToast,\n removeTransactionToast,\n addTransactionToast,\n createCustomToast\n} from 'store/actions/toasts/toastsActions';\nimport {\n getIsTransactionFailed,\n getIsTransactionSuccessful,\n getIsTransactionTimedOut\n} from 'store/actions/transactions/transactionStateByStatus';\n\nimport { CustomToastType } from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { createToastsFromTransactions } from './helpers/createToastsFromTransactions';\nimport { LifetimeManager } from './helpers/LifetimeManager';\nimport { ToastUICoordinator } from './ToastUICoordinator';\nimport { ITransactionToast } from './types';\n\ninterface IToastManager {\n successfulToastLifetime?: number;\n}\n\nexport class ToastManager {\n private readonly lifetimeManager: LifetimeManager;\n private store: ReturnType<typeof getStore>;\n private static instance: ToastManager;\n private transactionToasts: ITransactionToast[] = [];\n private customToasts: CustomToastType[] = [];\n private successfulToastLifetime?: number;\n private unsubscribeFromStore: () => void = () => null;\n private uiCoordinator: ToastUICoordinator | null = null;\n\n constructor(props?: {\n store?: ReturnType<typeof getStore>;\n lifetimeManager?: LifetimeManager;\n uiCoordinator?: ToastUICoordinator;\n }) {\n this.destroy();\n this.store = props?.store || getStore();\n this.lifetimeManager = props?.lifetimeManager ?? new LifetimeManager();\n this.uiCoordinator =\n props?.uiCoordinator ??\n new ToastUICoordinator({\n onCloseToast: this.closeToast.bind(this)\n });\n }\n\n public async init({\n successfulToastLifetime = DEFAULT_TOAST_LIFETIME\n }: IToastManager = {}) {\n this.successfulToastLifetime = successfulToastLifetime;\n\n this.lifetimeManager.init({ successfulToastLifetime });\n\n await this.updateTransactionToastsList();\n await this.updateCustomToastList();\n\n await this.uiCoordinator?.init();\n\n this.unsubscribeFromStore = this.store.subscribe(\n async (\n { toasts, transactions },\n { toasts: prevToasts, transactions: prevTransactions }\n ) => {\n const newToastsWereCreated = !isEqual(\n prevToasts.transactionToasts,\n toasts.transactionToasts\n );\n const checkBatchHasNewData = !isEqual(prevTransactions, transactions);\n\n if (newToastsWereCreated || checkBatchHasNewData) {\n await this.updateTransactionToastsList();\n }\n\n const newCustomToastsWereCreated = !isEqual(\n prevToasts.customToasts,\n toasts.customToasts\n );\n\n if (newCustomToastsWereCreated) {\n await this.updateCustomToastList();\n }\n }\n );\n }\n\n public static getInstance(): ToastManager {\n if (!ToastManager.instance) {\n ToastManager.instance = new ToastManager();\n }\n return ToastManager.instance;\n }\n\n private handleCompletedTransaction(toastId: string): boolean {\n const { transactions } = this.store.getState();\n const transaction = transactions[toastId];\n\n if (!transaction) {\n return false;\n }\n\n const { status } = transaction;\n const isTimedOut = getIsTransactionTimedOut(status);\n const isFailed = getIsTransactionFailed(status);\n const isSuccessful = getIsTransactionSuccessful(status);\n const isCompleted = isFailed || isSuccessful || isTimedOut;\n\n if (isCompleted) {\n if (this.successfulToastLifetime) {\n this.lifetimeManager.start(toastId);\n }\n return isCompleted;\n }\n\n this.lifetimeManager.stop(toastId);\n return isCompleted;\n }\n\n public async createTransactionToast(\n toastId: string,\n totalDuration: number\n ): Promise<string> {\n const newToastId = addTransactionToast({\n toastId,\n totalDuration\n });\n\n this.handleCompletedTransaction(toastId);\n await this.updateTransactionToastsList();\n return newToastId;\n }\n\n public async createCustomToast(toast: CustomToastType): Promise<string> {\n const toastId = createCustomToast(toast);\n await this.updateCustomToastList();\n return toastId;\n }\n\n private async updateTransactionToastsList() {\n const store = this.store.getState();\n const { toasts: toastList } = store;\n\n const { pendingTransactionToasts, completedTransactionToasts } =\n await createToastsFromTransactions({\n store\n });\n\n this.transactionToasts = [\n ...pendingTransactionToasts,\n ...completedTransactionToasts\n ];\n\n for (const toast of toastList.transactionToasts) {\n this.handleCompletedTransaction(toast.toastId);\n }\n\n await this.publishTransactionToasts();\n }\n\n private async updateCustomToastList() {\n const { toasts: toastList } = this.store.getState();\n this.customToasts = [];\n\n for (const toast of toastList.customToasts) {\n const isSimpleToast = 'message' in toast;\n\n const newToast: CustomToastType = isSimpleToast\n ? { ...toast }\n : {\n ...toast,\n instantiateToastElement:\n customToastComponentDictionary[toast.toastId]\n };\n this.customToasts.push(newToast);\n\n if (toast.duration) {\n this.lifetimeManager.startWithCustomDuration(\n toast.toastId,\n toast.duration\n );\n }\n }\n await this.uiCoordinator?.publishCustomToasts(this.customToasts);\n }\n\n private handleTransactionToastClose(toastId: string): boolean {\n const isCompleted = this.handleCompletedTransaction(toastId);\n\n if (isCompleted) {\n removeTransactionToast(toastId);\n return true;\n }\n\n return false;\n }\n\n public async showToasts() {\n this.uiCoordinator?.showToasts();\n await this.updateCustomToastList();\n await this.updateTransactionToastsList();\n }\n\n public hideToasts() {\n this.uiCoordinator?.hideToasts();\n }\n\n public closeToast(toastId: string): boolean {\n const customToast = this.customToasts.find(\n (toast) => toast.toastId === toastId\n );\n\n if (customToast) {\n this.lifetimeManager.stop(toastId);\n const handleClose = customToastCloseHandlersDictionary[toastId];\n handleClose?.();\n removeCustomToast(toastId);\n return true;\n }\n\n return this.handleTransactionToastClose(toastId);\n }\n\n private async publishTransactionToasts() {\n await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts);\n }\n\n public destroy() {\n this.unsubscribeFromStore();\n this.lifetimeManager?.destroy();\n this.uiCoordinator?.destroy();\n removeAllCustomToasts();\n }\n}\n", "import {\n customToastCloseHandlersDictionary,\n removeCustomToast,\n removeTransactionToast\n} from 'store/actions/toasts/toastsActions';\n\ninterface IToastProgressManagerParams {\n successfulToastLifetime?: number;\n}\n\nconst DEFAULT_SUCCESSFUL_TOAST_LIFETIME = 10_000;\n\nexport class LifetimeManager {\n private timeoutIntervals: Map<string, ReturnType<typeof setTimeout>> =\n new Map();\n private successfulToastLifetime: number = DEFAULT_SUCCESSFUL_TOAST_LIFETIME;\n\n constructor() {}\n\n public init({ successfulToastLifetime }: IToastProgressManagerParams) {\n this.successfulToastLifetime =\n successfulToastLifetime ?? DEFAULT_SUCCESSFUL_TOAST_LIFETIME;\n }\n\n public start = (toastId: string) => {\n this.stop(toastId);\n\n if (this.successfulToastLifetime <= 0) {\n return;\n }\n\n const timeout = setTimeout(() => {\n removeTransactionToast(toastId);\n }, this.successfulToastLifetime);\n\n this.timeoutIntervals.set(toastId, timeout);\n };\n\n public startWithCustomDuration = (toastId: string, duration: number) => {\n this.stop(toastId);\n\n if (duration <= 0) {\n return;\n }\n\n const timeout = setTimeout(() => {\n removeCustomToast(toastId);\n const handleClose = customToastCloseHandlersDictionary[toastId];\n handleClose?.();\n }, duration);\n\n this.timeoutIntervals.set(toastId, timeout);\n };\n\n public stop = (toastId: string) => {\n const timeout = this.timeoutIntervals.get(toastId);\n if (timeout) {\n clearTimeout(timeout);\n this.timeoutIntervals.delete(toastId);\n }\n };\n\n public destroy() {\n this.timeoutIntervals.forEach((interval) => clearTimeout(interval));\n this.timeoutIntervals.clear();\n }\n}\n", "import isEqual from 'lodash.isequal';\nimport { UITagsEnum } from 'constants/UITags.enum';\nimport { TransactionsHistoryController } from 'controllers/TransactionsHistoryController';\nimport { ITransactionListItem, MvxNotificationsFeed } from 'lib/sdkDappUi';\nimport { clearCompletedTransactions } from 'store/actions/transactions/transactionsActions';\nimport { TransactionsSliceType } from 'store/slices/transactions/transactionsSlice.types';\nimport { getStore } from 'store/store';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { TransactionBatchStatusesEnum } from 'types/enums.types';\nimport { NotificationsFeedEventsEnum } from './types';\nimport { SidePanelBaseManager } from '../internal/SidePanelBaseManager/SidePanelBaseManager';\nimport { ToastManager } from '../ToastManager';\nimport { createToastsFromTransactions } from '../ToastManager/helpers/createToastsFromTransactions';\nimport { ITransactionToast } from '../ToastManager/types';\n\ninterface INotificationsFeedManagerData {\n pendingTransactions: ITransactionToast[];\n historicTransactions: ITransactionListItem[];\n}\n\nconst NOTIFICATIONS_FEED_STORE_SUBSCRIBE = 'NOTIFICATIONS_FEED_STORE_SUBSCRIBE';\n\nexport class NotificationsFeedManager extends SidePanelBaseManager<\n MvxNotificationsFeed,\n INotificationsFeedManagerData,\n NotificationsFeedEventsEnum | typeof NOTIFICATIONS_FEED_STORE_SUBSCRIBE\n> {\n private static instance: NotificationsFeedManager;\n private readonly store: ReturnType<typeof getStore>;\n\n protected initialData: INotificationsFeedManagerData = {\n pendingTransactions: [],\n historicTransactions: []\n };\n\n public static getInstance(): NotificationsFeedManager {\n if (!NotificationsFeedManager.instance) {\n NotificationsFeedManager.instance = new NotificationsFeedManager();\n }\n return NotificationsFeedManager.instance;\n }\n\n constructor(store?: ReturnType<typeof getStore>) {\n super({\n uiDataUpdateEvent: NotificationsFeedEventsEnum.OPEN,\n uiTag: UITagsEnum.NOTIFICATIONS_FEED\n });\n this.store = store || getStore();\n this.data = { ...this.initialData };\n }\n\n public isNotificationsFeedOpen(): boolean {\n return this.isOpen;\n }\n\n /**\n * Open the notifications feed and toggle off the toast manager.\n */\n public async openNotificationsFeed(): Promise<void> {\n const toastManager = ToastManager.getInstance();\n toastManager.hideToasts();\n await this.openUI();\n await this.updateDataAndNotifications();\n\n const storeToastsUnsubscribe = this.store.subscribe(\n async (\n { toasts, transactions },\n { toasts: prevToasts, transactions: prevTransactions }\n ) => {\n if (\n !isEqual(prevToasts.transactionToasts, toasts.transactionToasts) ||\n !isEqual(prevTransactions, transactions)\n ) {\n await this.updateDataAndNotifications();\n }\n }\n );\n this.unsubscribeFunctions.set(NOTIFICATIONS_FEED_STORE_SUBSCRIBE, [\n storeToastsUnsubscribe\n ]);\n\n this.eventBus?.publish(NotificationsFeedEventsEnum.OPEN);\n await this.updateDataAndNotifications();\n }\n\n /**\n * Close the notifications feed and toggle on the toast manager.\n */\n protected async handleCloseUI() {\n const toastManager = ToastManager.getInstance();\n this.closeUI();\n await toastManager.showToasts();\n }\n\n protected async setupEventListeners() {\n if (!this.eventBus) {\n return;\n }\n\n this.subscribeToEventBus(\n NotificationsFeedEventsEnum.CLOSE,\n this.handleCloseUI.bind(this)\n );\n\n this.subscribeToEventBus(\n NotificationsFeedEventsEnum.CLEAR,\n this.handleClearNotificationsFeedHistory.bind(this)\n );\n }\n\n protected async updateDataAndNotifications() {\n const { transactions } = this.store.getState();\n\n const { pendingTransactionToasts } = await createToastsFromTransactions();\n\n this.data.pendingTransactions = pendingTransactionToasts;\n\n const transactionsSessions = Object.keys(transactions).reduce(\n (acc, key) => {\n const isPendingStatus = [\n TransactionBatchStatusesEnum.sent,\n `${TransactionServerStatusesEnum.pending}`\n ].includes(String(transactions[key].status));\n\n if (!isPendingStatus) {\n acc[key] = transactions[key];\n }\n return acc;\n },\n {} as TransactionsSliceType\n );\n\n this.data.historicTransactions =\n await TransactionsHistoryController.getTransactionsHistory({\n transactionsSessions\n });\n\n await this.updateNotificationsFeed();\n }\n\n private handleClearNotificationsFeedHistory() {\n clearCompletedTransactions();\n this.resetData();\n this.updateNotificationsFeed();\n }\n\n private async updateNotificationsFeed() {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.publish(\n NotificationsFeedEventsEnum.PENDING_TRANSACTIONS_UPDATE,\n this.data.pendingTransactions\n );\n\n this.eventBus.publish(\n NotificationsFeedEventsEnum.TRANSACTIONS_HISTORY_UPDATE,\n this.data.historicTransactions\n );\n }\n}\n", "import { UITagsEnum } from 'constants/UITags.enum';\nimport { MvxToastList } from 'lib/sdkDappUi';\nimport { NotificationsFeedManager } from 'managers/NotificationsFeedManager/NotificationsFeedManager';\nimport type { CustomToastType } from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { IEventBus } from 'types/manager.types';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { ComponentFactory } from 'utils/ComponentFactory';\nimport { ToastEventsEnum } from './types';\nimport type { ITransactionToast } from './types';\n\ntype OnCloseToastType = (toastId: string) => boolean;\ntype StoreObjectType = ReturnType<typeof getStore>;\n\nexport class ToastUICoordinator {\n private toastsElement: MvxToastList | null = null;\n private eventBus: IEventBus<\n ITransactionToast[] | CustomToastType[] | null\n > | null = null;\n private isCreatingElement = false;\n private eventBusUnsubscribeFunctions: (() => void)[] = [];\n private readonly notificationsFeedManager: NotificationsFeedManager;\n private readonly store: StoreObjectType;\n private readonly onCloseToast: OnCloseToastType;\n\n constructor(props: {\n onCloseToast: OnCloseToastType;\n store?: StoreObjectType;\n notificationsFeedManager?: NotificationsFeedManager;\n }) {\n this.onCloseToast = props.onCloseToast;\n this.store = props.store || getStore();\n this.notificationsFeedManager =\n props.notificationsFeedManager || NotificationsFeedManager.getInstance();\n }\n\n public async init() {\n await this.subscribeToEventBusNotifications();\n }\n\n public showToasts() {\n this.eventBus?.publish(ToastEventsEnum.SHOW, null);\n }\n\n public hideToasts() {\n this.eventBus?.publish(ToastEventsEnum.HIDE, null);\n }\n\n public async publishTransactionToasts(toasts: ITransactionToast[]) {\n if (\n this.notificationsFeedManager.isNotificationsFeedOpen() &&\n this.eventBus\n ) {\n this.eventBus.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n toasts\n );\n this.hideToasts();\n return;\n }\n\n if (!this.eventBus) {\n const toastsElement = await this.createToastListElement();\n if (!toastsElement) {\n return;\n }\n this.eventBus = await toastsElement.getEventBus();\n }\n\n this.eventBus?.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n toasts\n );\n }\n\n public async publishCustomToasts(customToasts: CustomToastType[]) {\n this.eventBus?.publish(\n ToastEventsEnum.CUSTOM_TOAST_DATA_UPDATE,\n customToasts\n );\n }\n\n private handleOpenNotificationsFeed() {\n this.notificationsFeedManager.openNotificationsFeed();\n }\n\n public destroy() {\n this.eventBusUnsubscribeFunctions.forEach((unsubscribe) => unsubscribe());\n this.eventBusUnsubscribeFunctions = [];\n this.notificationsFeedManager?.destroy();\n }\n\n private async createToastListElement(): Promise<MvxToastList | null> {\n if (this.toastsElement) {\n return this.toastsElement;\n }\n\n if (!this.isCreatingElement) {\n this.isCreatingElement = true;\n this.toastsElement = await ComponentFactory.create<MvxToastList>({\n name: UITagsEnum.TOAST_LIST\n });\n this.isCreatingElement = false;\n }\n\n return this.toastsElement;\n }\n\n private async subscribeToEventBusNotifications() {\n const toastsElement = await this.createToastListElement();\n\n if (!toastsElement) {\n return;\n }\n\n this.eventBus = await toastsElement.getEventBus();\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n this.eventBus.subscribe(ToastEventsEnum.CLOSE, this.onCloseToast);\n\n this.eventBusUnsubscribeFunctions.push(() => {\n this.eventBus?.unsubscribe(ToastEventsEnum.CLOSE, this.onCloseToast);\n });\n\n this.eventBus.subscribe(\n ToastEventsEnum.OPEN_NOTIFICATIONS_FEED,\n this.handleOpenNotificationsFeed.bind(this)\n );\n\n this.eventBusUnsubscribeFunctions.push(() => {\n this.eventBus?.unsubscribe(\n ToastEventsEnum.OPEN_NOTIFICATIONS_FEED,\n this.handleOpenNotificationsFeed.bind(this)\n );\n });\n }\n}\n", "import { getTransactionsByHashes } from 'apiCalls/transactions/getTransactionsByHashes';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { updateSessionStatus } from 'store/actions/transactions/transactionsActions';\nimport { getState } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { SignedTransactionType } from 'types/transactions.types';\n\nimport { refreshAccount } from 'utils';\nimport { getPendingTransactions } from '../getPendingTransactions';\nimport { runTransactionStatusUpdate } from './helpers/runTransactionStatusUpdate';\n\nexport interface TransactionStatusTrackerPropsType {\n sessionId: string;\n transactionBatch: SignedTransactionType[];\n isSequential?: boolean;\n}\n\nexport async function checkBatch({\n sessionId,\n transactionBatch: transactions,\n isSequential\n}: TransactionStatusTrackerPropsType) {\n try {\n if (transactions == null) {\n return;\n }\n\n const isLoggedIn = getIsLoggedIn();\n\n const pendingTransactions = getPendingTransactions(transactions);\n\n const serverTransactions =\n await getTransactionsByHashes(pendingTransactions);\n\n for (const serverTransaction of serverTransactions) {\n await runTransactionStatusUpdate({\n serverTransaction,\n sessionId,\n isSequential\n });\n }\n\n const hasCompleted = serverTransactions.every(\n (tx) => tx.status !== TransactionServerStatusesEnum.pending\n );\n\n if (!hasCompleted) {\n return;\n }\n\n if (isLoggedIn) {\n await refreshAccount();\n }\n\n // Call the onSuccess or onFail callback only if the transactions are sent normally (not using batch transactions mechanism).\n // The batch transactions mechanism will call the callbacks separately.\n\n const { transactions: sessions } = getState();\n const session = sessions?.[sessionId];\n\n const isSuccessful = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.success\n );\n\n if (isSuccessful) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.success\n });\n }\n\n const isFailed = session.transactions.some(\n (tx) => tx.status === TransactionServerStatusesEnum.fail\n );\n\n if (isFailed) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.fail\n });\n }\n\n const isInvalid = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.notExecuted\n );\n\n if (isInvalid) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.invalid\n });\n }\n } catch (error) {\n console.error(error);\n }\n}\n", "import { pendingTransactionsSessionsSelector } from 'store/selectors/transactionsSelector';\nimport { getState } from 'store/store';\nimport { checkBatch } from './helpers/checkBatch';\n\nexport async function checkTransactionStatus() {\n const pendingSessions = pendingTransactionsSessionsSelector(getState());\n\n const entries = Object.entries(pendingSessions);\n if (entries.length === 0) {\n return;\n }\n\n await Promise.all(\n entries.map(([sessionId, { transactions }]) =>\n checkBatch({\n sessionId,\n transactionBatch: transactions\n })\n )\n );\n}\n", "import { subscriptions } from 'constants/storage.constants';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { websocketEventSelector } from 'store/selectors/accountSelectors';\nimport { getStore } from 'store/store';\nimport { SubscriptionsEnum } from 'types/subscriptions.type';\nimport { checkTransactionStatus } from './helpers/checkTransactionStatus';\nimport { getPollingInterval } from './helpers/getPollingInterval';\n\n/**\n * Tracks transactions using websocket or polling\n * @returns stopTransactionsTracking function\n */\nexport async function trackTransactions(): Promise<{\n stopTransactionsTracking: () => void;\n}> {\n const store = getStore();\n const pollingInterval = getPollingInterval();\n let pollingIntervalRef: ReturnType<typeof setTimeout> | null = null;\n let timestamp = websocketEventSelector(store.getState())?.timestamp ?? null;\n\n const recheckStatus = async (): Promise<void> => {\n try {\n await checkTransactionStatus();\n } catch (error) {\n console.error(\n '[trackTransactions] Error checking transaction status:',\n error\n );\n }\n };\n\n const startPolling = (): void => {\n // Prevent multiple polling intervals\n if (pollingIntervalRef) {\n return;\n }\n pollingIntervalRef = setInterval(recheckStatus, pollingInterval);\n };\n\n const stopPolling = (): void => {\n if (pollingIntervalRef) {\n clearInterval(pollingIntervalRef);\n pollingIntervalRef = null;\n }\n };\n\n const setupWebSocketTracking = (): void => {\n stopPolling();\n const unsubscribeWebsocketEvent = store.subscribe(\n ({ account: { websocketEvent } }) => {\n if (\n websocketEvent?.message &&\n websocketEvent.timestamp != null &&\n timestamp !== websocketEvent.timestamp\n ) {\n timestamp = websocketEvent.timestamp;\n recheckStatus();\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketEventReceived,\n unsubscribeWebsocketEvent\n );\n };\n\n // Initial execution\n recheckStatus();\n\n const stopTransactionsTracking = (): void => {\n stopPolling();\n };\n\n const unsubscribeWebsocketStatus = store.subscribe(\n ({ account: { address }, config: { websocketStatus } }, prevState) => {\n const hasStatusChange =\n prevState.config.websocketStatus !== websocketStatus;\n\n if (!hasStatusChange) {\n return;\n }\n\n switch (websocketStatus) {\n case WebsocketConnectionStatusEnum.COMPLETED:\n setupWebSocketTracking();\n break;\n case WebsocketConnectionStatusEnum.PENDING:\n startPolling();\n break;\n default:\n address ? startPolling() : stopTransactionsTracking();\n break;\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketStatusChanged,\n unsubscribeWebsocketStatus\n );\n return { stopTransactionsTracking };\n}\n", "import { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { setGasStationMetadata } from 'methods/initApp/gastStationMetadata/setGasStationMetadata';\nimport { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { loginAction } from 'store/actions';\nimport { setAccount } from 'store/actions/account';\nimport { AccountType } from 'types/account.types';\nimport { fetchAccount } from 'utils/account/fetchAccount';\nimport { trimUsernameDomain } from 'utils/account/trimUsernameDomain';\n\ninterface IAccountLoginProps {\n address: string;\n provider: IProvider;\n apiAddress: string;\n}\n\nexport async function accountLogin({\n address,\n provider,\n apiAddress\n}: IAccountLoginProps) {\n const account = await fetchAccount({\n address,\n baseURL: apiAddress\n });\n\n if (!account) {\n throw new Error('Account not found');\n }\n\n loginAction({\n address,\n providerType: provider.getType()\n });\n\n const newAccount: AccountType = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(newAccount);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n if (account.shard != null) {\n await setGasStationMetadata({\n shard: Number(account.shard),\n apiAddress\n });\n }\n}\n", "import { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuth } from 'services/nativeAuth';\nimport { decodeNativeAuthToken } from 'services/nativeAuth/helpers/decodeNativeAuthToken';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { setTokenLogin } from 'store/actions/loginInfo/loginInfoActions';\nimport { accountLogin } from './accountLogin';\nimport { extractAddressFromToken } from './extractAddressFromToken';\nimport { getMultisigLoginToken } from './getMultisigLoginToken';\n\nexport async function loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token\n}: {\n provider: IProvider;\n nativeAuthConfig: NativeAuthConfigType;\n token?: string;\n}) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n const nativeAuthClient = nativeAuth(nativeAuthConfig);\n let loginToken = token;\n\n if (!loginToken) {\n loginToken = await nativeAuthClient.initialize({\n noCache: true\n });\n }\n\n const loginData = await provider.login({\n token: loginToken\n });\n\n const { address, signature, ...loginResult } = loginData;\n\n if (!address) {\n console.warn('Login cancelled.');\n return null;\n }\n\n if (!signature) {\n console.error('Failed to sign login token');\n return null;\n }\n\n // nativeAuthToken received from hub login\n const decodedToken = decodeNativeAuthToken(loginResult?.accessToken);\n\n const usedLoginToken = await getMultisigLoginToken({\n loginData,\n nativeAuthConfig,\n loginToken\n });\n\n const nativeAuthToken = decodedToken\n ? loginResult.accessToken\n : nativeAuthClient.getToken({\n address,\n token: usedLoginToken,\n signature\n });\n\n setTokenLogin({\n loginToken,\n signature,\n nativeAuthToken\n });\n\n const extractedAddress = await extractAddressFromToken({\n loginToken,\n extraInfoData: {\n multisig: loginResult?.multisig,\n impersonate: loginResult?.impersonate\n },\n address\n });\n\n await accountLogin({\n address: extractedAddress,\n provider,\n apiAddress\n });\n\n return {\n address: extractedAddress,\n signature\n };\n}\n", "import { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { accountLogin } from './accountLogin';\n\nexport async function loginWithoutNativeToken(provider: IProvider) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n await provider.login();\n\n const address = await provider.getAddress();\n\n if (!address) {\n throw new Error('Address not found');\n }\n\n await accountLogin({ address, provider, apiAddress });\n\n return {\n address\n };\n}\n", "import { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuthConfigSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport { loginWithNativeToken } from './helpers/loginWithNativeToken';\nimport { loginWithoutNativeToken } from './helpers/loginWithoutNativeToken';\n\nexport async function login(\n provider: IProvider,\n options?: { token?: string }\n): Promise<{\n address: string;\n signature: string;\n} | null> {\n const nativeAuthConfig = nativeAuthConfigSelector(getState());\n\n if (nativeAuthConfig) {\n const data = await loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token: options?.token\n });\n return data;\n }\n\n const { address } = await loginWithoutNativeToken(provider);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n return { address, signature: '' };\n}\n", "import {\n CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n CANCEL_TRANSACTION_TOAST_ID,\n ERROR_SIGNING_TOAST_ID\n} from 'constants/transactions.constants';\nimport { createCustomToast } from 'store/actions';\nimport {\n IconNamesEnum,\n SigningErrorsEnum,\n SigningWarningsEnum\n} from 'types/enums.types';\n\nconst states = {\n error: {\n title: SigningErrorsEnum.errorSigning.toString(),\n iconClassName: 'danger',\n toastId: `${ERROR_SIGNING_TOAST_ID}-${Date.now()}`\n },\n warning: {\n title: SigningWarningsEnum.cancelled.toString(),\n iconClassName: 'warning',\n toastId: `${CANCEL_TRANSACTION_TOAST_ID}-${Date.now()}`\n }\n};\n\nconst errorsMap = {\n extensionResponse: 'Unable to sign transactions', // extension\n 'Transaction canceled': 'Transaction canceled', // web wallet\n 'cancelled by user': 'Transaction signing cancelled by user', // custom\n 'denied by the user': 'Transaction signing denied by the user' // ledger\n};\n\nconst getUserError = (error: string) => {\n for (const [key, value] of Object.entries(errorsMap)) {\n if (error.includes(key)) {\n return value;\n }\n }\n return SigningErrorsEnum.errorSigning;\n};\n\nexport function handleSignError(\n error: unknown,\n type: 'error' | 'warning' = 'error'\n) {\n const originalError = (error as Error)?.message;\n const errorMessage = getUserError(originalError);\n\n const isKnownError = errorMessage !== SigningErrorsEnum.errorSigning;\n\n const errorType = isKnownError ? 'warning' : type;\n\n const state = Object.keys(states).includes(errorType)\n ? states[errorType]\n : states.error;\n\n const { toastId, iconClassName, title } = state;\n\n createCustomToast({\n toastId,\n duration: CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n icon: IconNamesEnum.close,\n iconClassName,\n message: errorMessage,\n title\n });\n\n return errorMessage;\n}\n", "import {\n Address,\n Transaction,\n TransactionOptions,\n TransactionVersion\n} from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport {\n IProvider,\n ProviderTypeEnum\n} from 'providers/types/providerFactory.types';\nimport { setAccountNonce } from 'store/actions';\nimport { refreshAccount } from 'utils';\nimport { computeNonces } from '../computeNonces/computeNonces';\n\nexport type SignTransactionsOptionsType = {\n skipGuardian?: boolean;\n};\n\ntype SignTransactionsType = {\n provider: IProvider;\n transactions: Transaction[];\n options?: SignTransactionsOptionsType;\n};\n\nexport async function signTransactionsWithProvider({\n provider,\n transactions,\n options = {}\n}: SignTransactionsType): Promise<Transaction[]> {\n await refreshAccount();\n const { isGuarded, activeGuardianAddress, nonce } = getAccount();\n const isLedger = provider.getType() === ProviderTypeEnum.ledger;\n\n const transactionsWithComputedNonce = computeNonces({\n latestNonce: nonce,\n transactions\n });\n\n const transactionsToSign =\n activeGuardianAddress && isGuarded && !options.skipGuardian\n ? transactionsWithComputedNonce?.map((transaction) => {\n transaction.version = TransactionVersion.withTxOptions().valueOf();\n transaction.options = TransactionOptions.withOptions({\n guarded: true,\n ...(isLedger ? { hashSign: true } : {})\n }).valueOf();\n\n transaction.guardian = Address.newFromBech32(activeGuardianAddress);\n\n return transaction;\n })\n : transactionsWithComputedNonce;\n\n const signedTransactions: Transaction[] =\n (await provider.signTransactions(transactionsToSign)) ?? [];\n\n setAccountNonce(nonce + signedTransactions.length);\n\n return signedTransactions;\n}\n", "import { Message, Transaction } from 'lib/sdkCore';\nimport { LogoutManager } from 'managers/LogoutManager/LogoutManager';\nimport { setAccountProvider } from 'providers/helpers/accountProvider';\nimport { setProviderType } from 'store/actions/loginInfo/loginInfoActions';\nimport { IProvider } from '../types/providerFactory.types';\nimport { login } from './helpers/login/login';\nimport { logout } from './helpers/logout/logout';\nimport { handleSignError } from './helpers/signErrors/handleSignError';\nimport { signMessageWithProvider } from './helpers/signMessage/signMessageWithProvider';\nimport {\n verifyMessage,\n VerifyMessageReturnType\n} from './helpers/signMessage/verifyMessage';\nimport {\n signTransactionsWithProvider,\n SignTransactionsOptionsType\n} from './helpers/signTransactions/signTransactionsWithProvider';\n\nexport class DappProvider {\n private provider: IProvider;\n private _isLoggingOut = false;\n\n constructor(provider: IProvider) {\n this.provider = provider;\n }\n\n init(): Promise<boolean> {\n return this.provider.init();\n }\n\n async login(options?: { token?: string }) {\n const data = await login(this.provider, options);\n setProviderType(this.provider.getType());\n setAccountProvider(this);\n LogoutManager.getInstance().init();\n return data;\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n async logout(\n options = {\n shouldBroadcastLogoutAcrossTabs: true\n }\n ): Promise<boolean> {\n if (this._isLoggingOut) {\n console.warn('Logout already in progress');\n return false;\n }\n\n this._isLoggingOut = true;\n\n const isLoggedOut = await logout({ provider: this.provider, options });\n\n this._isLoggingOut = false;\n\n return isLoggedOut;\n }\n\n getType() {\n return this.provider.getType();\n }\n\n /**\n * @returns The original provider instance.\n */\n getProvider() {\n return this.provider;\n }\n\n async signTransactions(\n transactions: Transaction[],\n options?: SignTransactionsOptionsType\n ): Promise<Transaction[]> {\n try {\n const signedTransactions = await signTransactionsWithProvider({\n provider: this.provider,\n transactions,\n options\n });\n return signedTransactions;\n } catch (error) {\n const errorMessage = handleSignError(error);\n throw new Error(errorMessage);\n }\n }\n\n async signMessage(\n message: Message,\n options?: {\n hasConsentPopup?: boolean;\n }\n ): Promise<Message | null> {\n try {\n const signedMessage = await signMessageWithProvider({\n provider: this.provider,\n message,\n options\n });\n return signedMessage;\n } catch (error) {\n const errorMessage = handleSignError(error, 'warning');\n throw new Error(errorMessage);\n }\n }\n\n /**\n * @param signedMessage - The signed message to verify in form of a JSON string with `address`, `message` and `signature` properties.\n * @returns The verification result with `isVerified`, `message` and `address` properties.\n */\n async verifyMessage(signedMessage: string): Promise<VerifyMessageReturnType> {\n return await verifyMessage(signedMessage);\n }\n\n cancelLogin(): void {\n this.provider.cancelLogin?.();\n }\n}\n", "import { IProvider } from 'providers/types/providerFactory.types';\nimport { DappProvider } from '../DappProvider';\nimport { emptyProvider } from './emptyProvider';\n\nexport type ProvidersType = IProvider;\n\nlet accountProvider: DappProvider | null = null;\n\nexport function setAccountProvider<TProvider extends DappProvider | null>(\n provider: TProvider\n) {\n accountProvider = provider;\n}\n\nexport function getAccountProvider(): DappProvider {\n return accountProvider || new DappProvider(emptyProvider);\n}\n", "import { getAddress } from 'methods/account/getAddress';\nimport { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { setAccount } from 'store/actions';\nimport { fetchAccount } from './fetchAccount';\nimport { trimUsernameDomain } from './trimUsernameDomain';\n\nconst setNewAccount = async () => {\n try {\n const address = getAddress();\n const { network } = getNetworkConfig();\n\n try {\n const account = await fetchAccount({\n address,\n baseURL: network.apiAddress\n });\n\n if (account != null) {\n const accountData = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(accountData);\n\n return accountData;\n }\n } catch (e) {\n console.error('Failed getting account ', e);\n }\n } catch (e) {\n console.error('Failed getting address ', e);\n }\n\n return null;\n};\n\nexport async function refreshAccount() {\n const provider = getAccountProvider();\n\n if (provider == null) {\n throw 'Provider not initialized';\n }\n\n try {\n if (!provider.init) {\n throw 'Current provider does not have init() function';\n }\n\n const initialized = await provider.init();\n\n if (!initialized) {\n return;\n }\n\n const account = await setNewAccount();\n\n return account;\n } catch (e) {\n console.error('Failed initializing provider ', e);\n }\n\n return undefined;\n}\n", "import {\n CustomToastType,\n IComponentToast\n} from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { getUnixTimestamp, getUnixTimestampWithAddedMilliseconds } from 'utils';\n\nexport const customToastComponentDictionary: Record<\n string,\n IComponentToast['instantiateToastElement']\n> = {};\nexport const customToastCloseHandlersDictionary: Record<string, () => void> =\n {};\n\nexport const addCustomToast = (\n customToast: CustomToastType,\n currentToastId?: string\n) => {\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.customToasts.length > 0\n ? Math.max(\n ...state.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n const toastId = currentToastId ?? `custom-toast-${lastToastIndex + 1}`;\n\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const newToast: CustomToastType = {\n ...customToast,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = newToast;\n return;\n }\n\n state.customToasts.push({\n ...newToast,\n toastId\n });\n },\n false,\n {\n type: 'addCustomToast',\n // @ts-ignore\n payload: {\n value: { customToast, currentToastId }\n }\n }\n );\n};\n\nexport const removeCustomToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = state.customToasts.filter(\n (toast) => toast.toastId !== toastId\n );\n },\n false,\n {\n type: 'removeCustomToast',\n // @ts-ignore\n payload: {\n value: toastId\n }\n }\n );\n};\n\nexport const removeAllCustomToasts = () => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = [];\n },\n false,\n {\n type: 'removeAllCustomToasts',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n};\n\nexport const removeAllTransactionToasts = () => {\n getStore().setState(({ toasts: state }) => {\n state.transactionToasts = [];\n });\n};\n\nexport const addTransactionToast = ({\n toastId,\n totalDuration\n}: {\n toastId: string;\n totalDuration: number;\n}): string => {\n let newToastId: string = '';\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.transactionToasts.length > 0\n ? Math.max(\n ...state.transactionToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n newToastId = toastId ?? `transaction-toast-${lastToastIndex + 1}`;\n\n state.transactionToasts.push({\n startTime: getUnixTimestamp(),\n endTime: getUnixTimestampWithAddedMilliseconds(totalDuration),\n toastId: newToastId\n });\n },\n false,\n 'addTransactionToast'\n );\n\n return newToastId;\n};\n\nexport const removeTransactionToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.transactionToasts = state.transactionToasts.filter((toast) => {\n return toast.toastId !== toastId;\n });\n },\n false,\n 'removeTransactionToast'\n );\n\n delete customToastCloseHandlersDictionary[toastId];\n delete customToastComponentDictionary[toastId];\n};\n\nexport const createCustomToast = (props: CustomToastType) => {\n const { toasts } = getStore().getState();\n\n const lastToastIndex =\n toasts.customToasts.length > 0\n ? Math.max(\n ...toasts.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n\n const toastId = props.toastId || `custom-toast-${lastToastIndex + 1}`;\n\n if (props.onClose) {\n customToastCloseHandlersDictionary[toastId] = props.onClose;\n }\n\n if (props.instantiateToastElement) {\n customToastComponentDictionary[toastId] = props.instantiateToastElement;\n\n getStore().setState(\n ({ toasts: state }) => {\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const toast: CustomToastType = {\n ...props,\n instantiateToastElement: null,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = toast;\n } else {\n state.customToasts.push(toast);\n }\n },\n false,\n 'createCustomToast'\n );\n\n return toastId;\n }\n\n addCustomToast(props, toastId);\n return toastId;\n};\n"],
|
|
5
|
-
"mappings": "y2DAAA,OAAOA,MAAe,eCAtB,OAAOC,MAAa,iBCUpB,IAAMC,GAAoC,IAE7BC,EAAN,KAAsB,CAK3B,aAAc,CAJd,KAAQ,iBACN,IAAI,IACN,KAAQ,wBAAkCD,GAS1C,KAAO,MAASE,GAAoB,CAGlC,GAFA,KAAK,KAAKA,CAAO,EAEb,KAAK,yBAA2B,EAClC,OAGF,IAAMC,EAAU,WAAW,IAAM,CAC/BC,EAAuBF,CAAO,CAChC,EAAG,KAAK,uBAAuB,EAE/B,KAAK,iBAAiB,IAAIA,EAASC,CAAO,CAC5C,EAEA,KAAO,wBAA0B,CAACD,EAAiBG,IAAqB,CAGtE,GAFA,KAAK,KAAKH,CAAO,EAEbG,GAAY,EACd,OAGF,IAAMF,EAAU,WAAW,IAAM,CAC/BG,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gBf,EAAiB,CAAC,GAMnE,OAJIe,EAAM,UACRrB,EAAmCQ,CAAO,EAAIa,EAAM,SAGlDA,EAAM,yBACRtB,EAA+BS,CAAO,EAAIa,EAAM,wBAEhDjB,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrB,IAAMI,EAAqBJ,EAAM,aAAa,UAC3CE,GAAUA,EAAM,UAAYC,CAC/B,EAEMD,EAAyB,CAC7B,GAAGc,EACH,wBAAyB,KACzB,QAAAb,CACF,EAEqBC,IAAuB,GAG1CJ,EAAM,aAAaI,CAAkB,EAAIF,EAEzCF,EAAM,aAAa,KAAKE,CAAK,CAEjC,EACA,GACA,mBACF,EAEOC,IAGTP,GAAeoB,EAAOb,CAAO,EACtBA,EACT",
|
|
4
|
+
"sourcesContent": ["import BigNumber from 'bignumber.js';\nimport { ToastManager } from 'managers/ToastManager';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { ProviderTypeEnum } from 'providers/types/providerFactory.types';\nimport { getTokenExpiration } from 'services/nativeAuth/methods/getTokenExpiration';\nimport {\n addressSelector,\n isLoggedInSelector\n} from 'store/selectors/accountSelectors';\nimport { nativeAuthConfigSelector } from 'store/selectors/configSelectors';\nimport { tokenLoginSelector } from 'store/selectors/loginInfoSelectors';\nimport { getStore } from 'store/store';\nimport { IconNamesEnum } from 'types';\nimport { getHumanReadableTokenExpirationTime } from './helpers/getHumanReadableTokenExpirationTime';\n\nexport class LogoutManager {\n private static instance: LogoutManager;\n private store = getStore();\n private warningLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private actualLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutKey: string | null = null;\n\n public static getInstance(): LogoutManager {\n if (!LogoutManager.instance) {\n LogoutManager.instance = new LogoutManager();\n }\n return LogoutManager.instance;\n }\n\n private constructor() {}\n\n public init = async () => {\n if (!this.shouldStart()) {\n return;\n }\n\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n\n const { isExpired: isNativeAuthTokenExpired } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n if (isNativeAuthTokenExpired) {\n const provider = getAccountProvider();\n provider.logout();\n } else {\n this.addPlannedLogout();\n }\n };\n\n public stop = () => {\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n clearTimeout(this.actualLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = null;\n this.plannedLogoutTimeoutRef = null;\n this.actualLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n };\n\n private readonly shouldStart = (): boolean => {\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n const isLoggedIn = isLoggedInSelector(state);\n return Boolean(tokenLogin?.nativeAuthToken && isLoggedIn);\n };\n\n private addPlannedLogout = () => {\n const provider = getAccountProvider();\n const address = addressSelector(this.store.getState());\n const isWebviewLogin = provider.getType() === ProviderTypeEnum.webview;\n\n // prevent unexpected logout if webview login\n if (!address || isWebviewLogin) {\n return;\n }\n\n this.addLogoutWarning();\n\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires, expiresAt } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n // Handle the actual logout functionality.\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const plannedLogoutKey = `${address}_${expiresAt}`;\n const plannedLogoutSet = this.plannedLogoutKey === plannedLogoutKey;\n\n const isValidInterval =\n secondsUntilExpires && secondsUntilExpiresBN.isGreaterThan(0);\n\n if (!isValidInterval || plannedLogoutSet) {\n return;\n }\n\n this.plannedLogoutKey = plannedLogoutKey;\n\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n this.actualLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-logout',\n iconClassName: 'warning',\n title: 'Logging out',\n icon: IconNamesEnum.close,\n message: 'Your session has expired!'\n });\n this.actualLogoutTimeoutRef = null;\n }, millisecondsUntilLogout.toNumber() - 3000);\n\n this.plannedLogoutTimeoutRef = setTimeout(() => {\n provider.logout();\n this.plannedLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n }, millisecondsUntilLogout.toNumber());\n };\n\n private readonly addLogoutWarning = () => {\n if (this.warningLogoutTimeoutRef) {\n return;\n }\n\n const nativeAuthConfig = nativeAuthConfigSelector(this.store.getState());\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n if (\n !secondsUntilExpires ||\n secondsUntilExpiresBN.isLessThanOrEqualTo(0) ||\n !nativeAuthConfig?.tokenExpirationToastWarningSeconds\n ) {\n return;\n }\n\n const logoutWarningOffsetSeconds = new BigNumber(\n nativeAuthConfig?.tokenExpirationToastWarningSeconds ?? 0\n );\n\n const logoutWarningOffsetMilliseconds =\n logoutWarningOffsetSeconds.times(1000);\n\n const millisecondsUntilLogoutWarning = secondsUntilExpiresBN\n .times(1000)\n .minus(logoutWarningOffsetMilliseconds);\n\n const readableMinutesUntilLogout = getHumanReadableTokenExpirationTime(\n millisecondsUntilLogout.toNumber()\n );\n\n const timeoutUntilLogoutWarning =\n millisecondsUntilLogoutWarning.isLessThanOrEqualTo(0)\n ? 0\n : millisecondsUntilLogoutWarning.toNumber();\n\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-expired',\n iconClassName: 'warning',\n title: 'Session Expiration Warning',\n icon: IconNamesEnum.hourglass,\n message: `Your session will expire in ${readableMinutesUntilLogout}!`\n });\n this.warningLogoutTimeoutRef = null;\n }, timeoutUntilLogoutWarning);\n };\n}\n", "import isEqual from 'lodash.isequal';\nimport { DEFAULT_TOAST_LIFETIME } from 'constants/transactions.constants';\nimport {\n customToastCloseHandlersDictionary,\n customToastComponentDictionary,\n removeAllCustomToasts,\n removeCustomToast,\n removeTransactionToast,\n addTransactionToast,\n createCustomToast\n} from 'store/actions/toasts/toastsActions';\nimport {\n getIsTransactionFailed,\n getIsTransactionSuccessful,\n getIsTransactionTimedOut\n} from 'store/actions/transactions/transactionStateByStatus';\n\nimport { CustomToastType } from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { createToastsFromTransactions } from './helpers/createToastsFromTransactions';\nimport { LifetimeManager } from './helpers/LifetimeManager';\nimport { ToastUICoordinator } from './ToastUICoordinator';\nimport { ITransactionToast } from './types';\n\ninterface IToastManager {\n successfulToastLifetime?: number;\n}\n\nexport class ToastManager {\n private readonly lifetimeManager: LifetimeManager;\n private store: ReturnType<typeof getStore>;\n private static instance: ToastManager;\n private transactionToasts: ITransactionToast[] = [];\n private customToasts: CustomToastType[] = [];\n private successfulToastLifetime?: number;\n private unsubscribeFromStore: () => void = () => null;\n private uiCoordinator: ToastUICoordinator | null = null;\n\n constructor(props?: {\n store?: ReturnType<typeof getStore>;\n lifetimeManager?: LifetimeManager;\n uiCoordinator?: ToastUICoordinator;\n }) {\n this.destroy();\n this.store = props?.store || getStore();\n this.lifetimeManager = props?.lifetimeManager ?? new LifetimeManager();\n this.uiCoordinator =\n props?.uiCoordinator ??\n new ToastUICoordinator({\n onCloseToast: this.closeToast.bind(this)\n });\n }\n\n public async init({\n successfulToastLifetime = DEFAULT_TOAST_LIFETIME\n }: IToastManager = {}) {\n this.successfulToastLifetime = successfulToastLifetime;\n\n this.lifetimeManager.init({ successfulToastLifetime });\n\n await this.updateTransactionToastsList();\n await this.updateCustomToastList();\n\n await this.uiCoordinator?.init();\n\n this.unsubscribeFromStore = this.store.subscribe(\n async (\n { toasts, transactions },\n { toasts: prevToasts, transactions: prevTransactions }\n ) => {\n const newToastsWereCreated = !isEqual(\n prevToasts.transactionToasts,\n toasts.transactionToasts\n );\n const checkBatchHasNewData = !isEqual(prevTransactions, transactions);\n\n if (newToastsWereCreated || checkBatchHasNewData) {\n await this.updateTransactionToastsList();\n }\n\n const newCustomToastsWereCreated = !isEqual(\n prevToasts.customToasts,\n toasts.customToasts\n );\n\n if (newCustomToastsWereCreated) {\n await this.updateCustomToastList();\n }\n }\n );\n }\n\n public static getInstance(): ToastManager {\n if (!ToastManager.instance) {\n ToastManager.instance = new ToastManager();\n }\n return ToastManager.instance;\n }\n\n private handleCompletedTransaction(toastId: string): boolean {\n const { transactions } = this.store.getState();\n const transaction = transactions[toastId];\n\n if (!transaction) {\n return false;\n }\n\n const { status } = transaction;\n const isTimedOut = getIsTransactionTimedOut(status);\n const isFailed = getIsTransactionFailed(status);\n const isSuccessful = getIsTransactionSuccessful(status);\n const isCompleted = isFailed || isSuccessful || isTimedOut;\n\n if (isCompleted) {\n if (this.successfulToastLifetime) {\n this.lifetimeManager.start(toastId);\n }\n return isCompleted;\n }\n\n this.lifetimeManager.stop(toastId);\n return isCompleted;\n }\n\n public async createTransactionToast(\n toastId: string,\n totalDuration: number\n ): Promise<string> {\n const newToastId = addTransactionToast({\n toastId,\n totalDuration\n });\n\n this.handleCompletedTransaction(toastId);\n await this.updateTransactionToastsList();\n return newToastId;\n }\n\n public async createCustomToast(toast: CustomToastType): Promise<string> {\n const toastId = createCustomToast(toast);\n await this.updateCustomToastList();\n return toastId;\n }\n\n private async updateTransactionToastsList() {\n const store = this.store.getState();\n const { toasts: toastList } = store;\n\n const { pendingTransactionToasts, completedTransactionToasts } =\n await createToastsFromTransactions({\n store\n });\n\n this.transactionToasts = [\n ...pendingTransactionToasts,\n ...completedTransactionToasts\n ];\n\n for (const toast of toastList.transactionToasts) {\n this.handleCompletedTransaction(toast.toastId);\n }\n\n await this.publishTransactionToasts();\n }\n\n private async updateCustomToastList() {\n const { toasts: toastList } = this.store.getState();\n this.customToasts = [];\n\n for (const toast of toastList.customToasts) {\n const isSimpleToast = 'message' in toast;\n\n const newToast: CustomToastType = isSimpleToast\n ? { ...toast }\n : {\n ...toast,\n instantiateToastElement:\n customToastComponentDictionary[toast.toastId]\n };\n this.customToasts.push(newToast);\n\n if (toast.duration) {\n this.lifetimeManager.startWithCustomDuration(\n toast.toastId,\n toast.duration\n );\n }\n }\n await this.uiCoordinator?.publishCustomToasts(this.customToasts);\n }\n\n private handleTransactionToastClose(toastId: string): boolean {\n const isCompleted = this.handleCompletedTransaction(toastId);\n\n if (isCompleted) {\n removeTransactionToast(toastId);\n return true;\n }\n\n return false;\n }\n\n public async showToasts() {\n this.uiCoordinator?.showToasts();\n await this.updateCustomToastList();\n await this.updateTransactionToastsList();\n }\n\n public hideToasts() {\n this.uiCoordinator?.hideToasts();\n }\n\n public closeToast(toastId: string): boolean {\n const customToast = this.customToasts.find(\n (toast) => toast.toastId === toastId\n );\n\n if (customToast) {\n this.lifetimeManager.stop(toastId);\n const handleClose = customToastCloseHandlersDictionary[toastId];\n handleClose?.();\n removeCustomToast(toastId);\n return true;\n }\n\n return this.handleTransactionToastClose(toastId);\n }\n\n private async publishTransactionToasts() {\n await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts);\n }\n\n public destroy() {\n this.unsubscribeFromStore();\n this.lifetimeManager?.destroy();\n this.uiCoordinator?.destroy();\n removeAllCustomToasts();\n }\n}\n", "import {\n customToastCloseHandlersDictionary,\n removeCustomToast,\n removeTransactionToast\n} from 'store/actions/toasts/toastsActions';\n\ninterface IToastProgressManagerParams {\n successfulToastLifetime?: number;\n}\n\nconst DEFAULT_SUCCESSFUL_TOAST_LIFETIME = 10_000;\n\nexport class LifetimeManager {\n private timeoutIntervals: Map<string, ReturnType<typeof setTimeout>> =\n new Map();\n private successfulToastLifetime: number = DEFAULT_SUCCESSFUL_TOAST_LIFETIME;\n\n constructor() {}\n\n public init({ successfulToastLifetime }: IToastProgressManagerParams) {\n this.successfulToastLifetime =\n successfulToastLifetime ?? DEFAULT_SUCCESSFUL_TOAST_LIFETIME;\n }\n\n public start = (toastId: string) => {\n this.stop(toastId);\n\n if (this.successfulToastLifetime <= 0) {\n return;\n }\n\n const timeout = setTimeout(() => {\n removeTransactionToast(toastId);\n }, this.successfulToastLifetime);\n\n this.timeoutIntervals.set(toastId, timeout);\n };\n\n public startWithCustomDuration = (toastId: string, duration: number) => {\n this.stop(toastId);\n\n if (duration <= 0) {\n return;\n }\n\n const timeout = setTimeout(() => {\n removeCustomToast(toastId);\n const handleClose = customToastCloseHandlersDictionary[toastId];\n handleClose?.();\n }, duration);\n\n this.timeoutIntervals.set(toastId, timeout);\n };\n\n public stop = (toastId: string) => {\n const timeout = this.timeoutIntervals.get(toastId);\n if (timeout) {\n clearTimeout(timeout);\n this.timeoutIntervals.delete(toastId);\n }\n };\n\n public destroy() {\n this.timeoutIntervals.forEach((interval) => clearTimeout(interval));\n this.timeoutIntervals.clear();\n }\n}\n", "import isEqual from 'lodash.isequal';\nimport { UITagsEnum } from 'constants/UITags.enum';\nimport { TransactionsHistoryController } from 'controllers/TransactionsHistoryController';\nimport { ITransactionListItem, MvxNotificationsFeed } from 'lib/sdkDappUi';\nimport { clearCompletedTransactions } from 'store/actions/transactions/transactionsActions';\nimport { TransactionsSliceType } from 'store/slices/transactions/transactionsSlice.types';\nimport { getStore } from 'store/store';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { TransactionBatchStatusesEnum } from 'types/enums.types';\nimport { NotificationsFeedEventsEnum } from './types';\nimport { SidePanelBaseManager } from '../internal/SidePanelBaseManager/SidePanelBaseManager';\nimport { ToastManager } from '../ToastManager';\nimport { createToastsFromTransactions } from '../ToastManager/helpers/createToastsFromTransactions';\nimport { ITransactionToast } from '../ToastManager/types';\n\ninterface INotificationsFeedManagerData {\n pendingTransactions: ITransactionToast[];\n historicTransactions: ITransactionListItem[];\n}\n\nconst NOTIFICATIONS_FEED_STORE_SUBSCRIBE = 'NOTIFICATIONS_FEED_STORE_SUBSCRIBE';\n\nexport class NotificationsFeedManager extends SidePanelBaseManager<\n MvxNotificationsFeed,\n INotificationsFeedManagerData,\n NotificationsFeedEventsEnum | typeof NOTIFICATIONS_FEED_STORE_SUBSCRIBE\n> {\n private static instance: NotificationsFeedManager;\n private readonly store: ReturnType<typeof getStore>;\n\n protected initialData: INotificationsFeedManagerData = {\n pendingTransactions: [],\n historicTransactions: []\n };\n\n public static getInstance(): NotificationsFeedManager {\n if (!NotificationsFeedManager.instance) {\n NotificationsFeedManager.instance = new NotificationsFeedManager();\n }\n return NotificationsFeedManager.instance;\n }\n\n constructor(store?: ReturnType<typeof getStore>) {\n super({\n uiDataUpdateEvent: NotificationsFeedEventsEnum.OPEN,\n uiTag: UITagsEnum.NOTIFICATIONS_FEED\n });\n this.store = store || getStore();\n this.data = { ...this.initialData };\n }\n\n public isNotificationsFeedOpen(): boolean {\n return this.isOpen;\n }\n\n /**\n * Open the notifications feed and toggle off the toast manager.\n */\n public async openNotificationsFeed(): Promise<void> {\n const toastManager = ToastManager.getInstance();\n toastManager.hideToasts();\n await this.openUI();\n await this.updateDataAndNotifications();\n\n const storeToastsUnsubscribe = this.store.subscribe(\n async (\n { toasts, transactions },\n { toasts: prevToasts, transactions: prevTransactions }\n ) => {\n if (\n !isEqual(prevToasts.transactionToasts, toasts.transactionToasts) ||\n !isEqual(prevTransactions, transactions)\n ) {\n await this.updateDataAndNotifications();\n }\n }\n );\n this.unsubscribeFunctions.set(NOTIFICATIONS_FEED_STORE_SUBSCRIBE, [\n storeToastsUnsubscribe\n ]);\n\n this.eventBus?.publish(NotificationsFeedEventsEnum.OPEN);\n await this.updateDataAndNotifications();\n }\n\n /**\n * Close the notifications feed and toggle on the toast manager.\n */\n protected async handleCloseUI() {\n const toastManager = ToastManager.getInstance();\n this.closeUI();\n await toastManager.showToasts();\n }\n\n protected async setupEventListeners() {\n if (!this.eventBus) {\n return;\n }\n\n this.subscribeToEventBus(\n NotificationsFeedEventsEnum.CLOSE,\n this.handleCloseUI.bind(this)\n );\n\n this.subscribeToEventBus(\n NotificationsFeedEventsEnum.CLEAR,\n this.handleClearNotificationsFeedHistory.bind(this)\n );\n }\n\n protected async updateDataAndNotifications() {\n const { transactions } = this.store.getState();\n\n const { pendingTransactionToasts } = await createToastsFromTransactions();\n\n this.data.pendingTransactions = pendingTransactionToasts;\n\n const transactionsSessions = Object.keys(transactions).reduce(\n (acc, key) => {\n const isPendingStatus = [\n TransactionBatchStatusesEnum.sent,\n `${TransactionServerStatusesEnum.pending}`\n ].includes(String(transactions[key].status));\n\n if (!isPendingStatus) {\n acc[key] = transactions[key];\n }\n return acc;\n },\n {} as TransactionsSliceType\n );\n\n this.data.historicTransactions =\n await TransactionsHistoryController.getTransactionsHistory({\n transactionsSessions\n });\n\n await this.updateNotificationsFeed();\n }\n\n private handleClearNotificationsFeedHistory() {\n clearCompletedTransactions();\n this.resetData();\n this.updateNotificationsFeed();\n }\n\n private async updateNotificationsFeed() {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.publish(\n NotificationsFeedEventsEnum.PENDING_TRANSACTIONS_UPDATE,\n this.data.pendingTransactions\n );\n\n this.eventBus.publish(\n NotificationsFeedEventsEnum.TRANSACTIONS_HISTORY_UPDATE,\n this.data.historicTransactions\n );\n }\n}\n", "import { UITagsEnum } from 'constants/UITags.enum';\nimport { MvxToastList } from 'lib/sdkDappUi';\nimport { NotificationsFeedManager } from 'managers/NotificationsFeedManager/NotificationsFeedManager';\nimport type { CustomToastType } from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { IEventBus } from 'types/manager.types';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { ComponentFactory } from 'utils/ComponentFactory';\nimport { ToastEventsEnum } from './types';\nimport type { ITransactionToast } from './types';\n\ntype OnCloseToastType = (toastId: string) => boolean;\ntype StoreObjectType = ReturnType<typeof getStore>;\n\nexport class ToastUICoordinator {\n private toastsElement: MvxToastList | null = null;\n private eventBus: IEventBus<\n ITransactionToast[] | CustomToastType[] | null\n > | null = null;\n private isCreatingElement = false;\n private eventBusUnsubscribeFunctions: (() => void)[] = [];\n private readonly notificationsFeedManager: NotificationsFeedManager;\n private readonly store: StoreObjectType;\n private readonly onCloseToast: OnCloseToastType;\n\n constructor(props: {\n onCloseToast: OnCloseToastType;\n store?: StoreObjectType;\n notificationsFeedManager?: NotificationsFeedManager;\n }) {\n this.onCloseToast = props.onCloseToast;\n this.store = props.store || getStore();\n this.notificationsFeedManager =\n props.notificationsFeedManager || NotificationsFeedManager.getInstance();\n }\n\n public async init() {\n await this.subscribeToEventBusNotifications();\n }\n\n public showToasts() {\n this.eventBus?.publish(ToastEventsEnum.SHOW, null);\n }\n\n public hideToasts() {\n this.eventBus?.publish(ToastEventsEnum.HIDE, null);\n }\n\n public async publishTransactionToasts(toasts: ITransactionToast[]) {\n if (\n this.notificationsFeedManager.isNotificationsFeedOpen() &&\n this.eventBus\n ) {\n this.eventBus.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n toasts\n );\n this.hideToasts();\n return;\n }\n\n if (!this.eventBus) {\n const toastsElement = await this.createToastListElement();\n if (!toastsElement) {\n return;\n }\n this.eventBus = await toastsElement.getEventBus();\n }\n\n this.eventBus?.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n toasts\n );\n }\n\n public async publishCustomToasts(customToasts: CustomToastType[]) {\n this.eventBus?.publish(\n ToastEventsEnum.CUSTOM_TOAST_DATA_UPDATE,\n customToasts\n );\n }\n\n private handleOpenNotificationsFeed() {\n this.notificationsFeedManager.openNotificationsFeed();\n }\n\n public destroy() {\n this.eventBusUnsubscribeFunctions.forEach((unsubscribe) => unsubscribe());\n this.eventBusUnsubscribeFunctions = [];\n this.notificationsFeedManager?.destroy();\n }\n\n private async createToastListElement(): Promise<MvxToastList | null> {\n if (this.toastsElement) {\n return this.toastsElement;\n }\n\n if (!this.isCreatingElement) {\n this.isCreatingElement = true;\n this.toastsElement = await ComponentFactory.create<MvxToastList>({\n name: UITagsEnum.TOAST_LIST\n });\n this.isCreatingElement = false;\n }\n\n return this.toastsElement;\n }\n\n private async subscribeToEventBusNotifications() {\n const toastsElement = await this.createToastListElement();\n\n if (!toastsElement) {\n return;\n }\n\n this.eventBus = await toastsElement.getEventBus();\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n this.eventBus.subscribe(ToastEventsEnum.CLOSE, this.onCloseToast);\n\n this.eventBusUnsubscribeFunctions.push(() => {\n this.eventBus?.unsubscribe(ToastEventsEnum.CLOSE, this.onCloseToast);\n });\n\n this.eventBus.subscribe(\n ToastEventsEnum.OPEN_NOTIFICATIONS_FEED,\n this.handleOpenNotificationsFeed.bind(this)\n );\n\n this.eventBusUnsubscribeFunctions.push(() => {\n this.eventBus?.unsubscribe(\n ToastEventsEnum.OPEN_NOTIFICATIONS_FEED,\n this.handleOpenNotificationsFeed.bind(this)\n );\n });\n }\n}\n", "import { getTransactionsByHashes } from 'apiCalls/transactions/getTransactionsByHashes';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { updateSessionStatus } from 'store/actions/transactions/transactionsActions';\nimport { getState } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { SignedTransactionType } from 'types/transactions.types';\n\nimport { refreshAccount } from 'utils';\nimport { getPendingTransactions } from '../getPendingTransactions';\nimport { runTransactionStatusUpdate } from './helpers/runTransactionStatusUpdate';\n\nexport interface TransactionStatusTrackerPropsType {\n sessionId: string;\n transactionBatch: SignedTransactionType[];\n isSequential?: boolean;\n}\n\nexport async function checkBatch({\n sessionId,\n transactionBatch: transactions,\n isSequential\n}: TransactionStatusTrackerPropsType) {\n try {\n if (transactions == null) {\n return;\n }\n\n const isLoggedIn = getIsLoggedIn();\n\n const pendingTransactions = getPendingTransactions(transactions);\n\n const serverTransactions =\n await getTransactionsByHashes(pendingTransactions);\n\n for (const serverTransaction of serverTransactions) {\n await runTransactionStatusUpdate({\n serverTransaction,\n sessionId,\n isSequential\n });\n }\n\n const hasCompleted = serverTransactions.every(\n (tx) => tx.status !== TransactionServerStatusesEnum.pending\n );\n\n if (!hasCompleted) {\n return;\n }\n\n if (isLoggedIn) {\n await refreshAccount();\n }\n\n // Call the onSuccess or onFail callback only if the transactions are sent normally (not using batch transactions mechanism).\n // The batch transactions mechanism will call the callbacks separately.\n\n const { transactions: sessions } = getState();\n const session = sessions?.[sessionId];\n\n const isSuccessful = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.success\n );\n\n if (isSuccessful) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.success\n });\n }\n\n const isFailed = session.transactions.some(\n (tx) => tx.status === TransactionServerStatusesEnum.fail\n );\n\n if (isFailed) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.fail\n });\n }\n\n const isInvalid = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.notExecuted\n );\n\n if (isInvalid) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.invalid\n });\n }\n } catch (error) {\n console.error(error);\n }\n}\n", "import { pendingTransactionsSessionsSelector } from 'store/selectors/transactionsSelector';\nimport { getState } from 'store/store';\nimport { checkBatch } from './helpers/checkBatch';\n\nexport async function checkTransactionStatus() {\n const pendingSessions = pendingTransactionsSessionsSelector(getState());\n\n const entries = Object.entries(pendingSessions);\n if (entries.length === 0) {\n return;\n }\n\n await Promise.all(\n entries.map(([sessionId, { transactions }]) =>\n checkBatch({\n sessionId,\n transactionBatch: transactions\n })\n )\n );\n}\n", "import { subscriptions } from 'constants/storage.constants';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { websocketEventSelector } from 'store/selectors/accountSelectors';\nimport { getStore } from 'store/store';\nimport { SubscriptionsEnum } from 'types/subscriptions.type';\nimport { checkTransactionStatus } from './helpers/checkTransactionStatus';\nimport { getPollingInterval } from './helpers/getPollingInterval';\n\n/**\n * Tracks transactions using websocket or polling\n * @returns stopTransactionsTracking function\n */\nexport async function trackTransactions(): Promise<{\n stopTransactionsTracking: () => void;\n}> {\n const store = getStore();\n const pollingInterval = getPollingInterval();\n let pollingIntervalRef: ReturnType<typeof setTimeout> | null = null;\n let timestamp = websocketEventSelector(store.getState())?.timestamp ?? null;\n\n const recheckStatus = async (): Promise<void> => {\n try {\n await checkTransactionStatus();\n } catch (error) {\n console.error(\n '[trackTransactions] Error checking transaction status:',\n error\n );\n }\n };\n\n const startPolling = (): void => {\n // Prevent multiple polling intervals\n if (pollingIntervalRef) {\n return;\n }\n pollingIntervalRef = setInterval(recheckStatus, pollingInterval);\n };\n\n const stopPolling = (): void => {\n if (pollingIntervalRef) {\n clearInterval(pollingIntervalRef);\n pollingIntervalRef = null;\n }\n };\n\n const setupWebSocketTracking = (): void => {\n stopPolling();\n const unsubscribeWebsocketEvent = store.subscribe(\n ({ account: { websocketEvent } }) => {\n if (\n websocketEvent?.message &&\n websocketEvent.timestamp != null &&\n timestamp !== websocketEvent.timestamp\n ) {\n timestamp = websocketEvent.timestamp;\n recheckStatus();\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketEventReceived,\n unsubscribeWebsocketEvent\n );\n };\n\n // Initial execution\n recheckStatus();\n\n const stopTransactionsTracking = (): void => {\n stopPolling();\n };\n\n const unsubscribeWebsocketStatus = store.subscribe(\n ({ account: { address }, config: { websocketStatus } }, prevState) => {\n const hasStatusChange =\n prevState.config.websocketStatus !== websocketStatus;\n\n if (!hasStatusChange) {\n return;\n }\n\n switch (websocketStatus) {\n case WebsocketConnectionStatusEnum.COMPLETED:\n setupWebSocketTracking();\n break;\n case WebsocketConnectionStatusEnum.PENDING:\n startPolling();\n break;\n default:\n address ? startPolling() : stopTransactionsTracking();\n break;\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketStatusChanged,\n unsubscribeWebsocketStatus\n );\n return { stopTransactionsTracking };\n}\n", "import { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { setGasStationMetadata } from 'methods/initApp/gasStationMetadata/setGasStationMetadata';\nimport { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { loginAction } from 'store/actions';\nimport { setAccount } from 'store/actions/account';\nimport { AccountType } from 'types/account.types';\nimport { fetchAccount } from 'utils/account/fetchAccount';\nimport { trimUsernameDomain } from 'utils/account/trimUsernameDomain';\n\ninterface IAccountLoginProps {\n address: string;\n provider: IProvider;\n apiAddress: string;\n}\n\nexport async function accountLogin({\n address,\n provider,\n apiAddress\n}: IAccountLoginProps) {\n const account = await fetchAccount({\n address,\n baseURL: apiAddress\n });\n\n if (!account) {\n throw new Error('Account not found');\n }\n\n loginAction({\n address,\n providerType: provider.getType()\n });\n\n const newAccount: AccountType = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(newAccount);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n if (account.shard != null) {\n await setGasStationMetadata({\n shard: Number(account.shard),\n apiAddress\n });\n }\n}\n", "import { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuth } from 'services/nativeAuth';\nimport { decodeNativeAuthToken } from 'services/nativeAuth/helpers/decodeNativeAuthToken';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { setTokenLogin } from 'store/actions/loginInfo/loginInfoActions';\nimport { accountLogin } from './accountLogin';\nimport { extractAddressFromToken } from './extractAddressFromToken';\nimport { getMultisigLoginToken } from './getMultisigLoginToken';\n\nexport async function loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token\n}: {\n provider: IProvider;\n nativeAuthConfig: NativeAuthConfigType;\n token?: string;\n}) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n const nativeAuthClient = nativeAuth(nativeAuthConfig);\n let loginToken = token;\n\n if (!loginToken) {\n loginToken = await nativeAuthClient.initialize({\n noCache: true\n });\n }\n\n const loginData = await provider.login({\n token: loginToken\n });\n\n const { address, signature, ...loginResult } = loginData;\n\n if (!address) {\n console.warn('Login cancelled.');\n return null;\n }\n\n if (!signature) {\n console.error('Failed to sign login token');\n return null;\n }\n\n // nativeAuthToken received from hub login\n const decodedToken = decodeNativeAuthToken(loginResult?.accessToken);\n\n const usedLoginToken = await getMultisigLoginToken({\n loginData,\n nativeAuthConfig,\n loginToken\n });\n\n const nativeAuthToken = decodedToken\n ? loginResult.accessToken\n : nativeAuthClient.getToken({\n address,\n token: usedLoginToken,\n signature\n });\n\n setTokenLogin({\n loginToken,\n signature,\n nativeAuthToken\n });\n\n const extractedAddress = await extractAddressFromToken({\n loginToken,\n extraInfoData: {\n multisig: loginResult?.multisig,\n impersonate: loginResult?.impersonate\n },\n address\n });\n\n await accountLogin({\n address: extractedAddress,\n provider,\n apiAddress\n });\n\n return {\n address: extractedAddress,\n signature\n };\n}\n", "import { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { accountLogin } from './accountLogin';\n\nexport async function loginWithoutNativeToken(provider: IProvider) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n await provider.login();\n\n const address = await provider.getAddress();\n\n if (!address) {\n throw new Error('Address not found');\n }\n\n await accountLogin({ address, provider, apiAddress });\n\n return {\n address\n };\n}\n", "import { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuthConfigSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport { loginWithNativeToken } from './helpers/loginWithNativeToken';\nimport { loginWithoutNativeToken } from './helpers/loginWithoutNativeToken';\n\nexport async function login(\n provider: IProvider,\n options?: { token?: string }\n): Promise<{\n address: string;\n signature: string;\n} | null> {\n const nativeAuthConfig = nativeAuthConfigSelector(getState());\n\n if (nativeAuthConfig) {\n const data = await loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token: options?.token\n });\n return data;\n }\n\n const { address } = await loginWithoutNativeToken(provider);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n return { address, signature: '' };\n}\n", "import {\n CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n CANCEL_TRANSACTION_TOAST_ID,\n ERROR_SIGNING_TOAST_ID\n} from 'constants/transactions.constants';\nimport { createCustomToast } from 'store/actions';\nimport {\n IconNamesEnum,\n SigningErrorsEnum,\n SigningWarningsEnum\n} from 'types/enums.types';\n\nconst states = {\n error: {\n title: SigningErrorsEnum.errorSigning.toString(),\n iconClassName: 'danger',\n toastId: `${ERROR_SIGNING_TOAST_ID}-${Date.now()}`\n },\n warning: {\n title: SigningWarningsEnum.cancelled.toString(),\n iconClassName: 'warning',\n toastId: `${CANCEL_TRANSACTION_TOAST_ID}-${Date.now()}`\n }\n};\n\nconst errorsMap = {\n extensionResponse: 'Unable to sign transactions', // extension\n 'Transaction canceled': 'Transaction canceled', // web wallet\n 'cancelled by user': 'Transaction signing cancelled by user', // custom\n 'denied by the user': 'Transaction signing denied by the user' // ledger\n};\n\nconst getUserError = (error: string) => {\n for (const [key, value] of Object.entries(errorsMap)) {\n if (error.includes(key)) {\n return value;\n }\n }\n return SigningErrorsEnum.errorSigning;\n};\n\nexport function handleSignError(\n error: unknown,\n type: 'error' | 'warning' = 'error'\n) {\n const originalError = (error as Error)?.message;\n const errorMessage = getUserError(originalError);\n\n const isKnownError = errorMessage !== SigningErrorsEnum.errorSigning;\n\n const errorType = isKnownError ? 'warning' : type;\n\n const state = Object.keys(states).includes(errorType)\n ? states[errorType]\n : states.error;\n\n const { toastId, iconClassName, title } = state;\n\n createCustomToast({\n toastId,\n duration: CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n icon: IconNamesEnum.close,\n iconClassName,\n message: errorMessage,\n title\n });\n\n return errorMessage;\n}\n", "import {\n Address,\n Transaction,\n TransactionOptions,\n TransactionVersion\n} from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport {\n IProvider,\n ProviderTypeEnum\n} from 'providers/types/providerFactory.types';\nimport { setAccountNonce } from 'store/actions';\nimport { refreshAccount } from 'utils';\nimport { computeNonces } from '../computeNonces/computeNonces';\n\nexport type SignTransactionsOptionsType = {\n skipGuardian?: boolean;\n};\n\ntype SignTransactionsType = {\n provider: IProvider;\n transactions: Transaction[];\n options?: SignTransactionsOptionsType;\n};\n\nexport async function signTransactionsWithProvider({\n provider,\n transactions,\n options = {}\n}: SignTransactionsType): Promise<Transaction[]> {\n await refreshAccount();\n const { isGuarded, activeGuardianAddress, nonce } = getAccount();\n const isLedger = provider.getType() === ProviderTypeEnum.ledger;\n\n const transactionsWithComputedNonce = computeNonces({\n latestNonce: nonce,\n transactions\n });\n\n const transactionsToSign =\n activeGuardianAddress && isGuarded && !options.skipGuardian\n ? transactionsWithComputedNonce?.map((transaction) => {\n transaction.version = TransactionVersion.withTxOptions().valueOf();\n transaction.options = TransactionOptions.withOptions({\n guarded: true,\n ...(isLedger ? { hashSign: true } : {})\n }).valueOf();\n\n transaction.guardian = Address.newFromBech32(activeGuardianAddress);\n\n return transaction;\n })\n : transactionsWithComputedNonce;\n\n const signedTransactions: Transaction[] =\n (await provider.signTransactions(transactionsToSign)) ?? [];\n\n setAccountNonce(nonce + signedTransactions.length);\n\n return signedTransactions;\n}\n", "import { Message, Transaction } from 'lib/sdkCore';\nimport { LogoutManager } from 'managers/LogoutManager/LogoutManager';\nimport { setAccountProvider } from 'providers/helpers/accountProvider';\nimport { setProviderType } from 'store/actions/loginInfo/loginInfoActions';\nimport { IProvider } from '../types/providerFactory.types';\nimport { login } from './helpers/login/login';\nimport { logout } from './helpers/logout/logout';\nimport { handleSignError } from './helpers/signErrors/handleSignError';\nimport { signMessageWithProvider } from './helpers/signMessage/signMessageWithProvider';\nimport {\n verifyMessage,\n VerifyMessageReturnType\n} from './helpers/signMessage/verifyMessage';\nimport {\n signTransactionsWithProvider,\n SignTransactionsOptionsType\n} from './helpers/signTransactions/signTransactionsWithProvider';\n\nexport class DappProvider {\n private provider: IProvider;\n private _isLoggingOut = false;\n\n constructor(provider: IProvider) {\n this.provider = provider;\n }\n\n init(): Promise<boolean> {\n return this.provider.init();\n }\n\n async login(options?: { token?: string }) {\n const data = await login(this.provider, options);\n setProviderType(this.provider.getType());\n setAccountProvider(this);\n LogoutManager.getInstance().init();\n return data;\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n async logout(\n options = {\n shouldBroadcastLogoutAcrossTabs: true\n }\n ): Promise<boolean> {\n if (this._isLoggingOut) {\n console.warn('Logout already in progress');\n return false;\n }\n\n this._isLoggingOut = true;\n\n const isLoggedOut = await logout({ provider: this.provider, options });\n\n this._isLoggingOut = false;\n\n return isLoggedOut;\n }\n\n getType() {\n return this.provider.getType();\n }\n\n /**\n * @returns The original provider instance.\n */\n getProvider() {\n return this.provider;\n }\n\n async signTransactions(\n transactions: Transaction[],\n options?: SignTransactionsOptionsType\n ): Promise<Transaction[]> {\n try {\n const signedTransactions = await signTransactionsWithProvider({\n provider: this.provider,\n transactions,\n options\n });\n return signedTransactions;\n } catch (error) {\n const errorMessage = handleSignError(error);\n throw new Error(errorMessage);\n }\n }\n\n async signMessage(\n message: Message,\n options?: {\n hasConsentPopup?: boolean;\n }\n ): Promise<Message | null> {\n try {\n const signedMessage = await signMessageWithProvider({\n provider: this.provider,\n message,\n options\n });\n return signedMessage;\n } catch (error) {\n const errorMessage = handleSignError(error, 'warning');\n throw new Error(errorMessage);\n }\n }\n\n /**\n * @param signedMessage - The signed message to verify in form of a JSON string with `address`, `message` and `signature` properties.\n * @returns The verification result with `isVerified`, `message` and `address` properties.\n */\n async verifyMessage(signedMessage: string): Promise<VerifyMessageReturnType> {\n return await verifyMessage(signedMessage);\n }\n\n cancelLogin(): void {\n this.provider.cancelLogin?.();\n }\n}\n", "import { IProvider } from 'providers/types/providerFactory.types';\nimport { DappProvider } from '../DappProvider';\nimport { emptyProvider } from './emptyProvider';\n\nexport type ProvidersType = IProvider;\n\nlet accountProvider: DappProvider | null = null;\n\nexport function setAccountProvider<TProvider extends DappProvider | null>(\n provider: TProvider\n) {\n accountProvider = provider;\n}\n\nexport function getAccountProvider(): DappProvider {\n return accountProvider || new DappProvider(emptyProvider);\n}\n", "import { getAddress } from 'methods/account/getAddress';\nimport { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { setAccount } from 'store/actions';\nimport { fetchAccount } from './fetchAccount';\nimport { trimUsernameDomain } from './trimUsernameDomain';\n\nconst setNewAccount = async () => {\n try {\n const address = getAddress();\n const { network } = getNetworkConfig();\n\n try {\n const account = await fetchAccount({\n address,\n baseURL: network.apiAddress\n });\n\n if (account != null) {\n const accountData = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(accountData);\n\n return accountData;\n }\n } catch (e) {\n console.error('Failed getting account ', e);\n }\n } catch (e) {\n console.error('Failed getting address ', e);\n }\n\n return null;\n};\n\nexport async function refreshAccount() {\n const provider = getAccountProvider();\n\n if (provider == null) {\n throw 'Provider not initialized';\n }\n\n try {\n if (!provider.init) {\n throw 'Current provider does not have init() function';\n }\n\n const initialized = await provider.init();\n\n if (!initialized) {\n return;\n }\n\n const account = await setNewAccount();\n\n return account;\n } catch (e) {\n console.error('Failed initializing provider ', e);\n }\n\n return undefined;\n}\n", "import {\n CustomToastType,\n IComponentToast\n} from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { getUnixTimestamp, getUnixTimestampWithAddedMilliseconds } from 'utils';\n\nexport const customToastComponentDictionary: Record<\n string,\n IComponentToast['instantiateToastElement']\n> = {};\nexport const customToastCloseHandlersDictionary: Record<string, () => void> =\n {};\n\nexport const addCustomToast = (\n customToast: CustomToastType,\n currentToastId?: string\n) => {\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.customToasts.length > 0\n ? Math.max(\n ...state.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n const toastId = currentToastId ?? `custom-toast-${lastToastIndex + 1}`;\n\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const newToast: CustomToastType = {\n ...customToast,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = newToast;\n return;\n }\n\n state.customToasts.push({\n ...newToast,\n toastId\n });\n },\n false,\n {\n type: 'addCustomToast',\n // @ts-ignore\n payload: {\n value: { customToast, currentToastId }\n }\n }\n );\n};\n\nexport const removeCustomToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = state.customToasts.filter(\n (toast) => toast.toastId !== toastId\n );\n },\n false,\n {\n type: 'removeCustomToast',\n // @ts-ignore\n payload: {\n value: toastId\n }\n }\n );\n};\n\nexport const removeAllCustomToasts = () => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = [];\n },\n false,\n {\n type: 'removeAllCustomToasts',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n};\n\nexport const removeAllTransactionToasts = () => {\n getStore().setState(({ toasts: state }) => {\n state.transactionToasts = [];\n });\n};\n\nexport const addTransactionToast = ({\n toastId,\n totalDuration\n}: {\n toastId: string;\n totalDuration: number;\n}): string => {\n let newToastId: string = '';\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.transactionToasts.length > 0\n ? Math.max(\n ...state.transactionToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n newToastId = toastId ?? `transaction-toast-${lastToastIndex + 1}`;\n\n state.transactionToasts.push({\n startTime: getUnixTimestamp(),\n endTime: getUnixTimestampWithAddedMilliseconds(totalDuration),\n toastId: newToastId\n });\n },\n false,\n 'addTransactionToast'\n );\n\n return newToastId;\n};\n\nexport const removeTransactionToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.transactionToasts = state.transactionToasts.filter((toast) => {\n return toast.toastId !== toastId;\n });\n },\n false,\n 'removeTransactionToast'\n );\n\n delete customToastCloseHandlersDictionary[toastId];\n delete customToastComponentDictionary[toastId];\n};\n\nexport const createCustomToast = (props: CustomToastType) => {\n const { toasts } = getStore().getState();\n\n const lastToastIndex =\n toasts.customToasts.length > 0\n ? Math.max(\n ...toasts.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n\n const toastId = props.toastId || `custom-toast-${lastToastIndex + 1}`;\n\n if (props.onClose) {\n customToastCloseHandlersDictionary[toastId] = props.onClose;\n }\n\n if (props.instantiateToastElement) {\n customToastComponentDictionary[toastId] = props.instantiateToastElement;\n\n getStore().setState(\n ({ toasts: state }) => {\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const toast: CustomToastType = {\n ...props,\n instantiateToastElement: null,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = toast;\n } else {\n state.customToasts.push(toast);\n }\n },\n false,\n 'createCustomToast'\n );\n\n return toastId;\n }\n\n addCustomToast(props, toastId);\n return toastId;\n};\n"],
|
|
5
|
+
"mappings": "y2DAAA,OAAOA,MAAe,eCAtB,OAAOC,MAAa,iBCUpB,IAAMC,GAAoC,IAE7BC,EAAN,KAAsB,CAK3B,aAAc,CAJd,KAAQ,iBACN,IAAI,IACN,KAAQ,wBAAkCD,GAS1C,KAAO,MAASE,GAAoB,CAGlC,GAFA,KAAK,KAAKA,CAAO,EAEb,KAAK,yBAA2B,EAClC,OAGF,IAAMC,EAAU,WAAW,IAAM,CAC/BC,EAAuBF,C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AAIlB,EAAS,EAAE,SAAS,EAEjCE,EACJgB,EAAO,aAAa,OAAS,EACzB,KAAK,IACH,GAAGA,EAAO,aAAa,IAAKf,GAC1B,SAASA,EAAM,QAAQ,MAAM,GAAG,EAAE,IAAI,GAAK,GAAG,CAChD,CACF,EACA,EAEAC,EAAUa,EAAM,SAAW,gBAAgBf,EAAiB,CAAC,GAMnE,OAJIe,EAAM,UACRrB,EAAmCQ,CAAO,EAAIa,EAAM,SAGlDA,EAAM,yBACRtB,EAA+BS,CAAO,EAAIa,EAAM,wBAEhDjB,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrB,IAAMI,EAAqBJ,EAAM,aAAa,UAC3CE,GAAUA,EAAM,UAAYC,CAC/B,EAEMD,EAAyB,CAC7B,GAAGc,EACH,wBAAyB,KACzB,QAAAb,CACF,EAEqBC,IAAuB,GAG1CJ,EAAM,aAAaI,CAAkB,EAAIF,EAEzCF,EAAM,aAAa,KAAKE,CAAK,CAEjC,EACA,GACA,mBACF,EAEOC,IAGTP,GAAeoB,EAAOb,CAAO,EACtBA,EACT",
|
|
6
6
|
"names": ["BigNumber", "isEqual", "DEFAULT_SUCCESSFUL_TOAST_LIFETIME", "LifetimeManager", "toastId", "timeout", "removeTransactionToast", "duration", "removeCustomToast", "handleClose", "customToastCloseHandlersDictionary", "successfulToastLifetime", "interval", "isEqual", "NOTIFICATIONS_FEED_STORE_SUBSCRIBE", "NotificationsFeedManager", "_NotificationsFeedManager", "SidePanelBaseManager", "store", "getStore", "ToastManager", "storeToastsUnsubscribe", "toasts", "transactions", "prevToasts", "prevTransactions", "isEqual", "toastManager", "pendingTransactionToasts", "createToastsFromTransactions", "transactionsSessions", "acc", "key", "TransactionsHistoryController", "clearCompletedTransactions", "ToastUICoordinator", "props", "getStore", "NotificationsFeedManager", "toasts", "toastsElement", "customToasts", "unsubscribe", "ComponentFactory", "ToastManager", "_ToastManager", "props", "getStore", "LifetimeManager", "ToastUICoordinator", "successfulToastLifetime", "toasts", "transactions", "prevToasts", "prevTransactions", "newToastsWereCreated", "isEqual", "checkBatchHasNewData", "toastId", "transaction", "status", "isTimedOut", "getIsTransactionTimedOut", "isFailed", "getIsTransactionFailed", "isSuccessful", "getIsTransactionSuccessful", "isCompleted", "totalDuration", "newToastId", "addTransactionToast", "toast", "createCustomToast", "store", "toastList", "pendingTransactionToasts", "completedTransactionToasts", "createToastsFromTransactions", "newToast", "customToastComponentDictionary", "removeTransactionToast", "handleClose", "customToastCloseHandlersDictionary", "removeCustomToast", "removeAllCustomToasts", "LogoutManager", "_LogoutManager", "getStore", "state", "tokenLogin", "tokenLoginSelector", "isNativeAuthTokenExpired", "getTokenExpiration", "getAccountProvider", "isLoggedIn", "isLoggedInSelector", "provider", "address", "addressSelector", "isWebviewLogin", "ProviderTypeEnum", "secondsUntilExpires", "expiresAt", "secondsUntilExpiresBN", "BigNumber", "plannedLogoutKey", "plannedLogoutSet", "millisecondsUntilLogout", "ToastManager", "nativeAuthConfig", "nativeAuthConfigSelector", "logoutWarningOffsetMilliseconds", "millisecondsUntilLogoutWarning", "readableMinutesUntilLogout", "getHumanReadableTokenExpirationTime", "timeoutUntilLogoutWarning", "checkBatch", "sessionId", "transactions", "isSequential", "isLoggedIn", "getIsLoggedIn", "pendingTransactions", "getPendingTransactions", "serverTransactions", "getTransactionsByHashes", "serverTransaction", "runTransactionStatusUpdate", "tx", "refreshAccount", "sessions", "getState", "session", "updateSessionStatus", "error", "checkTransactionStatus", "pendingSessions", "pendingTransactionsSessionsSelector", "getState", "entries", "sessionId", "transactions", "checkBatch", "trackTransactions", "store", "getStore", "pollingInterval", "getPollingInterval", "pollingIntervalRef", "timestamp", "websocketEventSelector", "recheckStatus", "checkTransactionStatus", "error", "startPolling", "stopPolling", "setupWebSocketTracking", "unsubscribeWebsocketEvent", "websocketEvent", "subscriptions", "stopTransactionsTracking", "unsubscribeWebsocketStatus", "address", "websocketStatus", "prevState", "accountLogin", "address", "provider", "apiAddress", "account", "fetchAccount", "loginAction", "newAccount", "trimUsernameDomain", "getLatestNonce", "setAccount", "registerWebsocketListener", "trackTransactions", "setGasStationMetadata", "loginWithNativeToken", "provider", "nativeAuthConfig", "token", "apiAddress", "getNetworkConfig", "nativeAuthClient", "nativeAuth", "loginToken", "loginData", "address", "signature", "loginResult", "decodedToken", "decodeNativeAuthToken", "usedLoginToken", "getMultisigLoginToken", "nativeAuthToken", "setTokenLogin", "extractedAddress", "extractAddressFromToken", "accountLogin", "loginWithoutNativeToken", "provider", "apiAddress", "getNetworkConfig", "address", "accountLogin", "login", "provider", "options", "nativeAuthConfig", "nativeAuthConfigSelector", "getState", "loginWithNativeToken", "address", "loginWithoutNativeToken", "registerWebsocketListener", "trackTransactions", "states", "ERROR_SIGNING_TOAST_ID", "CANCEL_TRANSACTION_TOAST_ID", "errorsMap", "getUserError", "error", "key", "value", "handleSignError", "type", "originalError", "errorMessage", "errorType", "state", "toastId", "iconClassName", "title", "createCustomToast", "signTransactionsWithProvider", "provider", "transactions", "options", "refreshAccount", "isGuarded", "activeGuardianAddress", "nonce", "getAccount", "isLedger", "ProviderTypeEnum", "transactionsWithComputedNonce", "computeNonces", "transactionsToSign", "transaction", "TransactionVersion", "TransactionOptions", "Address", "signedTransactions", "setAccountNonce", "DappProvider", "provider", "options", "data", "login", "setProviderType", "setAccountProvider", "LogoutManager", "isLoggedOut", "logout", "transactions", "signTransactionsWithProvider", "error", "errorMessage", "handleSignError", "message", "signMessageWithProvider", "signedMessage", "verifyMessage", "accountProvider", "setAccountProvider", "provider", "getAccountProvider", "DappProvider", "emptyProvider", "setNewAccount", "address", "getAddress", "network", "getNetworkConfig", "account", "fetchAccount", "accountData", "trimUsernameDomain", "getLatestNonce", "setAccount", "e", "refreshAccount", "provider", "getAccountProvider", "customToastComponentDictionary", "customToastCloseHandlersDictionary", "addCustomToast", "customToast", "currentToastId", "getStore", "state", "lastToastIndex", "toast", "toastId", "existingToastIndex", "newToast", "removeCustomToast", "removeAllCustomToasts", "removeAllTransactionToasts", "addTransactionToast", "totalDuration", "newToastId", "getUnixTimestamp", "getUnixTimestampWithAddedMilliseconds", "removeTransactionToast", "createCustomToast", "props", "toasts"]
|
|
7
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-CUDPQDXY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-3CG4C7T4.mjs";import a from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(a(t))return[];let i=s(t);return r({transactions:i})};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CVXQYCEE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as n,q as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as n,q as o}from"./chunk-XNSSZDSU.mjs";import{c as p}from"./chunk-NTEMINYA.mjs";var s=()=>o().setState(n),l=({address:e,providerType:t})=>{o().setState(({account:r,loginInfo:i})=>{r.address=e,r.publicKey=new p(e).toHex(),i&&(i.providerType=t)},!1,{type:"loginAction",payload:{value:{address:e,providerType:t}}})};export{s as a,l as b};
|
|
2
|
+
//# sourceMappingURL=chunk-CXAX5TAG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-XNSSZDSU.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-D3VRMBRS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-XDBKPKTG.mjs";import{a as h}from"./chunk-E77ZH5JT.mjs";import{a as g}from"./chunk-OAPLU7UX.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-DW6RO5LJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-JDP24JPD.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-E77ZH5JT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as T}from"./chunk-V4YC4AKQ.mjs";import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as T}from"./chunk-V4YC4AKQ.mjs";import{a as p}from"./chunk-UCFMVEOZ.mjs";import{b as m}from"./chunk-ZS4EBCWC.mjs";import{a as k}from"./chunk-B72JAXSF.mjs";import{a as g}from"./chunk-6GREKTLP.mjs";import{a as f}from"./chunk-ZJ2WPN2K.mjs";import{a as d}from"./chunk-HS34AFHY.mjs";import{a as s}from"./chunk-B3IKUIRK.mjs";import{a as r}from"./chunk-YJCTRUJT.mjs";import{a as t}from"./chunk-QNELH2S2.mjs";import{a}from"./chunk-7UA7QAEF.mjs";function z({transaction:e,address:h,explorerAddress:o}){let y=e.tokenIdentifier??m(e.data).tokenId,n=d(e),u=f(e),l={timeAgo:c(e.timestamp*1e3,!0),tooltip:s({value:e.timestamp,noSeconds:!1,utc:!0})},v=k({address:h,transaction:e,receiver:n}),I={actionDescription:e.action?.description,name:T(e)},S=g(e),D=r({explorerAddress:o,to:t.accountDetails(e.sender)}),L=r({explorerAddress:o,to:t.accountDetails(n)}),A=r({explorerAddress:o,to:t.senderShard(e.senderShard)}),H=r({explorerAddress:o,to:t.receiverShard(e.receiverShard)}),i=e.originalTxHash||e.txHash,x=r({explorerAddress:o,to:t.transactionDetails(i)});return{...e,txHash:i,tokenIdentifier:y,receiver:n,receiverAssets:u,transactionDetails:{age:l,direction:v,method:I,iconInfo:p(e),transactionTokens:S,isContract:a(e.sender)},links:{senderLink:D,receiverLink:L,senderShardLink:A,receiverShardLink:H,transactionLink:x}}}export{z as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EKWN4V73.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk-3GGBXXXJ.mjs";import{a as c}from"./chunk-N56SMVGU.mjs";import{a as e}from"./chunk-2JKCBTYK.mjs";import{k as n}from"./chunk-PKDR5ERF.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${e}/${r}?withGuardianInfo=true`;return c.get(s,{baseURL:t,timeout:n})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
|
|
2
|
+
//# sourceMappingURL=chunk-EPL2CHU6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-ZATPIKZ2.mjs";import{j as p,k as d,l as f,n as u}from"./chunk-E2GGD7D4.mjs";import{a as I}from"./chunk-XXV6KGR4.mjs";import{a as m}from"./chunk-NGM3AVCY.mjs";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-ZATPIKZ2.mjs";import{j as p,k as d,l as f,n as u}from"./chunk-E2GGD7D4.mjs";import{a as I}from"./chunk-XXV6KGR4.mjs";import{a as m}from"./chunk-NGM3AVCY.mjs";import{a as l}from"./chunk-3CG4C7T4.mjs";import{s as T}from"./chunk-XNSSZDSU.mjs";import{c}from"./chunk-7MBSWJUD.mjs";async function G(g){let s=g?.store??T(),n=[],a=[],y=I(s),F=m(s),C=c(s);for(let o of y.transactionToasts){let r=F[o.toastId];if(!r?.status)continue;let{status:t,transactions:P,transactionsDisplayInfo:h}=r,L=await l({transactions:P,store:s}),O=u(t),R=f(t),v=d(t),e=O||R||v,w=p(t),{startTime:x,endTime:D}=o;if(e&&a.some(b=>b.toastId===o.toastId))continue;let i=S({toastId:o.toastId,address:C,status:t,transactions:L,transactionsDisplayInfo:h,startTime:x,endTime:D});e&&a.push(i),w&&n.push(i)}return{pendingTransactionToasts:n,completedTransactionToasts:a}}export{G as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FF45FPD3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as t}from"./chunk-XNSSZDSU.mjs";var r=({key:e,value:a})=>{t().setState(({cache:c})=>{c[e]=a},!1,{type:"saveToCache",payload:{value:a}})},s=e=>{t().setState(({cache:a})=>{delete a[e]},!1,{type:"removeFromCache",payload:{value:e}})},h=()=>{t().setState(({cache:e})=>{Object.keys(e).forEach(a=>{delete e[a]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-FNHO66WN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-TX7PTLVP.mjs";import{b as T}from"./chunk-6UMOECOW.mjs";import{a as u}from"./chunk-UCNS6KD5.mjs";import I from"lodash.startcase";import C from"lodash.uniq";var M=(e=>(e.mex="mex",e.stake="stake",e))(M||{}),R=({currentUserAddress:g,transaction:t,egldLabel:e,isPending:A=!1})=>{if(A)return{name:"Pending..."};let l={},y=Object.entries(T).reduce((s,[x,D])=>Object.assign(s,{[x]:D}),l),n=t.action,r=n&&n.arguments,i=n&&n.category?n.category:null,b=r&&n.name==="transfer",a=r&&Array.isArray(r.transfers)?r.transfers:[],c=a.map(s=>s.type),[m]=C(c),L=e??"EGLD",p=d({transaction:t,transferType:m,currentUserAddress:g}),E=u({allTransferTypes:c,transferType:m,transactionTransfers:a}),h=i&&["mex","stake"].includes(i),o=n&&h?n.description:void 0,f=t.function&&t.function!=="transfer"?y[t.function]??I(t.function):null;return b&&r?{name:`${p} ${E}`,description:o}:f?{name:f,description:o}:{name:`${p} ${L}`,description:o}};export{M as a,R as b};
|
|
2
|
+
//# sourceMappingURL=chunk-G5N56FHJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-GBEJIZDR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-GEB2W7CV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-WEZV6U4A.mjs";import{a as o}from"./chunk-LJX4MW7B.mjs";import{a as e,b as t}from"./chunk-URTM5OGN.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HBPQEY3L.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-3IYTFWEN.mjs";import{a as n}from"./chunk-3FXHIV6O.mjs";import{c as a,f as o}from"./chunk-PJWJZHIS.mjs";var k=u=>{let i=u.map(e=>{let{isNft:l}=n(e.type);if(l){let{badgeText:t,tokenFormattedAmount:p,tokenLinkText:T}=r({token:e});return`${t!=null?`(${t}) `:""}${p} ${T}`}let m=e.value?o({input:e.value,decimals:e.decimals??a,digits:2,addCommas:!0}):null,d=e.collection?e.identifier:e.token;return`${m} ${e.ticker} (${d})`});return decodeURI(i.join("%0A"))};export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HFX5WAAI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-URTM5OGN.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HUXPA4C2.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-4GCIE2BM.mjs";import{s as e}from"./chunk-XNSSZDSU.mjs";import{b as o}from"./chunk-7VHTZYM2.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-I424CDNL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-TVXZBSUY.mjs";var e={address:"",websocketEvent:null,websocketBatchEvent:null,accounts:{"":t},ledgerAccount:null,publicKey:"",walletConnectAccount:null};function c(){return()=>e}var n=c();export{e as a,n as b};
|
|
2
|
+
//# sourceMappingURL=chunk-IVHD32VC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as t}from"./chunk-2JKCBTYK.mjs";import s from"axios";async function m(e){let r=`${e}/${t}`;try{let{data:o}=await s.get(r);if(o!=null){let n="egldDenomination";if(n in o){let{[n]:i,decimals:a,...c}=o;return{...c,decimals:i,digits:a}}return o}}catch{console.error("error fetching configuration for ",r)}return null}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IWP36NOU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{z as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{z as n}from"./chunk-C72ZHRFA.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IYM4ZX72.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-NGM3AVCY.mjs";import{s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-NGM3AVCY.mjs";import{s}from"./chunk-XNSSZDSU.mjs";import{e as a}from"./chunk-7MBSWJUD.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t,n.nonce,c)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-J5TLE6SA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-XNSSZDSU.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JDP24JPD.mjs.map
|