@multiversx/sdk-dapp 5.0.0-alpha.9 → 5.0.1
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 +78 -39
- package/out/__chunks__/chunk-2A4BH65X.mjs +2 -0
- package/out/__chunks__/chunk-2EV6M7VE.mjs +2 -0
- package/out/__chunks__/{chunk-XDXMB6H5.mjs.map → chunk-2EV6M7VE.mjs.map} +1 -1
- package/out/__chunks__/{chunk-N2V7UF7S.mjs → chunk-2R5LWF2W.mjs} +2 -2
- package/out/__chunks__/{chunk-K3WBBSXJ.mjs → chunk-3AARPJLE.mjs} +2 -2
- package/out/__chunks__/{chunk-Z3IZ47ZD.mjs → chunk-3L3E75PE.mjs} +2 -2
- package/out/__chunks__/chunk-3POGSGSD.mjs +2 -0
- package/out/__chunks__/chunk-3POGSGSD.mjs.map +7 -0
- package/out/__chunks__/{chunk-RUPRP5GS.mjs → chunk-3ZB7JXE7.mjs} +2 -2
- package/out/__chunks__/{chunk-RUPRP5GS.mjs.map → chunk-3ZB7JXE7.mjs.map} +2 -2
- package/out/__chunks__/chunk-3ZEUVYQF.mjs +2 -0
- package/out/__chunks__/chunk-3ZEUVYQF.mjs.map +7 -0
- package/out/__chunks__/{chunk-4PHZ25O4.mjs → chunk-45ZH7OXW.mjs} +2 -2
- package/out/__chunks__/{chunk-XNPY3DUJ.mjs → chunk-4EU55YPS.mjs} +2 -2
- package/out/__chunks__/{chunk-QVQGVVKN.mjs → chunk-4MZZTC2O.mjs} +2 -2
- package/out/__chunks__/chunk-4WAEN6KC.mjs +2 -0
- package/out/__chunks__/chunk-4WAEN6KC.mjs.map +7 -0
- package/out/__chunks__/chunk-5AJYN23S.mjs +2 -0
- package/out/__chunks__/chunk-5HHIOEWB.mjs +2 -0
- package/out/__chunks__/chunk-5HHIOEWB.mjs.map +7 -0
- package/out/__chunks__/{chunk-ZWISUUBJ.mjs → chunk-6AI3AGZ4.mjs} +2 -2
- package/out/__chunks__/chunk-6JM4DPOH.mjs +2 -0
- package/out/__chunks__/{chunk-IEJTMYFW.mjs.map → chunk-6JM4DPOH.mjs.map} +3 -3
- package/out/__chunks__/chunk-6KWXVSHC.mjs +2 -0
- package/out/__chunks__/chunk-6KWXVSHC.mjs.map +7 -0
- package/out/__chunks__/chunk-6LDLCMZI.mjs +2 -0
- package/out/__chunks__/chunk-6UZHM5LW.mjs +2 -0
- package/out/__chunks__/chunk-6UZHM5LW.mjs.map +7 -0
- package/out/__chunks__/chunk-7JIHOTRV.mjs +2 -0
- package/out/__chunks__/chunk-7Q275OU5.mjs +2 -0
- package/out/__chunks__/{chunk-I7BB2JJP.mjs → chunk-7Z3LULCU.mjs} +2 -2
- package/out/__chunks__/chunk-7Z3LULCU.mjs.map +7 -0
- package/out/__chunks__/{chunk-RHFDU5Y4.mjs → chunk-ABHYXD3U.mjs} +2 -2
- package/out/__chunks__/{chunk-ETHHR4HF.mjs → chunk-AG6XMOI3.mjs} +2 -2
- package/out/__chunks__/{chunk-4TSUWSFU.mjs → chunk-AODYWSUW.mjs} +2 -2
- package/out/__chunks__/{chunk-5N755C2P.mjs → chunk-AROH3QTC.mjs} +2 -2
- package/out/__chunks__/chunk-AWX5SSJV.mjs +2 -0
- package/out/__chunks__/{chunk-IMEJ3BE5.mjs.map → chunk-AWX5SSJV.mjs.map} +3 -3
- package/out/__chunks__/{chunk-3OKWBJFM.mjs → chunk-B2RDSGON.mjs} +2 -2
- package/out/__chunks__/{chunk-FMUDQBZE.mjs → chunk-BETSOJFK.mjs} +2 -2
- package/out/__chunks__/chunk-CAA4VJRH.mjs +2 -0
- package/out/__chunks__/{chunk-QD3CFFVT.mjs.map → chunk-CAA4VJRH.mjs.map} +3 -3
- package/out/__chunks__/chunk-CKTFPRJS.mjs +2 -0
- package/out/__chunks__/chunk-CKTFPRJS.mjs.map +7 -0
- package/out/__chunks__/chunk-CSHGMI74.mjs +2 -0
- package/out/__chunks__/chunk-CSHGMI74.mjs.map +7 -0
- package/out/__chunks__/{chunk-N6FJMYEB.mjs → chunk-CSTNJXBE.mjs} +2 -2
- package/out/__chunks__/chunk-CWQ4LFF5.mjs +2 -0
- package/out/__chunks__/chunk-CYCS3K6Q.mjs +2 -0
- package/out/__chunks__/{chunk-SUN3MVLZ.mjs.map → chunk-CYCS3K6Q.mjs.map} +2 -2
- package/out/__chunks__/{chunk-PVEKU2X3.mjs → chunk-EHU5RQBI.mjs} +2 -2
- package/out/__chunks__/{chunk-ST4GGUZM.mjs → chunk-EKQLIEZD.mjs} +2 -2
- package/out/__chunks__/{chunk-QAVA2C6Y.mjs → chunk-EQEYL6AE.mjs} +2 -2
- package/out/__chunks__/{chunk-RIQNG4I7.mjs → chunk-F32BTVEV.mjs} +2 -2
- package/out/__chunks__/chunk-F5V7QBOX.mjs +2 -0
- package/out/__chunks__/chunk-FIKCZQ2J.mjs +2 -0
- package/out/__chunks__/chunk-FIKCZQ2J.mjs.map +7 -0
- package/out/__chunks__/{chunk-A5EXECZV.mjs → chunk-FIVH6RKU.mjs} +2 -2
- package/out/__chunks__/chunk-FMQYLMTU.mjs +2 -0
- package/out/__chunks__/chunk-FMQYLMTU.mjs.map +7 -0
- package/out/__chunks__/{chunk-43DKHDU2.mjs → chunk-FWJIV6IK.mjs} +2 -2
- package/out/__chunks__/chunk-FYSGC7MW.mjs +2 -0
- package/out/__chunks__/chunk-FZUIOPJF.mjs +2 -0
- package/out/__chunks__/{chunk-ZNZKP2Z7.mjs → chunk-GNZBRVMQ.mjs} +2 -2
- package/out/__chunks__/chunk-HCLEWSLP.mjs +2 -0
- package/out/__chunks__/{chunk-45WVS4H5.mjs.map → chunk-HCLEWSLP.mjs.map} +2 -2
- package/out/__chunks__/{chunk-HQSB4ISG.mjs → chunk-HIUWEH2W.mjs} +2 -2
- package/out/__chunks__/{chunk-A64HMPMV.mjs → chunk-HVAT2QP5.mjs} +2 -2
- package/out/__chunks__/{chunk-ZGRKIA6G.mjs → chunk-IAKBA5XK.mjs} +2 -2
- package/out/__chunks__/{chunk-ZGRKIA6G.mjs.map → chunk-IAKBA5XK.mjs.map} +2 -2
- package/out/__chunks__/chunk-IMPOALRX.mjs +2 -0
- package/out/__chunks__/{chunk-RHN3VD44.mjs.map → chunk-IMPOALRX.mjs.map} +2 -2
- package/out/__chunks__/{chunk-RXAVE5OL.mjs → chunk-J66NP5YS.mjs} +2 -2
- package/out/__chunks__/{chunk-RDMU5LTQ.mjs → chunk-JK5DKI6N.mjs} +2 -2
- package/out/__chunks__/chunk-JR23TXKP.mjs +2 -0
- package/out/__chunks__/chunk-JR23TXKP.mjs.map +7 -0
- package/out/__chunks__/chunk-JYG4XQGL.mjs +2 -0
- package/out/__chunks__/chunk-JYG4XQGL.mjs.map +7 -0
- package/out/__chunks__/{chunk-5RVSN75H.mjs → chunk-KGDFAELQ.mjs} +2 -2
- package/out/__chunks__/chunk-KPKKMTAV.mjs +2 -0
- package/out/__chunks__/chunk-KPKKMTAV.mjs.map +7 -0
- package/out/__chunks__/{chunk-EOX35D4L.mjs → chunk-LIPGE2RA.mjs} +2 -2
- package/out/__chunks__/{chunk-YPCJBYUY.mjs → chunk-LUDF7ZUR.mjs} +2 -2
- package/out/__chunks__/chunk-LX6L54F3.mjs +2 -0
- package/out/__chunks__/chunk-LX6L54F3.mjs.map +7 -0
- package/out/__chunks__/chunk-LXGUUE34.mjs +2 -0
- package/out/__chunks__/chunk-LXGUUE34.mjs.map +7 -0
- package/out/__chunks__/{chunk-ITYCILLF.mjs → chunk-MK3PM2DT.mjs} +2 -2
- package/out/__chunks__/chunk-MVWJW7DI.mjs +2 -0
- package/out/__chunks__/chunk-MVWJW7DI.mjs.map +7 -0
- package/out/__chunks__/{chunk-PNT4VF66.mjs → chunk-NV24F4LU.mjs} +2 -2
- package/out/__chunks__/chunk-O2IPPL6D.mjs +2 -0
- package/out/__chunks__/chunk-O75VXVPG.mjs +2 -0
- package/out/__chunks__/{chunk-ZMEIT65B.mjs → chunk-OD4ANAAQ.mjs} +2 -2
- package/out/__chunks__/chunk-OP3F2KDT.mjs +2 -0
- package/out/__chunks__/chunk-OP3F2KDT.mjs.map +7 -0
- package/out/__chunks__/chunk-OPLNE5E4.mjs +2 -0
- package/out/__chunks__/chunk-OZ4ZZI3H.mjs +2 -0
- package/out/__chunks__/{chunk-IEJARRBP.mjs.map → chunk-OZ4ZZI3H.mjs.map} +2 -2
- package/out/__chunks__/{chunk-LDOKRGUQ.mjs → chunk-P36YE74A.mjs} +2 -2
- package/out/__chunks__/{chunk-4OEPT2V4.mjs → chunk-P3BXXGQA.mjs} +2 -2
- package/out/__chunks__/chunk-P6A7X5MA.mjs +2 -0
- package/out/__chunks__/{chunk-5AR7YU5K.mjs → chunk-PJDJEPY2.mjs} +2 -2
- package/out/__chunks__/chunk-PKQWIPKE.mjs +2 -0
- package/out/__chunks__/chunk-PKQWIPKE.mjs.map +7 -0
- package/out/__chunks__/chunk-PY3U6O6G.mjs +2 -0
- package/out/__chunks__/{chunk-DGBTQM4A.mjs → chunk-PYBAW4QY.mjs} +2 -2
- package/out/__chunks__/chunk-QJGFIK7H.mjs +2 -0
- package/out/__chunks__/chunk-QJGFIK7H.mjs.map +7 -0
- package/out/__chunks__/{chunk-YEXBSKXL.mjs → chunk-QWV25ZSJ.mjs} +2 -2
- package/out/__chunks__/{chunk-ZHGCNNB5.mjs → chunk-RM4VHHXR.mjs} +2 -2
- package/out/__chunks__/chunk-RQ6IYTUI.mjs +2 -0
- package/out/__chunks__/chunk-RQ6IYTUI.mjs.map +7 -0
- package/out/__chunks__/{chunk-XW2GCCBZ.mjs → chunk-RRKNYQ6D.mjs} +2 -2
- package/out/__chunks__/chunk-RVO7H26H.mjs +2 -0
- package/out/__chunks__/chunk-RVO7H26H.mjs.map +7 -0
- package/out/__chunks__/chunk-RXQV73QD.mjs +2 -0
- package/out/__chunks__/{chunk-NHXPNROG.mjs → chunk-S2FQWSUO.mjs} +1 -1
- package/out/__chunks__/chunk-S2FQWSUO.mjs.map +7 -0
- package/out/__chunks__/{chunk-426U6FXN.mjs → chunk-SAHYDY7R.mjs} +2 -2
- package/out/__chunks__/{chunk-PRULMJH7.mjs → chunk-T25ZUXIB.mjs} +2 -2
- package/out/__chunks__/{chunk-V6GKT3ZN.mjs → chunk-T2QCATZQ.mjs} +2 -2
- package/out/__chunks__/chunk-T4GLLB7R.mjs +2 -0
- package/out/__chunks__/{chunk-FP2LZG6I.mjs.map → chunk-T4GLLB7R.mjs.map} +1 -1
- package/out/__chunks__/{chunk-JIECCAME.mjs → chunk-TCXS5HPN.mjs} +2 -2
- package/out/__chunks__/{chunk-I7ODJJY3.mjs → chunk-TI73UXGG.mjs} +2 -2
- package/out/__chunks__/chunk-TQA3JDNV.mjs +2 -0
- package/out/__chunks__/chunk-TQA3JDNV.mjs.map +7 -0
- package/out/__chunks__/{chunk-RI7FD4HM.mjs → chunk-TSUMQ3HX.mjs} +2 -2
- package/out/__chunks__/{chunk-RI7FD4HM.mjs.map → chunk-TSUMQ3HX.mjs.map} +1 -1
- package/out/__chunks__/{chunk-P3EYUM5Z.mjs → chunk-U5KZZ3SL.mjs} +2 -2
- package/out/__chunks__/{chunk-SPSO2A53.mjs → chunk-U64LDJTG.mjs} +2 -2
- package/out/__chunks__/{chunk-PCPDM6RD.mjs → chunk-UA3COBIJ.mjs} +2 -2
- package/out/__chunks__/chunk-UAW7SD6P.mjs +2 -0
- package/out/__chunks__/{chunk-AJOTPFJL.mjs → chunk-UUCTTBX3.mjs} +2 -2
- package/out/__chunks__/{chunk-JZLYRNNP.mjs → chunk-V4LGVF2H.mjs} +2 -2
- package/out/__chunks__/chunk-VODKTFMS.mjs +2 -0
- package/out/__chunks__/chunk-VODKTFMS.mjs.map +7 -0
- package/out/__chunks__/chunk-WHEXX3BD.mjs +1 -0
- package/out/__chunks__/chunk-WW5FDETV.mjs +2 -0
- package/out/__chunks__/chunk-WW5FDETV.mjs.map +7 -0
- package/out/__chunks__/chunk-X2BF4TGY.mjs +2 -0
- package/out/__chunks__/{chunk-WZWDFTW3.mjs → chunk-X34UQOZD.mjs} +2 -2
- package/out/__chunks__/{chunk-MZNVCQVB.mjs → chunk-X4ZHTAK3.mjs} +2 -2
- package/out/__chunks__/chunk-XF7JEPPX.mjs +2 -0
- package/out/__chunks__/chunk-XF7JEPPX.mjs.map +7 -0
- package/out/__chunks__/{chunk-LYC7ERBA.mjs → chunk-XT7JL5LN.mjs} +2 -2
- package/out/__chunks__/chunk-XT7JL5LN.mjs.map +7 -0
- package/out/__chunks__/chunk-YJPW44AG.mjs +2 -0
- package/out/__chunks__/chunk-YJPW44AG.mjs.map +7 -0
- package/out/__chunks__/{chunk-EA6KZGPV.mjs → chunk-YLFF3FGK.mjs} +2 -2
- package/out/__chunks__/chunk-YUITECZ5.mjs +1 -0
- package/out/__chunks__/chunk-Z6USXJA6.mjs +2 -0
- package/out/__chunks__/chunk-ZJO25VCQ.mjs +2 -0
- package/out/__chunks__/chunk-ZJO25VCQ.mjs.map +7 -0
- package/out/__chunks__/{chunk-4CJBDKYR.mjs → chunk-ZOWAHQJJ.mjs} +2 -2
- package/out/__chunks__/{chunk-24NXU72Y.mjs → chunk-ZOYKRLX3.mjs} +2 -2
- package/out/__chunks__/{chunk-SJYCKFH4.mjs → chunk-ZXIBFH6X.mjs} +2 -2
- package/out/__mocks__/accountConfig.mjs +1 -1
- package/out/__mocks__/index.mjs +1 -1
- package/out/__mocks__/server.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/providerFactory.constants.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/transactions.constants.d.ts +1 -0
- package/out/constants/transactions.constants.js +2 -1
- package/out/constants/transactions.constants.js.map +1 -1
- package/out/constants/transactions.constants.mjs +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkWebWalletCrossWindowProvider.d.ts +2 -0
- package/out/lib/sdkWebWalletCrossWindowProvider.js +4 -1
- package/out/lib/sdkWebWalletCrossWindowProvider.js.map +1 -1
- package/out/lib/sdkWebWalletCrossWindowProvider.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.d.ts +15 -0
- package/out/managers/LogoutManager/LogoutManager.js +137 -0
- package/out/managers/LogoutManager/LogoutManager.js.map +1 -0
- package/out/managers/LogoutManager/LogoutManager.mjs +2 -0
- package/out/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.d.ts +1 -0
- package/out/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.js +33 -0
- package/out/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.js.map +1 -0
- package/out/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.mjs +2 -0
- package/out/managers/LogoutManager/helpers/tests/getHumanReadableTokenExpirationTime.test.d.ts +1 -0
- package/out/managers/LogoutManager/helpers/tests/getHumanReadableTokenExpirationTime.test.js +48 -0
- package/out/managers/LogoutManager/helpers/tests/getHumanReadableTokenExpirationTime.test.js.map +1 -0
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.d.ts +2 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.js +13 -3
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.js.map +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.d.ts +17 -5
- package/out/managers/TransactionManager/TransactionManager.js +33 -6
- package/out/managers/TransactionManager/TransactionManager.js.map +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.types.d.ts +12 -0
- package/out/{providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.js → managers/TransactionManager/TransactionManager.types.js} +1 -1
- package/out/managers/TransactionManager/TransactionManager.types.js.map +1 -0
- package/out/managers/TransactionManager/TransactionManager.types.mjs +1 -0
- 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/helpers/sessionCallbacks.d.ts +7 -0
- package/out/managers/TransactionManager/helpers/sessionCallbacks.js +14 -0
- package/out/managers/TransactionManager/helpers/sessionCallbacks.js.map +1 -0
- package/out/managers/TransactionManager/helpers/sessionCallbacks.mjs +2 -0
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.js +1 -3
- package/out/managers/UnlockPanelManager/UnlockPanelManager.js.map +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.types.d.ts +12 -5
- package/out/managers/UnlockPanelManager/UnlockPanelManager.types.js.map +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.types.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.d.ts +0 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.js +7 -14
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.js.map +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.d.ts +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/ToastManager/ToastManager.d.ts +6 -4
- package/out/managers/internal/ToastManager/ToastManager.js +27 -19
- package/out/managers/internal/ToastManager/ToastManager.js.map +1 -1
- package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.js +1 -1
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.js.map +1 -1
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.js.map +1 -1
- package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
- package/out/managers/internal/ToastManager/types/index.mjs +1 -1
- package/out/managers/internal/ToastManager/types/toast.types.d.ts +3 -1
- package/out/managers/internal/ToastManager/types/toast.types.js +2 -0
- package/out/managers/internal/ToastManager/types/toast.types.js.map +1 -1
- package/out/managers/internal/ToastManager/types/toast.types.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.d.ts +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.js +2 -2
- package/out/managers/internal/UIBaseManager/UIBaseManager.js.map +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.js +2 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.js.map +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.js +16 -8
- package/out/methods/initApp/initApp.js.map +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +3 -3
- package/out/methods/initApp/initApp.types.d.ts +34 -5
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.js +27 -10
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.js.map +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.d.ts +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.js +7 -2
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.js.map +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.d.ts +7 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.js +24 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.js.map +1 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs +2 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs.map +7 -0
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.d.ts +1 -0
- package/out/methods/transactions/getFailedTransactions.js +10 -0
- package/out/methods/transactions/getFailedTransactions.js.map +1 -0
- package/out/methods/transactions/getFailedTransactions.mjs +2 -0
- package/out/methods/transactions/getFailedTransactions.mjs.map +7 -0
- package/out/methods/transactions/getFailedTransactionsSessions.d.ts +1 -0
- package/out/methods/transactions/getFailedTransactionsSessions.js +10 -0
- package/out/methods/transactions/getFailedTransactionsSessions.js.map +1 -0
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +2 -0
- package/out/methods/transactions/getFailedTransactionsSessions.mjs.map +7 -0
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.d.ts +1 -0
- package/out/methods/transactions/getSuccessfulTransactions.js +10 -0
- package/out/methods/transactions/getSuccessfulTransactions.js.map +1 -0
- package/out/methods/transactions/getSuccessfulTransactions.mjs +2 -0
- package/out/methods/transactions/getSuccessfulTransactions.mjs.map +7 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.d.ts +1 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.js +10 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.js.map +1 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +2 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs.map +7 -0
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.d.ts +1 -2
- package/out/providers/DappProvider/DappProvider.js +16 -6
- package/out/providers/DappProvider/DappProvider.js.map +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.js +1 -7
- package/out/providers/DappProvider/helpers/logout/logout.js.map +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.js +0 -5
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.js.map +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.js +5 -7
- package/out/providers/ProviderFactory.js.map +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/clearInitiatedLogins.js +2 -1
- package/out/providers/helpers/clearInitiatedLogins.js.map +1 -1
- package/out/providers/helpers/clearInitiatedLogins.mjs +1 -1
- package/out/providers/helpers/emptyProvider.mjs +1 -1
- package/out/providers/helpers/restoreProvider.js +6 -3
- package/out/providers/helpers/restoreProvider.js.map +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.d.ts +0 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js +0 -15
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js.map +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.d.ts +0 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.js +0 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.js.map +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.js +13 -2
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.js.map +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/types/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/types/walletConnect.types.d.ts +1 -0
- package/out/providers/strategies/WalletConnectProviderStrategy/types/walletConnect.types.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.d.ts +20 -0
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.js +147 -0
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.js.map +1 -0
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +2 -0
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs.map +7 -0
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.d.ts +1 -0
- package/out/providers/strategies/{CrossWindowProviderStrategy/types → WebviewProviderStrategy/WebviewClient}/index.js +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.js.map +1 -0
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +2 -0
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs.map +7 -0
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js +9 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js.map +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/tests/webview.test.js +20 -17
- package/out/providers/strategies/WebviewProviderStrategy/tests/webview.test.js.map +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.js +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.js.map +1 -1
- 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.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/tests/getCommonData.test.js +6 -6
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/tests/getCommonData.test.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/getMultiEsdtTransferData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/getTokenFromData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/getCrossWindowProvider.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.js +0 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.js +27 -20
- package/out/providers/strategies/helpers/signTransactions/signTransactions.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/providers/types/providerFactory.types.d.ts +1 -2
- package/out/providers/types/providerFactory.types.js.map +1 -1
- package/out/providers/types/providerFactory.types.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.d.ts +1 -0
- package/out/react/transactions/useGetFailedTransactions.js +11 -0
- package/out/react/transactions/useGetFailedTransactions.js.map +1 -0
- package/out/react/transactions/useGetFailedTransactions.mjs +2 -0
- package/out/react/transactions/useGetFailedTransactions.mjs.map +7 -0
- package/out/react/transactions/useGetFailedTransactionsSessions.d.ts +1 -0
- package/out/react/transactions/useGetFailedTransactionsSessions.js +11 -0
- package/out/react/transactions/useGetFailedTransactionsSessions.js.map +1 -0
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +2 -0
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs.map +7 -0
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.d.ts +1 -0
- package/out/react/transactions/useGetSuccessfulTransactions.js +11 -0
- package/out/react/transactions/useGetSuccessfulTransactions.js.map +1 -0
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +2 -0
- package/out/react/transactions/useGetSuccessfulTransactions.mjs.map +7 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.d.ts +1 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.js +11 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.js.map +1 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +2 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs.map +7 -0
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.d.ts +2 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.js +12 -5
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.js.map +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.js +6 -8
- package/out/services/nativeAuth/nativeAuth.js.map +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.d.ts +0 -2
- package/out/store/actions/config/configActions.js +1 -5
- package/out/store/actions/config/configActions.js.map +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.js.map +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.d.ts +1 -1
- package/out/store/actions/toasts/toastsActions.js +3 -1
- package/out/store/actions/toasts/toastsActions.js.map +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.d.ts +6 -4
- package/out/store/actions/transactions/transactionsActions.js +16 -7
- package/out/store/actions/transactions/transactionsActions.js.map +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/configSelectors.d.ts +0 -1
- package/out/store/selectors/configSelectors.js +1 -5
- package/out/store/selectors/configSelectors.js.map +1 -1
- package/out/store/selectors/configSelectors.mjs +1 -1
- package/out/store/selectors/index.mjs +1 -1
- package/out/store/selectors/transactionsSelector.d.ts +2 -0
- package/out/store/selectors/transactionsSelector.js +29 -1
- package/out/store/selectors/transactionsSelector.js.map +1 -1
- package/out/store/selectors/transactionsSelector.mjs +1 -1
- package/out/store/slices/config/config.types.d.ts +0 -2
- package/out/store/slices/config/configSlice.js +0 -1
- package/out/store/slices/config/configSlice.js.map +1 -1
- package/out/store/slices/config/configSlice.mjs +1 -1
- package/out/store/slices/config/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.d.ts +1 -0
- package/out/types/index.js +1 -0
- package/out/types/index.js.map +1 -1
- package/out/types/index.mjs +1 -1
- package/out/types/theme.types.d.ts +4 -0
- package/out/types/theme.types.js +9 -0
- package/out/types/theme.types.js.map +1 -0
- package/out/types/theme.types.mjs +2 -0
- package/out/types/theme.types.mjs.map +7 -0
- package/out/types/transactions.types.d.ts +4 -0
- package/out/types/transactions.types.mjs.map +1 -1
- package/out/utils/ComponentFactory.d.ts +14 -0
- package/out/utils/{createUIElement.js → ComponentFactory.js} +14 -4
- package/out/utils/ComponentFactory.js.map +1 -0
- package/out/utils/ComponentFactory.mjs +2 -0
- package/out/utils/ComponentFactory.mjs.map +7 -0
- package/out/utils/account/index.d.ts +1 -0
- package/out/utils/account/index.js +1 -0
- package/out/utils/account/index.js.map +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/{core/providers/DappProvider/helpers/login/helpers → utils/account}/refreshNativeAuthTokenLogin.d.ts +2 -2
- package/out/{core/providers/DappProvider/helpers/login/helpers → utils/account}/refreshNativeAuthTokenLogin.js +6 -9
- package/out/utils/account/refreshNativeAuthTokenLogin.js.map +1 -0
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +2 -0
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs.map +7 -0
- package/out/utils/decoders/index.mjs +1 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.js +1 -0
- package/out/utils/index.js.map +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTitleText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromDataField.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromOperations.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/getTokenFromData.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.mjs +1 -1
- package/out/utils/validation/index.mjs +1 -1
- package/out/utils/validation/isContract.mjs +1 -1
- package/out/utils/visual/index.d.ts +1 -0
- package/out/utils/visual/index.js +18 -0
- package/out/utils/visual/index.js.map +1 -0
- package/out/utils/visual/index.mjs +2 -0
- package/out/utils/visual/index.mjs.map +7 -0
- package/out/utils/visual/switchTheme.d.ts +2 -0
- package/out/utils/visual/switchTheme.js +15 -0
- package/out/utils/visual/switchTheme.js.map +1 -0
- package/out/utils/visual/switchTheme.mjs +2 -0
- package/out/utils/visual/switchTheme.mjs.map +7 -0
- package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowLocation.js +7 -1
- package/out/utils/window/getWindowLocation.js.map +1 -1
- package/out/utils/window/getWindowLocation.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +14 -14
- package/out/__chunks__/chunk-2GSNHNKW.mjs +0 -1
- package/out/__chunks__/chunk-3RRSLNNU.mjs +0 -2
- package/out/__chunks__/chunk-3RRSLNNU.mjs.map +0 -7
- package/out/__chunks__/chunk-45WVS4H5.mjs +0 -2
- package/out/__chunks__/chunk-4MQGFX5E.mjs +0 -2
- package/out/__chunks__/chunk-4ROJWFSB.mjs +0 -2
- package/out/__chunks__/chunk-762K2LVS.mjs +0 -2
- package/out/__chunks__/chunk-762K2LVS.mjs.map +0 -7
- package/out/__chunks__/chunk-A5M7ZH6X.mjs +0 -2
- package/out/__chunks__/chunk-ABKSM4D4.mjs +0 -2
- package/out/__chunks__/chunk-ABKSM4D4.mjs.map +0 -7
- package/out/__chunks__/chunk-ASWTHX52.mjs +0 -2
- package/out/__chunks__/chunk-CG25USRH.mjs +0 -2
- package/out/__chunks__/chunk-CG25USRH.mjs.map +0 -7
- package/out/__chunks__/chunk-CO3V5DOG.mjs +0 -1
- package/out/__chunks__/chunk-CTUOKFTQ.mjs +0 -2
- package/out/__chunks__/chunk-CTUOKFTQ.mjs.map +0 -7
- package/out/__chunks__/chunk-CUZ44CDY.mjs +0 -2
- package/out/__chunks__/chunk-CUZ44CDY.mjs.map +0 -7
- package/out/__chunks__/chunk-DEAM4WOQ.mjs +0 -2
- package/out/__chunks__/chunk-DKGAK7SX.mjs +0 -2
- package/out/__chunks__/chunk-DKGAK7SX.mjs.map +0 -7
- package/out/__chunks__/chunk-DQKFSHIR.mjs +0 -2
- package/out/__chunks__/chunk-DQKFSHIR.mjs.map +0 -7
- package/out/__chunks__/chunk-ETES5ZQ7.mjs +0 -2
- package/out/__chunks__/chunk-EXEJDQ3E.mjs +0 -2
- package/out/__chunks__/chunk-EXEJDQ3E.mjs.map +0 -7
- package/out/__chunks__/chunk-FFNSZC37.mjs +0 -2
- package/out/__chunks__/chunk-FFNSZC37.mjs.map +0 -7
- package/out/__chunks__/chunk-FLC6QSZB.mjs +0 -1
- package/out/__chunks__/chunk-FP2LZG6I.mjs +0 -2
- package/out/__chunks__/chunk-GGJ4EA5D.mjs +0 -2
- package/out/__chunks__/chunk-GZLK5ERT.mjs +0 -2
- package/out/__chunks__/chunk-GZLK5ERT.mjs.map +0 -7
- package/out/__chunks__/chunk-HO3JCUZA.mjs +0 -2
- package/out/__chunks__/chunk-HOYYQCKG.mjs +0 -2
- package/out/__chunks__/chunk-I7BB2JJP.mjs.map +0 -7
- package/out/__chunks__/chunk-IEJARRBP.mjs +0 -2
- package/out/__chunks__/chunk-IEJTMYFW.mjs +0 -2
- package/out/__chunks__/chunk-IMEJ3BE5.mjs +0 -2
- package/out/__chunks__/chunk-IMGZJVC6.mjs +0 -2
- package/out/__chunks__/chunk-IMGZJVC6.mjs.map +0 -7
- package/out/__chunks__/chunk-JR3FBBRR.mjs +0 -2
- package/out/__chunks__/chunk-JR3FBBRR.mjs.map +0 -7
- package/out/__chunks__/chunk-LRHRFWQ4.mjs +0 -2
- package/out/__chunks__/chunk-LRHRFWQ4.mjs.map +0 -7
- package/out/__chunks__/chunk-LTFLMSOC.mjs +0 -2
- package/out/__chunks__/chunk-LTFLMSOC.mjs.map +0 -7
- package/out/__chunks__/chunk-LYC7ERBA.mjs.map +0 -7
- package/out/__chunks__/chunk-LYTBUMNM.mjs +0 -2
- package/out/__chunks__/chunk-MIQ3KCUL.mjs +0 -2
- package/out/__chunks__/chunk-MIQ3KCUL.mjs.map +0 -7
- package/out/__chunks__/chunk-NHXPNROG.mjs.map +0 -7
- package/out/__chunks__/chunk-NXKEIB75.mjs +0 -2
- package/out/__chunks__/chunk-QCXM7FCT.mjs +0 -2
- package/out/__chunks__/chunk-QD3CFFVT.mjs +0 -2
- package/out/__chunks__/chunk-QMCJDKKV.mjs +0 -2
- package/out/__chunks__/chunk-QMCJDKKV.mjs.map +0 -7
- package/out/__chunks__/chunk-R3TQP7YH.mjs +0 -2
- package/out/__chunks__/chunk-RBN5PDCE.mjs +0 -2
- package/out/__chunks__/chunk-RHN3VD44.mjs +0 -2
- package/out/__chunks__/chunk-RMF4WLMK.mjs +0 -2
- package/out/__chunks__/chunk-RMF4WLMK.mjs.map +0 -7
- package/out/__chunks__/chunk-RNZEARAQ.mjs +0 -2
- package/out/__chunks__/chunk-SB35K4FJ.mjs +0 -2
- package/out/__chunks__/chunk-SB35K4FJ.mjs.map +0 -7
- package/out/__chunks__/chunk-SUN3MVLZ.mjs +0 -2
- package/out/__chunks__/chunk-T3HV6CCC.mjs +0 -2
- package/out/__chunks__/chunk-T3HV6CCC.mjs.map +0 -7
- package/out/__chunks__/chunk-UAZVYE3I.mjs +0 -2
- package/out/__chunks__/chunk-UHDDSK3N.mjs +0 -2
- package/out/__chunks__/chunk-WO6GJTV2.mjs +0 -2
- package/out/__chunks__/chunk-WO6GJTV2.mjs.map +0 -7
- package/out/__chunks__/chunk-XDXMB6H5.mjs +0 -2
- package/out/__chunks__/chunk-YB2E5WOO.mjs +0 -2
- package/out/__chunks__/chunk-YB2E5WOO.mjs.map +0 -7
- package/out/__chunks__/chunk-ZTSNKYSA.mjs +0 -2
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.js.map +0 -1
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs +0 -2
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs.map +0 -7
- package/out/providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.d.ts +0 -6
- package/out/providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.js.map +0 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.mjs +0 -2
- package/out/providers/strategies/CrossWindowProviderStrategy/types/index.d.ts +0 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/types/index.js.map +0 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/types/index.mjs +0 -2
- package/out/utils/createUIElement.d.ts +0 -9
- package/out/utils/createUIElement.js.map +0 -1
- package/out/utils/createUIElement.mjs +0 -2
- /package/out/__chunks__/{chunk-DEAM4WOQ.mjs.map → chunk-2A4BH65X.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N2V7UF7S.mjs.map → chunk-2R5LWF2W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K3WBBSXJ.mjs.map → chunk-3AARPJLE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z3IZ47ZD.mjs.map → chunk-3L3E75PE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4PHZ25O4.mjs.map → chunk-45ZH7OXW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XNPY3DUJ.mjs.map → chunk-4EU55YPS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QVQGVVKN.mjs.map → chunk-4MZZTC2O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UHDDSK3N.mjs.map → chunk-5AJYN23S.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZWISUUBJ.mjs.map → chunk-6AI3AGZ4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RBN5PDCE.mjs.map → chunk-6LDLCMZI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NXKEIB75.mjs.map → chunk-7JIHOTRV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RNZEARAQ.mjs.map → chunk-7Q275OU5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RHFDU5Y4.mjs.map → chunk-ABHYXD3U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ETHHR4HF.mjs.map → chunk-AG6XMOI3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4TSUWSFU.mjs.map → chunk-AODYWSUW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5N755C2P.mjs.map → chunk-AROH3QTC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3OKWBJFM.mjs.map → chunk-B2RDSGON.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FMUDQBZE.mjs.map → chunk-BETSOJFK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N6FJMYEB.mjs.map → chunk-CSTNJXBE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UAZVYE3I.mjs.map → chunk-CWQ4LFF5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PVEKU2X3.mjs.map → chunk-EHU5RQBI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ST4GGUZM.mjs.map → chunk-EKQLIEZD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QAVA2C6Y.mjs.map → chunk-EQEYL6AE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RIQNG4I7.mjs.map → chunk-F32BTVEV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A5M7ZH6X.mjs.map → chunk-F5V7QBOX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A5EXECZV.mjs.map → chunk-FIVH6RKU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-43DKHDU2.mjs.map → chunk-FWJIV6IK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-R3TQP7YH.mjs.map → chunk-FYSGC7MW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GGJ4EA5D.mjs.map → chunk-FZUIOPJF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZNZKP2Z7.mjs.map → chunk-GNZBRVMQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HQSB4ISG.mjs.map → chunk-HIUWEH2W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A64HMPMV.mjs.map → chunk-HVAT2QP5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RXAVE5OL.mjs.map → chunk-J66NP5YS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RDMU5LTQ.mjs.map → chunk-JK5DKI6N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5RVSN75H.mjs.map → chunk-KGDFAELQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EOX35D4L.mjs.map → chunk-LIPGE2RA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YPCJBYUY.mjs.map → chunk-LUDF7ZUR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ITYCILLF.mjs.map → chunk-MK3PM2DT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PNT4VF66.mjs.map → chunk-NV24F4LU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HO3JCUZA.mjs.map → chunk-O2IPPL6D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HOYYQCKG.mjs.map → chunk-O75VXVPG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZMEIT65B.mjs.map → chunk-OD4ANAAQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ETES5ZQ7.mjs.map → chunk-OPLNE5E4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LDOKRGUQ.mjs.map → chunk-P36YE74A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4OEPT2V4.mjs.map → chunk-P3BXXGQA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4MQGFX5E.mjs.map → chunk-P6A7X5MA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5AR7YU5K.mjs.map → chunk-PJDJEPY2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QCXM7FCT.mjs.map → chunk-PY3U6O6G.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DGBTQM4A.mjs.map → chunk-PYBAW4QY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YEXBSKXL.mjs.map → chunk-QWV25ZSJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZHGCNNB5.mjs.map → chunk-RM4VHHXR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XW2GCCBZ.mjs.map → chunk-RRKNYQ6D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZTSNKYSA.mjs.map → chunk-RXQV73QD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-426U6FXN.mjs.map → chunk-SAHYDY7R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PRULMJH7.mjs.map → chunk-T25ZUXIB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V6GKT3ZN.mjs.map → chunk-T2QCATZQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JIECCAME.mjs.map → chunk-TCXS5HPN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I7ODJJY3.mjs.map → chunk-TI73UXGG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P3EYUM5Z.mjs.map → chunk-U5KZZ3SL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SPSO2A53.mjs.map → chunk-U64LDJTG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PCPDM6RD.mjs.map → chunk-UA3COBIJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ASWTHX52.mjs.map → chunk-UAW7SD6P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AJOTPFJL.mjs.map → chunk-UUCTTBX3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JZLYRNNP.mjs.map → chunk-V4LGVF2H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2GSNHNKW.mjs.map → chunk-WHEXX3BD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LYTBUMNM.mjs.map → chunk-X2BF4TGY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WZWDFTW3.mjs.map → chunk-X34UQOZD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MZNVCQVB.mjs.map → chunk-X4ZHTAK3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EA6KZGPV.mjs.map → chunk-YLFF3FGK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CO3V5DOG.mjs.map → chunk-YUITECZ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4ROJWFSB.mjs.map → chunk-Z6USXJA6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4CJBDKYR.mjs.map → chunk-ZOWAHQJJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-24NXU72Y.mjs.map → chunk-ZOYKRLX3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SJYCKFH4.mjs.map → chunk-ZXIBFH6X.mjs.map} +0 -0
- /package/out/{__chunks__/chunk-FLC6QSZB.mjs.map → managers/LogoutManager/LogoutManager.mjs.map} +0 -0
- /package/out/{providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.mjs.map → managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.mjs.map} +0 -0
- /package/out/{providers/strategies/CrossWindowProviderStrategy/types/index.mjs.map → managers/TransactionManager/TransactionManager.types.mjs.map} +0 -0
- /package/out/{utils/createUIElement.mjs.map → managers/TransactionManager/helpers/sessionCallbacks.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -45,20 +45,7 @@ or
|
|
|
45
45
|
```bash
|
|
46
46
|
yarn add @multiversx/sdk-dapp
|
|
47
47
|
```
|
|
48
|
-
|
|
49
|
-
If you need only the core behaviour, without the additional UI, you can create a project-specific `.npmrc` file to configure per-package installation behavior. This will skip the installation of `@multiversx/sdk-dapp-ui`, but keep in mind that you may need to provide the UI components yourself.
|
|
50
|
-
Also, make sure you run your app on `https`, not `http`, otherwise some providers will not work.
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
## .npmrc
|
|
54
|
-
@multiversx/sdk-dapp:omit-optional=true
|
|
55
|
-
## enable the option when needed with:
|
|
56
|
-
## @multiversx/sdk-dapp:omit-optional=false
|
|
57
|
-
|
|
58
|
-
## Run Installation
|
|
59
|
-
## When you run npm install, NPM will use the configurations specified in the .npmrc file:
|
|
60
|
-
npm install
|
|
61
|
-
```
|
|
48
|
+
> **Note:** Make sure you run your app on `https`, not `http`, otherwise some providers will not work.
|
|
62
49
|
|
|
63
50
|
If you're transitioning from `@multiversx/sdk-dapp@4.x`, you can check out the [Migration guide](https://github.com/multiversx/mx-template-dapp/blob/0eb7bc6194195b6c364b8010023d351d914db65e/MIGRATION_GUIDE.md) and [migration PR](https://github.com/multiversx/mx-template-dapp/pull/343) of Template Dapp
|
|
64
51
|
|
|
@@ -104,7 +91,14 @@ const config: InitAppType = {
|
|
|
104
91
|
// network: { // optional
|
|
105
92
|
// walletAddress: 'https://devnet-wallet.multiversx.com' // or other props you want to override
|
|
106
93
|
// },
|
|
107
|
-
|
|
94
|
+
// transactionTracking: { // optional
|
|
95
|
+
// successfulToastLifetime: 5000,
|
|
96
|
+
// onSuccess: async (sessionId) => {
|
|
97
|
+
// console.log('Transaction session successful', sessionId);
|
|
98
|
+
// },
|
|
99
|
+
// onFail: async (sessionId) => {
|
|
100
|
+
// console.log('Transaction session failed', sessionId);
|
|
101
|
+
// }
|
|
108
102
|
}
|
|
109
103
|
// customProviders: [myCustomProvider] // optional
|
|
110
104
|
};
|
|
@@ -133,6 +127,7 @@ export const ConnectButton = () => {
|
|
|
133
127
|
onClose: () => { // optional action to be performed when the user closes the Unlock Panel
|
|
134
128
|
navigate('/');
|
|
135
129
|
},
|
|
130
|
+
// allowedProviders: [ProviderTypeEnum.walletConnect, 'myCustomProvider'] // optionally, only show specific providers
|
|
136
131
|
});
|
|
137
132
|
const handleOpenUnlockPanel = () => {
|
|
138
133
|
unlockPanelManager.openUnlockPanel();
|
|
@@ -141,6 +136,30 @@ export const ConnectButton = () => {
|
|
|
141
136
|
};
|
|
142
137
|
|
|
143
138
|
```
|
|
139
|
+
Once the user has logged in, if `nativeAuth` is configured in the `initApp` method, an automatic logout will be performed upon native auth expiration. Before the actual logout is performed, the `LogoutManager` will show a warning toast to the user. This toast can be customized by passing a `tokenExpirationToastWarningSeconds` to the `nativeAuth` config.
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
// in initAoo config
|
|
143
|
+
const config: InitAppType = {
|
|
144
|
+
// ...
|
|
145
|
+
nativeAuth: {
|
|
146
|
+
expirySeconds: 30, // test auto logout after 30 seconds
|
|
147
|
+
tokenExpirationToastWarningSeconds: 10 // show warning toast 10 seconds before auto logout
|
|
148
|
+
},
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
You have the option to stop this behavior by calling `LogoutManager.getInstance().stop()` after the user has logged in.
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
import { LogoutManager } from '@multiversx/sdk-dapp/out/managers/LogoutManager/LogoutManager';
|
|
156
|
+
|
|
157
|
+
loginHandler: () => {
|
|
158
|
+
navigate('/dashboard');
|
|
159
|
+
// optional, to stop the automatic logout upon native auth expiration
|
|
160
|
+
LogoutManager.getInstance().stop();
|
|
161
|
+
},
|
|
162
|
+
```
|
|
144
163
|
|
|
145
164
|
If you want to perform some actions as soon as the user has logged in, you will need to call `ProviderFactory.create` inside a handler accepting arguments.
|
|
146
165
|
|
|
@@ -154,7 +173,7 @@ export const AdvancedConnectButton = () => {
|
|
|
154
173
|
});
|
|
155
174
|
const { address, signature } = await provider.login();
|
|
156
175
|
navigate(`/dashboard?address=${address}`;
|
|
157
|
-
}
|
|
176
|
+
},
|
|
158
177
|
});
|
|
159
178
|
const handleOpenUnlockPanel = () => {
|
|
160
179
|
unlockPanelManager.openUnlockPanel();
|
|
@@ -249,7 +268,7 @@ export function useStore() {
|
|
|
249
268
|
To sign transactions, you first need to create the `Transaction` object, then pass it to the initialized provider.
|
|
250
269
|
|
|
251
270
|
```typescript
|
|
252
|
-
import { Address, Transaction
|
|
271
|
+
import { Address, Transaction } from '@multiversx/sdk-core';
|
|
253
272
|
import {
|
|
254
273
|
GAS_PRICE,
|
|
255
274
|
GAS_LIMIT
|
|
@@ -259,7 +278,7 @@ import { refreshAccount } from '@multiversx/sdk-dapp/out/utils/account/refreshAc
|
|
|
259
278
|
|
|
260
279
|
const pongTransaction = new Transaction({
|
|
261
280
|
value: BigInt(0),
|
|
262
|
-
data:
|
|
281
|
+
data: Buffer.from('pong'),
|
|
263
282
|
receiver: Address.newFromBech32(contractAddress),
|
|
264
283
|
gasLimit: BigInt(GAS_LIMIT),
|
|
265
284
|
gasPrice: BigInt(GAS_PRICE),
|
|
@@ -278,12 +297,15 @@ const signedTransactions = await provider.signTransactions(transactions);
|
|
|
278
297
|
|
|
279
298
|
Then, to send the transactions, you need to use the `TransactionManager` class and pass in the `signedTransactions` to the `send` method. You can then track the transactions by using the `track` method. This will create a toast notification with the transaction hash and its status.
|
|
280
299
|
|
|
300
|
+
> **Note:** You can set callbacks for the transaction manager to handle the session status, by using the `setCallbacks` method on the `TransactionManager` class. This can also be configured globally in the `initApp` method.
|
|
301
|
+
|
|
281
302
|
```typescript
|
|
282
303
|
import { TransactionManager } from '@multiversx/sdk-dapp/out/managers/TransactionManager';
|
|
283
304
|
import type { TransactionsDisplayInfoType } from '@multiversx/sdk-dapp/out/types/transactions.types';
|
|
284
305
|
|
|
285
306
|
|
|
286
307
|
const txManager = TransactionManager.getInstance();
|
|
308
|
+
|
|
287
309
|
const sentTransactions = await txManager.send(signedTransactions);
|
|
288
310
|
|
|
289
311
|
const toastInformation: TransactionsDisplayInfoType = {
|
|
@@ -293,7 +315,7 @@ const toastInformation: TransactionsDisplayInfoType = {
|
|
|
293
315
|
}
|
|
294
316
|
|
|
295
317
|
const sessionId = await txManager.track(sentTransactions, {
|
|
296
|
-
transactionsDisplayInfo: toastInformation
|
|
318
|
+
transactionsDisplayInfo: toastInformation,
|
|
297
319
|
});
|
|
298
320
|
```
|
|
299
321
|
|
|
@@ -316,8 +338,12 @@ You can find both methods and hooks to access transactions data, as seen in the
|
|
|
316
338
|
|---|------|-------------|----|
|
|
317
339
|
| | `methods/transactions` | path | `react/transactions` |
|
|
318
340
|
| 1 | `getTransactionSessions()` | returns all trabsaction sessions |`useGetTransactionSessions()` |
|
|
319
|
-
| 2 | `getPendingTransactionsSessions()` | returns an
|
|
341
|
+
| 2 | `getPendingTransactionsSessions()` | returns an record of pending sessions | `useGetPendingTransactionsSessions()`|
|
|
320
342
|
| 3 | `getPendingTransactions()` | returns an array of signed transactions | `useGetPendingTransactions()` |
|
|
343
|
+
| 4 | `getFailedTransactionsSessions()` | returns an record of failed sessions | `useGetFailedTransactionsSessions()`|
|
|
344
|
+
| 5 | `getFailedTransactions()` | returns an array of failed transactions | `useGetFailedTransactions()`|
|
|
345
|
+
| 6 | `getSuccessfulTransactionsSessions()` | returns an record of successful sessions | `useGetSuccessfulTransactionsSessions()`|
|
|
346
|
+
| 7 | `getSuccessfulTransactions()` | returns an array of successful transactions | `useGetSuccessfulTransactions()`|
|
|
321
347
|
|
|
322
348
|
There is a way to inspect store information regarding a specific transaction, using the `transactionsSliceSelector`. An example is shown below:
|
|
323
349
|
|
|
@@ -410,20 +436,8 @@ An existing provider is initialized on app load (this is take care of by `initAp
|
|
|
410
436
|
If you need to create a custom signing provider, make sure to extend the `IProvider` interface and implement all required methods (see example [here](https://github.com/multiversx/mx-template-dapp/tree/main/src/provider)). Next step would be to include it in the `customProviders` array in the `initApp` method or add it to the [window object](https://github.com/multiversx/mx-template-dapp/tree/main/src/initConfig). Last step is to login using the custom provider.
|
|
411
437
|
|
|
412
438
|
```typescript
|
|
413
|
-
import { ProviderTypeEnum } from '@multiversx/sdk-dapp/out/providers/types/providerFactory.types';
|
|
414
|
-
|
|
415
|
-
const ADDITIONAL_PROVIDERS = {
|
|
416
|
-
myCustomProvider: 'myCustomProvider'
|
|
417
|
-
} as const;
|
|
418
|
-
|
|
419
|
-
// do this if you want to reference it later in your code
|
|
420
|
-
const ExtendedProviders = {
|
|
421
|
-
...ProviderTypeEnum,
|
|
422
|
-
...ADDITIONAL_PROVIDERS
|
|
423
|
-
} as const;
|
|
424
|
-
|
|
425
439
|
const provider = await ProviderFactory.create({
|
|
426
|
-
type:
|
|
440
|
+
type: 'custom-provider'
|
|
427
441
|
});
|
|
428
442
|
await provider?.login();
|
|
429
443
|
```
|
|
@@ -481,6 +495,18 @@ The transaction lifecycle consists of the following steps:
|
|
|
481
495
|
4. **Tracking** transactions is made by using `transactionManager.track()`. Since the `send()` function returns the same arguments it has received, the same array payload can be passed into the `track()` method. Under the hood, status updates are received via a WebSocket or polling mechanism.
|
|
482
496
|
Once a transaction array is tracked, it gets associated with a `sessionId`, returned by the `track()` method and stored in the `transactions` slice. Depending on the array's type (plain/batch), the session's status varies from initial (`pending`/`invalid`/`sent`) to final (`successful`/`failed`/`timedOut`).
|
|
483
497
|
|
|
498
|
+
**Table 6**. Inspecting transaction sessions
|
|
499
|
+
| # | Helper | Description | React hook equivalent |
|
|
500
|
+
|---|------|-------------|----|
|
|
501
|
+
| | `methods/transactions` | path | `react/transactions` |
|
|
502
|
+
| 1 | `getTransactionSessions()` | returns all trabsaction sessions |`useGetTransactionSessions()` |
|
|
503
|
+
| 2 | `getPendingTransactionsSessions()` | returns an record of pending sessions | `useGetPendingTransactionsSessions()`|
|
|
504
|
+
| 3 | `getPendingTransactions()` | returns an array of signed transactions | `useGetPendingTransactions()` |
|
|
505
|
+
| 4 | `getFailedTransactionsSessions()` | returns an record of failed sessions | `useGetFailedTransactionsSessions()`|
|
|
506
|
+
| 5 | `getFailedTransactions()` | returns an array of failed transactions | `useGetFailedTransactions()`|
|
|
507
|
+
| 6 | `getSuccessfulTransactionsSessions()` | returns an record of successful sessions | `useGetSuccessfulTransactionsSessions()`|
|
|
508
|
+
| 7 | `getSuccessfulTransactions()` | returns an array of successful transactions | `useGetSuccessfulTransactions()`|
|
|
509
|
+
|
|
484
510
|
5. **User feedback** is provided through toast notifications, which are triggered to inform about transactions' progress. Additional tracking details can be optionally displayed in the toast UI.
|
|
485
511
|
There is an option to add custom toast messages by using the `createCustomToast` helper.
|
|
486
512
|
|
|
@@ -544,9 +570,23 @@ const sentTransactions = await transactionManager.send(batchTransactions);
|
|
|
544
570
|
The basic option is to use the built-in tracking, which displays toast notifications with default messages.
|
|
545
571
|
|
|
546
572
|
```typescript
|
|
573
|
+
import { TransactionManagerTrackOptionsType } from '@multiversx/sdk-dapp/out/managers/TransactionManager/TransactionManager.types';
|
|
574
|
+
|
|
575
|
+
const options: TransactionManagerTrackOptionsType = {
|
|
576
|
+
disableToasts: false, // `false` by default
|
|
577
|
+
transactionsDisplayInfo: { // `undefined` by default
|
|
578
|
+
errorMessage: 'Failed adding stake',
|
|
579
|
+
successMessage: 'Stake successfully added',
|
|
580
|
+
processingMessage: 'Staking in progress'
|
|
581
|
+
},
|
|
582
|
+
sessionInformation: { // `undefined` by default. Use to perform additional actions based on the session information
|
|
583
|
+
stakeAmount: '1000000000000000000000000'
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
|
|
547
587
|
const sessionId = await transactionManager.track(
|
|
548
|
-
sentTransactions
|
|
549
|
-
//
|
|
588
|
+
sentTransactions,
|
|
589
|
+
options // optional
|
|
550
590
|
);
|
|
551
591
|
```
|
|
552
592
|
|
|
@@ -681,9 +721,6 @@ export const FormatAmount = (props: IFormatAmountProps) => {
|
|
|
681
721
|
/>
|
|
682
722
|
);
|
|
683
723
|
};
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
724
|
```
|
|
688
725
|
|
|
689
726
|
|
|
@@ -697,7 +734,9 @@ flowchart LR
|
|
|
697
734
|
```
|
|
698
735
|
|
|
699
736
|
```typescript
|
|
700
|
-
|
|
737
|
+
import { ComponentFactory } from '@multiversx/sdk-dapp/out/utils/ComponentFactory';
|
|
738
|
+
|
|
739
|
+
const modalElement = await ComponentFactory.create<LedgerConnectModal>(
|
|
701
740
|
'mvx-ledger-connect-panel'
|
|
702
741
|
);
|
|
703
742
|
const eventBus = await modalElement.getEventBus();
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as I}from"./chunk-PJDJEPY2.mjs";import{a as l}from"./chunk-P6A7X5MA.mjs";import{a as f}from"./chunk-RXQV73QD.mjs";import{j as m,k as d,l as p,n as u}from"./chunk-65L5EBBL.mjs";import{a as T}from"./chunk-AODYWSUW.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=l(),F=f();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await T({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=u(s),E=p(s),L=d(s),i=A||E||L,v=m(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2EV6M7VE.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/managers/internal/ToastManager/helpers/createToastsFromTransactions.ts"],
|
|
4
|
-
"sourcesContent": ["import { getEgldLabel } from 'methods/network/getEgldLabel';\nimport { getExplorerAddress } from 'methods/network/getExplorerAddress';\nimport {\n getIsTransactionFailed,\n getIsTransactionPending,\n getIsTransactionSuccessful,\n getIsTransactionTimedOut\n} from 'store/actions/transactions/transactionStateByStatus';\nimport { AccountSliceType } from 'store/slices/account/account.types';\nimport { ToastsSliceType } from 'store/slices/toast/toastSlice.types';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { SessionTransactionType } from 'types/transactions.types';\nimport { mapServerTransactionsToListItems } from 'utils/transactions/getTransactionsHistory/helpers';\nimport {
|
|
4
|
+
"sourcesContent": ["import { getEgldLabel } from 'methods/network/getEgldLabel';\nimport { getExplorerAddress } from 'methods/network/getExplorerAddress';\nimport {\n getIsTransactionFailed,\n getIsTransactionPending,\n getIsTransactionSuccessful,\n getIsTransactionTimedOut\n} from 'store/actions/transactions/transactionStateByStatus';\nimport { AccountSliceType } from 'store/slices/account/account.types';\nimport { ToastsSliceType } from 'store/slices/toast/toastSlice.types';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { SessionTransactionType } from 'types/transactions.types';\nimport { mapServerTransactionsToListItems } from 'utils/transactions/getTransactionsHistory/helpers';\nimport { createTransactionToast } from './createTransactionToast';\nimport { ITransactionToast } from '../types/toast.types';\ninterface CreateToastsFromTransactionsReturnType {\n pendingTransactionToasts: ITransactionToast[];\n completedTransactionToasts: ITransactionToast[];\n}\n\ninterface CreateToastsFromTransactionsParamsType {\n toastList: ToastsSliceType;\n transactionsSessions: Record<string, SessionTransactionType>;\n account: AccountSliceType;\n existingCompletedTransactions?: ITransactionToast[];\n}\n\nexport const createToastsFromTransactions = async ({\n toastList,\n transactionsSessions,\n account,\n existingCompletedTransactions = []\n}: CreateToastsFromTransactionsParamsType): Promise<CreateToastsFromTransactionsReturnType> => {\n const pendingTransactionToasts: ITransactionToast[] = [];\n const completedTransactionToasts: ITransactionToast[] = [\n ...existingCompletedTransactions\n ];\n const explorerAddress = getExplorerAddress();\n const egldLabel = getEgldLabel();\n\n for (const toast of toastList.transactionToasts) {\n const transactionSession = transactionsSessions[toast.toastId];\n if (!transactionSession?.status) {\n continue;\n }\n\n const { status, transactions, transactionsDisplayInfo } =\n transactionSession;\n\n const interprettedTransactions = await mapServerTransactionsToListItems({\n transactions,\n address: account.address,\n explorerAddress,\n egldLabel\n });\n\n const isTimedOut = getIsTransactionTimedOut(status);\n const isFailed = getIsTransactionFailed(status);\n const isSuccessful = getIsTransactionSuccessful(status);\n const isCompleted = isTimedOut || isFailed || isSuccessful;\n const isPending = getIsTransactionPending(status);\n const { startTime, endTime } = toast;\n\n if (\n isCompleted &&\n completedTransactionToasts.some((t) => t.toastId === toast.toastId)\n ) {\n continue;\n }\n\n const transactionToast = createTransactionToast({\n toastId: toast.toastId,\n address: account.address,\n status: status as TransactionServerStatusesEnum,\n transactions: interprettedTransactions,\n transactionsDisplayInfo,\n explorerAddress,\n startTime,\n endTime\n });\n\n if (isCompleted) {\n completedTransactionToasts.push(transactionToast);\n }\n\n if (isPending) {\n pendingTransactionToasts.push(transactionToast);\n }\n }\n\n return {\n pendingTransactionToasts,\n completedTransactionToasts\n };\n};\n"],
|
|
5
5
|
"mappings": "kOA2BO,IAAMA,EAA+B,MAAO,CACjD,UAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,8BAAAC,EAAgC,CAAC,CACnC,IAA+F,CAC7F,IAAMC,EAAgD,CAAC,EACjDC,EAAkD,CACtD,GAAGF,CACL,EACMG,EAAkBC,EAAmB,EACrCC,EAAYC,EAAa,EAE/B,QAAWC,KAASV,EAAU,kBAAmB,CAC/C,IAAMW,EAAqBV,EAAqBS,EAAM,OAAO,EAC7D,GAAI,CAACC,GAAoB,OACvB,SAGF,GAAM,CAAE,OAAAC,EAAQ,aAAAC,EAAc,wBAAAC,CAAwB,EACpDH,EAEII,EAA2B,MAAMC,EAAiC,CACtE,aAAAH,EACA,QAASX,EAAQ,QACjB,gBAAAI,EACA,UAAAE,CACF,CAAC,EAEKS,EAAaC,EAAyBN,CAAM,EAC5CO,EAAWC,EAAuBR,CAAM,EACxCS,EAAeC,EAA2BV,CAAM,EAChDW,EAAcN,GAAcE,GAAYE,EACxCG,EAAYC,EAAwBb,CAAM,EAC1C,CAAE,UAAAc,EAAW,QAAAC,CAAQ,EAAIjB,EAE/B,GACEa,GACAlB,EAA2B,KAAMuB,GAAMA,EAAE,UAAYlB,EAAM,OAAO,EAElE,SAGF,IAAMmB,EAAmBC,EAAuB,CAC9C,QAASpB,EAAM,QACf,QAASR,EAAQ,QACjB,OAAQU,EACR,aAAcG,EACd,wBAAAD,EACA,gBAAAR,EACA,UAAAoB,EACA,QAAAC,CACF,CAAC,EAEGJ,GACFlB,EAA2B,KAAKwB,CAAgB,EAG9CL,GACFpB,EAAyB,KAAKyB,CAAgB,CAElD,CAEA,MAAO,CACL,yBAAAzB,EACA,2BAAAC,CACF,CACF",
|
|
6
6
|
"names": ["createToastsFromTransactions", "toastList", "transactionsSessions", "account", "existingCompletedTransactions", "pendingTransactionToasts", "completedTransactionToasts", "explorerAddress", "getExplorerAddress", "egldLabel", "getEgldLabel", "toast", "transactionSession", "status", "transactions", "transactionsDisplayInfo", "interprettedTransactions", "mapServerTransactionsToListItems", "isTimedOut", "getIsTransactionTimedOut", "isFailed", "getIsTransactionFailed", "isSuccessful", "getIsTransactionSuccessful", "isCompleted", "isPending", "getIsTransactionPending", "startTime", "endTime", "t", "transactionToast", "createTransactionToast"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-7Z3LULCU.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2R5LWF2W.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-T25ZUXIB.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3AARPJLE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-IAKBA5XK.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-3L3E75PE.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as u}from"./chunk-2A4BH65X.mjs";import{a as f}from"./chunk-HCLEWSLP.mjs";import{a as g}from"./chunk-4WAEN6KC.mjs";import{b as a}from"./chunk-IAKBA5XK.mjs";import{c as s,g as r}from"./chunk-R53MCZI6.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3POGSGSD.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/account/refreshNativeAuthTokenLogin.ts"],
|
|
4
|
+
"sourcesContent": ["import { Address, Message } from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport { nativeAuth } from 'services/nativeAuth';\nimport { getDefaultNativeAuthConfig } from 'services/nativeAuth/methods/getDefaultNativeAuthConfig';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { setTokenLogin } from 'store/actions/loginInfo/loginInfoActions';\n\n/**\n * Use this function if you support multiple networks with network switching\n * @returns The native auth token\n */\nexport const refreshNativeAuthTokenLogin = async ({\n signMessageCallback,\n nativeAuthClientConfig\n}: {\n signMessageCallback: (\n messageToSign: Message,\n options: Record<any, any>\n ) => Promise<Message>;\n nativeAuthClientConfig?: NativeAuthConfigType;\n}): Promise<string | null> => {\n const { address } = getAccount();\n const defaultNativeAuthConfig = getDefaultNativeAuthConfig();\n\n const nativeAuthClient = nativeAuth(\n nativeAuthClientConfig || defaultNativeAuthConfig\n );\n\n const loginToken = await nativeAuthClient.initialize({\n noCache: Boolean(nativeAuthClientConfig)\n });\n\n if (!loginToken) {\n return null;\n }\n\n const messageToSign = new Message({\n address: new Address(address),\n data: Buffer.from(`${address}${loginToken}`)\n });\n\n const signedMessage = await signMessageCallback(messageToSign, {});\n\n if (!signedMessage?.signature) {\n throw 'Message not signed';\n }\n\n setTokenLogin({\n loginToken,\n signature: Buffer.from(signedMessage.signature).toString('hex')\n });\n\n return nativeAuthClient.getToken({\n address,\n token: loginToken,\n signature: Buffer.from(signedMessage.signature).toString('hex')\n });\n};\n"],
|
|
5
|
+
"mappings": "oNAWO,IAAMA,EAA8B,MAAO,CAChD,oBAAAC,EACA,uBAAAC,CACF,IAM8B,CAC5B,GAAM,CAAE,QAAAC,CAAQ,EAAIC,EAAW,EACzBC,EAA0BC,EAA2B,EAErDC,EAAmBC,EACvBN,GAA0BG,CAC5B,EAEMI,EAAa,MAAMF,EAAiB,WAAW,CACnD,QAAS,EAAQL,CACnB,CAAC,EAED,GAAI,CAACO,EACH,OAAO,KAGT,IAAMC,EAAgB,IAAIC,EAAQ,CAChC,QAAS,IAAIC,EAAQT,CAAO,EAC5B,KAAM,OAAO,KAAK,GAAGA,CAAO,GAAGM,CAAU,EAAE,CAC7C,CAAC,EAEKI,EAAgB,MAAMZ,EAAoBS,EAAe,CAAC,CAAC,EAEjE,GAAI,CAACG,GAAe,UAClB,KAAM,qBAGR,OAAAC,EAAc,CACZ,WAAAL,EACA,UAAW,OAAO,KAAKI,EAAc,SAAS,EAAE,SAAS,KAAK,CAChE,CAAC,EAEMN,EAAiB,SAAS,CAC/B,QAAAJ,EACA,MAAOM,EACP,UAAW,OAAO,KAAKI,EAAc,SAAS,EAAE,SAAS,KAAK,CAChE,CAAC,CACH",
|
|
6
|
+
"names": ["refreshNativeAuthTokenLogin", "signMessageCallback", "nativeAuthClientConfig", "address", "getAccount", "defaultNativeAuthConfig", "getDefaultNativeAuthConfig", "nativeAuthClient", "nativeAuth", "loginToken", "messageToSign", "Message", "Address", "signedMessage", "setTokenLogin"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-O3V4TGXK.mjs";import{a as _}from"./chunk-AV4HSXYZ.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-ROZAXUMC.mjs";import{a as M}from"./chunk-BETSOJFK.mjs";import{a as w}from"./chunk-YTFYVPZO.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-AROH3QTC.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{t as G}from"./chunk-LXGUUE34.mjs";import{a as L}from"./chunk-P6A7X5MA.mjs";import{a as h}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-J4CPYFK6.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-T4GLLB7R.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await x({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=O({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=G().getType(),at=v(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=L(),pt=h({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3ZB7JXE7.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.ts"],
|
|
4
|
-
"sourcesContent": ["import { BigNumber } from 'bignumber.js';\nimport { ACCOUNTS_ENDPOINT } from 'apiCalls';\nimport { getPersistedTokenDetails } from 'apiCalls/tokens/getPersistedTokenDetails';\nimport { MULTI_TRANSFER_EGLD_TOKEN } from 'constants/mvx.constants';\nimport { safeWindow } from 'constants/window.constants';\nimport { DECIMALS, DIGITS, formatAmount } from 'lib/sdkDappUtils';\nimport {\n FungibleTransactionType,\n ISignTransactionsPanelCommonData\n} from 'managers/internal/SignTransactionsStateManager/types';\nimport { getExplorerAddress } from 'methods/network/getExplorerAddress';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { NetworkType } from 'types/network.types';\nimport { NftEnumType } from 'types/tokens.types';\nimport {\n MultiSignTransactionType,\n TransactionDataTokenType\n} from 'types/transactions.types';\nimport { decodeBase64 } from 'utils/decoders/base64Utils';\nimport { capitalize } from 'utils/operations/capitalize';\nimport { getUsdValue } from 'utils/operations/getUsdValue';\nimport { getExplorerLink } from 'utils/transactions/getExplorerLink';\nimport { getFeeData } from '../getFeeData';\nimport { getAllDecodedFormats } from './helpers/decodeDataField';\nimport { getExtractTransactionsInfo } from './helpers/getExtractTransactionsInfo';\nimport { getHighlight } from './helpers/getHighlight';\nimport { getPpuOptions } from './helpers/getPpuOptions';\nimport { getRecommendedGasPrice } from './helpers/getRecommendedGasPrice';\nimport { getScCall } from './helpers/getScCall';\nimport { getTokenType } from './helpers/getTokenType';\n\nexport type GetCommonDataPropsType = {\n allTransactions: MultiSignTransactionType[];\n currentScreenIndex: number;\n price?: number;\n network: NetworkType;\n signedIndexes: number[];\n egldLabel: string;\n address: string;\n shard?: number;\n username?: string;\n parsedTransactionsByDataField: Record<string, TransactionDataTokenType>;\n gasPriceData: {\n initialGasPrice: number;\n ppu: ISignTransactionsPanelCommonData['ppu'];\n };\n};\n\nexport async function getCommonData({\n allTransactions,\n currentScreenIndex,\n egldLabel,\n network,\n gasPriceData,\n price,\n address,\n username,\n shard,\n signedIndexes,\n parsedTransactionsByDataField\n}: GetCommonDataPropsType) {\n const currentTransaction = allTransactions[currentScreenIndex];\n const sender = currentTransaction?.transaction?.sender.toString();\n const transaction = currentTransaction?.transaction;\n\n let tokenTransaction: {\n identifier?: string;\n amount: string;\n usdValue: string;\n } | null = null;\n\n let fungibleTransaction:\n | (FungibleTransactionType & {\n type: NftEnumType.NonFungibleESDT | NftEnumType.SemiFungibleESDT;\n })\n | null = null;\n\n const extractTransactionsInfo = getExtractTransactionsInfo({\n egldLabel,\n sender,\n apiAddress: network.apiAddress,\n address,\n parsedTransactionsByDataField\n });\n\n const plainTransaction = currentTransaction.transaction.toPlainObject();\n const txInfo = await extractTransactionsInfo(currentTransaction);\n\n const isEgld = !txInfo?.transactionTokenInfo?.tokenId;\n const { tokenId, nonce, amount = '' } = txInfo?.transactionTokenInfo ?? {};\n\n const isNftOrSft = tokenId && nonce && nonce.length > 0;\n const tokenIdForTokenDetails = isNftOrSft ? `${tokenId}-${nonce}` : tokenId;\n\n const tokenDetails = await getPersistedTokenDetails({\n tokenId: tokenIdForTokenDetails\n });\n\n const { esdtPrice, tokenDecimals, type, identifier, tokenImageUrl } =\n tokenDetails;\n\n const isNft =\n type === NftEnumType.SemiFungibleESDT ||\n type === NftEnumType.NonFungibleESDT;\n\n if (isNft) {\n fungibleTransaction = {\n type,\n identifier,\n amount,\n imageURL: tokenImageUrl\n };\n } else {\n const getFormattedAmount = ({ addCommas }: { addCommas: boolean }) =>\n formatAmount({\n input: isEgld\n ? currentTransaction.transaction.value.toString()\n : amount,\n decimals: isEgld ? Number(network.decimals) : tokenDecimals,\n digits: Number(network.digits),\n showLastNonZeroDecimal: false,\n addCommas\n });\n\n const formattedAmount = getFormattedAmount({ addCommas: true });\n const rawAmount = getFormattedAmount({ addCommas: false });\n const tokenPrice = Number(isEgld ? price : esdtPrice);\n const usdValue = getUsdValue({\n amount: rawAmount,\n usd: tokenPrice,\n addEqualSign: true\n });\n\n const esdtIdentifier =\n identifier === MULTI_TRANSFER_EGLD_TOKEN ? egldLabel : identifier;\n tokenTransaction = {\n identifier: esdtIdentifier ?? egldLabel,\n amount: formattedAmount,\n usdValue\n };\n }\n\n const { feeLimitFormatted, feeInFiatLimit } = getFeeData({\n transaction,\n price\n });\n\n const ppuOptions = getPpuOptions({\n shard,\n initialGasPrice: gasPriceData.initialGasPrice,\n transaction: plainTransaction,\n gasStationMetadata: network.gasStationMetadata\n });\n\n const gasPrice = getRecommendedGasPrice({\n transaction: plainTransaction,\n gasPriceData\n });\n\n const provider = getAccountProvider();\n const providerType = provider.getType();\n const providerName = capitalize(providerType as string);\n const transactionsCount = allTransactions.length;\n\n const currentIndexToSign =\n signedIndexes.length > 0 ? signedIndexes[signedIndexes.length - 1] + 1 : 0;\n\n const data = decodeBase64(\n currentTransaction.transaction.data.toString() ?? ''\n );\n\n const highlight = getHighlight(txInfo?.transactionTokenInfo);\n const decodedData = getAllDecodedFormats({ data, identifier, highlight });\n const explorerAddress = getExplorerAddress();\n const explorerLink = getExplorerLink({\n to: `/${ACCOUNTS_ENDPOINT}/${address}`,\n explorerAddress\n });\n\n const needsSigning =\n transactionsCount === 1 ||\n (txInfo?.needsSigning && !signedIndexes.includes(currentScreenIndex));\n\n const formattedGasPrice = formatAmount({\n input: gasPrice.toString(),\n decimals: DECIMALS,\n addCommas: true,\n digits: DIGITS\n });\n\n const formattedGasLimit = new BigNumber(plainTransaction.gasLimit).toFormat({\n decimalSeparator: ',',\n groupSeparator: '.',\n groupSize: 3\n });\n\n const commonData: ISignTransactionsPanelCommonData = {\n receiver: plainTransaction.receiver.toString(),\n data: decodeBase64(currentTransaction.transaction.data.toString() ?? ''),\n decodedData,\n gasPrice: formattedGasPrice,\n gasLimit: formattedGasLimit,\n explorerLink,\n ppu: gasPriceData.ppu,\n ppuOptions,\n egldLabel,\n tokenType: getTokenType(type),\n feeLimit: feeLimitFormatted,\n feeInFiatLimit,\n transactionsCount,\n currentIndex: currentScreenIndex,\n currentIndexToSign,\n highlight,\n scCall: getScCall(txInfo?.transactionTokenInfo),\n needsSigning,\n isEditable: txInfo?.needsSigning,\n providerName,\n address,\n username,\n origin: safeWindow.location
|
|
5
|
-
"mappings": "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
|
|
4
|
+
"sourcesContent": ["import { BigNumber } from 'bignumber.js';\nimport { ACCOUNTS_ENDPOINT } from 'apiCalls';\nimport { getPersistedTokenDetails } from 'apiCalls/tokens/getPersistedTokenDetails';\nimport { MULTI_TRANSFER_EGLD_TOKEN } from 'constants/mvx.constants';\nimport { safeWindow } from 'constants/window.constants';\nimport { DECIMALS, DIGITS, formatAmount } from 'lib/sdkDappUtils';\nimport {\n FungibleTransactionType,\n ISignTransactionsPanelCommonData\n} from 'managers/internal/SignTransactionsStateManager/types';\nimport { getExplorerAddress } from 'methods/network/getExplorerAddress';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { NetworkType } from 'types/network.types';\nimport { NftEnumType } from 'types/tokens.types';\nimport {\n MultiSignTransactionType,\n TransactionDataTokenType\n} from 'types/transactions.types';\nimport { decodeBase64 } from 'utils/decoders/base64Utils';\nimport { capitalize } from 'utils/operations/capitalize';\nimport { getUsdValue } from 'utils/operations/getUsdValue';\nimport { getExplorerLink } from 'utils/transactions/getExplorerLink';\nimport { getFeeData } from '../getFeeData';\nimport { getAllDecodedFormats } from './helpers/decodeDataField';\nimport { getExtractTransactionsInfo } from './helpers/getExtractTransactionsInfo';\nimport { getHighlight } from './helpers/getHighlight';\nimport { getPpuOptions } from './helpers/getPpuOptions';\nimport { getRecommendedGasPrice } from './helpers/getRecommendedGasPrice';\nimport { getScCall } from './helpers/getScCall';\nimport { getTokenType } from './helpers/getTokenType';\n\nexport type GetCommonDataPropsType = {\n allTransactions: MultiSignTransactionType[];\n currentScreenIndex: number;\n price?: number;\n network: NetworkType;\n signedIndexes: number[];\n egldLabel: string;\n address: string;\n shard?: number;\n username?: string;\n parsedTransactionsByDataField: Record<string, TransactionDataTokenType>;\n gasPriceData: {\n initialGasPrice: number;\n ppu: ISignTransactionsPanelCommonData['ppu'];\n };\n};\n\nexport async function getCommonData({\n allTransactions,\n currentScreenIndex,\n egldLabel,\n network,\n gasPriceData,\n price,\n address,\n username,\n shard,\n signedIndexes,\n parsedTransactionsByDataField\n}: GetCommonDataPropsType) {\n const currentTransaction = allTransactions[currentScreenIndex];\n const sender = currentTransaction?.transaction?.sender.toString();\n const transaction = currentTransaction?.transaction;\n\n let tokenTransaction: {\n identifier?: string;\n amount: string;\n usdValue: string;\n } | null = null;\n\n let fungibleTransaction:\n | (FungibleTransactionType & {\n type: NftEnumType.NonFungibleESDT | NftEnumType.SemiFungibleESDT;\n })\n | null = null;\n\n const extractTransactionsInfo = getExtractTransactionsInfo({\n egldLabel,\n sender,\n apiAddress: network.apiAddress,\n address,\n parsedTransactionsByDataField\n });\n\n const plainTransaction = currentTransaction.transaction.toPlainObject();\n const txInfo = await extractTransactionsInfo(currentTransaction);\n\n const isEgld = !txInfo?.transactionTokenInfo?.tokenId;\n const { tokenId, nonce, amount = '' } = txInfo?.transactionTokenInfo ?? {};\n\n const isNftOrSft = tokenId && nonce && nonce.length > 0;\n const tokenIdForTokenDetails = isNftOrSft ? `${tokenId}-${nonce}` : tokenId;\n\n const tokenDetails = await getPersistedTokenDetails({\n tokenId: tokenIdForTokenDetails\n });\n\n const { esdtPrice, tokenDecimals, type, identifier, tokenImageUrl } =\n tokenDetails;\n\n const isNft =\n type === NftEnumType.SemiFungibleESDT ||\n type === NftEnumType.NonFungibleESDT;\n\n if (isNft) {\n fungibleTransaction = {\n type,\n identifier,\n amount,\n imageURL: tokenImageUrl\n };\n } else {\n const getFormattedAmount = ({ addCommas }: { addCommas: boolean }) =>\n formatAmount({\n input: isEgld\n ? currentTransaction.transaction.value.toString()\n : amount,\n decimals: isEgld ? Number(network.decimals) : tokenDecimals,\n digits: Number(network.digits),\n showLastNonZeroDecimal: false,\n addCommas\n });\n\n const formattedAmount = getFormattedAmount({ addCommas: true });\n const rawAmount = getFormattedAmount({ addCommas: false });\n const tokenPrice = Number(isEgld ? price : esdtPrice);\n const usdValue = getUsdValue({\n amount: rawAmount,\n usd: tokenPrice,\n addEqualSign: true\n });\n\n const esdtIdentifier =\n identifier === MULTI_TRANSFER_EGLD_TOKEN ? egldLabel : identifier;\n tokenTransaction = {\n identifier: esdtIdentifier ?? egldLabel,\n amount: formattedAmount,\n usdValue\n };\n }\n\n const { feeLimitFormatted, feeInFiatLimit } = getFeeData({\n transaction,\n price\n });\n\n const ppuOptions = getPpuOptions({\n shard,\n initialGasPrice: gasPriceData.initialGasPrice,\n transaction: plainTransaction,\n gasStationMetadata: network.gasStationMetadata\n });\n\n const gasPrice = getRecommendedGasPrice({\n transaction: plainTransaction,\n gasPriceData\n });\n\n const provider = getAccountProvider();\n const providerType = provider.getType();\n const providerName = capitalize(providerType as string);\n const transactionsCount = allTransactions.length;\n\n const currentIndexToSign =\n signedIndexes.length > 0 ? signedIndexes[signedIndexes.length - 1] + 1 : 0;\n\n const data = decodeBase64(\n currentTransaction.transaction.data.toString() ?? ''\n );\n\n const highlight = getHighlight(txInfo?.transactionTokenInfo);\n const decodedData = getAllDecodedFormats({ data, identifier, highlight });\n const explorerAddress = getExplorerAddress();\n const explorerLink = getExplorerLink({\n to: `/${ACCOUNTS_ENDPOINT}/${address}`,\n explorerAddress\n });\n\n const needsSigning =\n transactionsCount === 1 ||\n (txInfo?.needsSigning && !signedIndexes.includes(currentScreenIndex));\n\n const formattedGasPrice = formatAmount({\n input: gasPrice.toString(),\n decimals: DECIMALS,\n addCommas: true,\n digits: DIGITS\n });\n\n const formattedGasLimit = new BigNumber(plainTransaction.gasLimit).toFormat({\n decimalSeparator: ',',\n groupSeparator: '.',\n groupSize: 3\n });\n\n const commonData: ISignTransactionsPanelCommonData = {\n receiver: plainTransaction.receiver.toString(),\n data: decodeBase64(currentTransaction.transaction.data.toString() ?? ''),\n decodedData,\n gasPrice: formattedGasPrice,\n gasLimit: formattedGasLimit,\n explorerLink,\n ppu: gasPriceData.ppu,\n ppuOptions,\n egldLabel,\n tokenType: getTokenType(type),\n feeLimit: feeLimitFormatted,\n feeInFiatLimit,\n transactionsCount,\n currentIndex: currentScreenIndex,\n currentIndexToSign,\n highlight,\n scCall: getScCall(txInfo?.transactionTokenInfo),\n needsSigning,\n isEditable: txInfo?.needsSigning,\n providerName,\n address,\n username,\n origin: safeWindow.location?.origin\n };\n\n return { commonData, tokenTransaction, fungibleTransaction };\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["BigNumber", "getCommonData", "allTransactions", "currentScreenIndex", "egldLabel", "network", "gasPriceData", "price", "address", "username", "shard", "signedIndexes", "parsedTransactionsByDataField", "currentTransaction", "sender", "transaction", "tokenTransaction", "fungibleTransaction", "extractTransactionsInfo", "getExtractTransactionsInfo", "plainTransaction", "txInfo", "isEgld", "tokenId", "nonce", "amount", "tokenIdForTokenDetails", "tokenDetails", "getPersistedTokenDetails", "esdtPrice", "tokenDecimals", "type", "identifier", "tokenImageUrl", "getFormattedAmount", "addCommas", "formatAmount", "formattedAmount", "rawAmount", "tokenPrice", "usdValue", "getUsdValue", "MULTI_TRANSFER_EGLD_TOKEN", "feeLimitFormatted", "feeInFiatLimit", "getFeeData", "ppuOptions", "getPpuOptions", "gasPrice", "getRecommendedGasPrice", "providerType", "getAccountProvider", "providerName", "capitalize", "transactionsCount", "currentIndexToSign", "data", "decodeBase64", "highlight", "getHighlight", "decodedData", "getAllDecodedFormats", "explorerAddress", "getExplorerAddress", "explorerLink", "getExplorerLink", "ACCOUNTS_ENDPOINT", "needsSigning", "formattedGasPrice", "DECIMALS", "DIGITS", "formattedGasLimit", "BigNumber", "getTokenType", "getScCall", "safeWindow"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/TransactionManager/helpers/sessionCallbacks.ts"],
|
|
4
|
+
"sourcesContent": ["export const sessionCallbacksMap: SessionCallbacksType = {};\n\ntype SessionCallbacksType = {\n onSuccess?: (sessionId: string) => Promise<void>;\n onFail?: (sessionId: string) => Promise<void>;\n};\n\nexport const registerSessionCallbacks = ({\n onSuccess,\n onFail\n}: SessionCallbacksType) => {\n if (onSuccess != null) {\n sessionCallbacksMap.onSuccess = onSuccess;\n }\n if (onFail != null) {\n sessionCallbacksMap.onFail = onFail;\n }\n};\n"],
|
|
5
|
+
"mappings": "AAAO,IAAMA,EAA4C,CAAC,EAO7CC,EAA2B,CAAC,CACvC,UAAAC,EACA,OAAAC,CACF,IAA4B,CACtBD,GAAa,OACfF,EAAoB,UAAYE,GAE9BC,GAAU,OACZH,EAAoB,OAASG,EAEjC",
|
|
6
|
+
"names": ["sessionCallbacksMap", "registerSessionCallbacks", "onSuccess", "onFail"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{u as r}from"./chunk-IAKBA5XK.mjs";import{b as e}from"./chunk-SAAOQW7P.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-45ZH7OXW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-ZOWAHQJJ.mjs";import{b as r}from"./chunk-3L3E75PE.mjs";import{u as i}from"./chunk-IAKBA5XK.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4EU55YPS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as a}from"./chunk-IAKBA5XK.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-4MZZTC2O.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as e}from"./chunk-IAKBA5XK.mjs";import{b as o}from"./chunk-SAAOQW7P.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-4WAEN6KC.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/services/nativeAuth/methods/getDefaultNativeAuthConfig.ts"],
|
|
4
|
+
"sourcesContent": ["import { networkSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport { getWindowLocation } from 'utils/window/getWindowLocation';\nimport { NativeAuthConfigType } from '../nativeAuth.types';\n\nconst DEFAULT_API_ADDRESS = 'https://api.multiversx.com';\n\nconst DEFAULT_EXPIRY_SECONDS = 60 * 60 * 24; // one day\nconst DEFAULT_TOKEN_EXPIRATION_TOAST_WARNING_SECONDS = 5 * 60; // five minutes\n\nexport const getDefaultNativeAuthConfig = (config?: NativeAuthConfigType) => {\n const network = networkSelector(getState());\n\n return {\n origin: config?.origin || getWindowLocation().origin,\n apiAddress: config?.apiAddress || network.apiAddress || DEFAULT_API_ADDRESS,\n expirySeconds: config?.expirySeconds || DEFAULT_EXPIRY_SECONDS,\n tokenExpirationToastWarningSeconds:\n config?.tokenExpirationToastWarningSeconds ||\n DEFAULT_TOKEN_EXPIRATION_TOAST_WARNING_SECONDS\n };\n};\n"],
|
|
5
|
+
"mappings": "2HAKA,IAAMA,EAAsB,6BAEtBC,EAAyB,GAAK,GAAK,GACnCC,EAAiD,EAAI,GAE9CC,EAA8BC,GAAkC,CAC3E,IAAMC,EAAUC,EAAgBC,EAAS,CAAC,EAE1C,MAAO,CACL,OAAQH,GAAQ,QAAUI,EAAkB,EAAE,OAC9C,WAAYJ,GAAQ,YAAcC,EAAQ,YAAcL,EACxD,cAAeI,GAAQ,eAAiBH,EACxC,mCACEG,GAAQ,oCACRF,CACJ,CACF",
|
|
6
|
+
"names": ["DEFAULT_API_ADDRESS", "DEFAULT_EXPIRY_SECONDS", "DEFAULT_TOKEN_EXPIRATION_TOAST_WARNING_SECONDS", "getDefaultNativeAuthConfig", "config", "network", "networkSelector", "getState", "getWindowLocation"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as B}from"./chunk-6LDLCMZI.mjs";import{a as b}from"./chunk-Z6USXJA6.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-OD4ANAAQ.mjs";import{a as D}from"./chunk-3ZB7JXE7.mjs";import{a as I}from"./chunk-AV4HSXYZ.mjs";import{a as j}from"./chunk-YTFYVPZO.mjs";import{a as _}from"./chunk-AWX5SSJV.mjs";import{a as A}from"./chunk-FWJIV6IK.mjs";import{a as O}from"./chunk-RXQV73QD.mjs";import{u as x}from"./chunk-IAKBA5XK.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-J4CPYFK6.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:E,username:h}}=B(),g=v(x()),C=O(),{allTransactions:e,parsedTransactionsByDataField:L}=R(z),p=[],n=A.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await k({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let c=e[a]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:r,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:h,shard:E,signedIndexes:p,parsedTransactionsByDataField:L});o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(r)}catch(r){console.error(`Error fetching common data for transaction at index ${a}:`,r)}finally{n.updateIsLoading(!1)}},$=()=>{a>0&&(a--,T())},q=(t=0)=>{let i=e[a].transaction,r=Number(i.nonce);n.updateGasPriceMap({nonce:r,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[r]}),P=w.newFromPlainObject({...o,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:t})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},Q=async()=>{let c=e[a].transaction,i=Number(c.nonce),{commonData:r}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:h,shard:E,signedIndexes:p,parsedTransactionsByDataField:L});if(!r.needsSigning)return p.push(a),f();let o=c.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[t,c]of V)n.subscribeToEventBus(t,c)}Z(),await T()})}export{Dn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5HHIOEWB.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/strategies/helpers/signTransactions/signTransactions.ts"],
|
|
4
|
+
"sourcesContent": ["import { getEconomics } from 'apiCalls/economics/getEconomics';\nimport { EMPTY_PPU } from 'constants/placeholders.constants';\nimport { Transaction } from 'lib/sdkCore';\nimport { DECIMALS, DIGITS, formatAmount } from 'lib/sdkDappUtils';\nimport { SignTransactionsStateManager } from 'managers/internal/SignTransactionsStateManager/SignTransactionsStateManager';\nimport {\n ISignTransactionsPanelCommonData,\n SignEventsEnum\n} from 'managers/internal/SignTransactionsStateManager/types';\nimport { getAccountInfo } from 'methods/account/getAccountInfo';\nimport { getEgldLabel } from 'methods/network/getEgldLabel';\nimport { cancelCrossWindowAction } from 'providers/helpers/cancelCrossWindowAction';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { networkSelector } from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport { getCommonData } from './helpers/getCommonData/getCommonData';\nimport { getRecommendedGasPrice } from './helpers/getCommonData/helpers/getRecommendedGasPrice';\nimport { getFeeData } from './helpers/getFeeData';\nimport { getMultiEsdtTransferData } from './helpers/getMultiEsdtTransferData/getMultiEsdtTransferData';\nimport { guardTransactions as getGuardedTransactions } from './helpers/guardTransactions/guardTransactions';\n\ntype SignTransactionsParamsType = {\n transactions?: Transaction[];\n handleSign: IProvider['signTransactions'];\n guardTransactions?: typeof getGuardedTransactions;\n};\n\nexport async function signTransactions({\n transactions = [],\n handleSign,\n guardTransactions = getGuardedTransactions\n}: SignTransactionsParamsType): Promise<Transaction[]> {\n const {\n account: { address, shard, username }\n } = getAccountInfo();\n const network = networkSelector(getState());\n\n const egldLabel = getEgldLabel();\n\n const { allTransactions, parsedTransactionsByDataField } =\n getMultiEsdtTransferData(transactions);\n\n let signedIndexes: number[] = [];\n\n const manager = SignTransactionsStateManager.getInstance();\n await manager.openUI();\n\n if (!manager) {\n throw new Error('Unable to establish connection with sign screens');\n }\n\n const handleCancel = async () => {\n await cancelCrossWindowAction();\n manager.closeUI();\n };\n\n manager.subscribeToEventBus(SignEventsEnum.CLOSE, handleCancel);\n\n return new Promise<Transaction[]>(async (resolve, reject) => {\n const signedTransactions: Transaction[] = [];\n const economics = await getEconomics({ baseURL: network.apiAddress });\n\n manager.notifyDataUpdate();\n\n manager.initializeGasPriceMap(allTransactions.map((tx) => tx.transaction));\n const price = economics?.price;\n\n let currentScreenIndex = 0;\n\n const updateScreen = async () => {\n const currentTransaction = allTransactions[currentScreenIndex];\n const transaction = currentTransaction?.transaction;\n\n const currentNonce = Number(transaction.nonce);\n\n try {\n manager.updateIsLoading(true);\n\n const { commonData, tokenTransaction, fungibleTransaction } =\n await getCommonData({\n allTransactions,\n currentScreenIndex,\n egldLabel,\n network,\n gasPriceData: manager.ppuMap[currentNonce],\n price,\n address,\n username,\n shard,\n signedIndexes,\n parsedTransactionsByDataField\n });\n\n if (tokenTransaction) {\n manager.updateTokenTransaction(tokenTransaction);\n }\n\n if (fungibleTransaction) {\n manager.updateNonFungibleTransaction(\n fungibleTransaction.type,\n fungibleTransaction\n );\n }\n\n manager.updateCommonData(commonData);\n } catch (error) {\n console.error(\n `Error fetching common data for transaction at index ${currentScreenIndex}:`,\n error\n );\n } finally {\n manager.updateIsLoading(false);\n }\n };\n\n const onBack = () => {\n if (currentScreenIndex > 0) {\n currentScreenIndex--;\n updateScreen();\n }\n };\n\n const onSetPpu = (\n ppu: ISignTransactionsPanelCommonData['ppu'] = EMPTY_PPU\n ) => {\n const currentTransaction = allTransactions[currentScreenIndex];\n const transaction = currentTransaction.transaction;\n const currentNonce = Number(transaction.nonce);\n\n manager.updateGasPriceMap({\n nonce: currentNonce,\n ppu\n });\n\n manager.updateCommonData({ ppu });\n\n const plainTransaction = transaction.toPlainObject();\n const newGasPrice = getRecommendedGasPrice({\n transaction: plainTransaction,\n gasPriceData: manager.ppuMap[currentNonce]\n });\n\n const newTransaction = Transaction.newFromPlainObject({\n ...plainTransaction,\n gasPrice: newGasPrice\n });\n\n const feeData = getFeeData({\n transaction: newTransaction,\n price\n });\n\n const formattedGasPrice = formatAmount({\n input: newGasPrice.toString(),\n decimals: DECIMALS,\n addCommas: true,\n digits: DIGITS\n });\n\n manager.updateCommonData({\n feeLimit: feeData.feeLimitFormatted,\n feeInFiatLimit: feeData.feeInFiatLimit,\n gasPrice: formattedGasPrice,\n ppu\n });\n };\n\n const onCancel = async () => {\n reject(new Error('Transaction signing cancelled by user'));\n await cancelCrossWindowAction();\n manager.closeUI();\n };\n\n const onNext = () => {\n if (currentScreenIndex < manager.transactionsCount - 1) {\n currentScreenIndex++;\n updateScreen();\n }\n };\n\n const onSign = async () => {\n const currentTransaction = allTransactions[currentScreenIndex];\n const transaction = currentTransaction.transaction;\n const currentNonce = Number(transaction.nonce);\n\n const { commonData } = await getCommonData({\n allTransactions,\n currentScreenIndex,\n egldLabel,\n network,\n gasPriceData: manager.ppuMap[currentNonce],\n price,\n address,\n username,\n shard,\n signedIndexes,\n parsedTransactionsByDataField\n });\n\n if (!commonData.needsSigning) {\n signedIndexes.push(currentScreenIndex);\n return onNext();\n }\n\n const plainTransaction = transaction.toPlainObject();\n const txNonce = plainTransaction.nonce;\n\n const newGasPrice = getRecommendedGasPrice({\n transaction: plainTransaction,\n gasPriceData: manager.ppuMap[txNonce]\n });\n\n const transactionToSign = Transaction.newFromPlainObject({\n ...plainTransaction,\n gasPrice: newGasPrice\n });\n\n try {\n const signedTxs = await handleSign([transactionToSign]);\n if (signedTxs) {\n signedIndexes.push(currentScreenIndex);\n signedTransactions.push(signedTxs[0]);\n }\n\n const isLastScreen = currentScreenIndex === allTransactions.length - 1;\n const allSignableTransactions = allTransactions.filter(\n (tx) => tx.needsSigning\n );\n\n const areAllTransactionsSigned =\n signedTransactions.length === allSignableTransactions.length;\n\n if (isLastScreen && areAllTransactionsSigned) {\n const optionallyGuardedTransactions =\n await guardTransactions(signedTransactions);\n manager.closeUI();\n return resolve(optionallyGuardedTransactions);\n }\n\n onNext();\n } catch (error) {\n manager.closeUI();\n reject(error);\n }\n };\n\n const eventHandlersMap = new Map([\n [SignEventsEnum.NEXT, onNext],\n [SignEventsEnum.CONFIRM, onSign],\n [SignEventsEnum.CLOSE, onCancel],\n [SignEventsEnum.BACK, onBack],\n [SignEventsEnum.SET_PPU, onSetPpu]\n ]);\n\n function setupEventListeners() {\n for (const [event, handler] of eventHandlersMap) {\n manager.subscribeToEventBus(event, handler);\n }\n }\n\n setupEventListeners();\n await updateScreen();\n });\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["signTransactions", "transactions", "handleSign", "guardTransactions", "address", "shard", "username", "getAccountInfo", "network", "networkSelector", "getState", "egldLabel", "getEgldLabel", "allTransactions", "parsedTransactionsByDataField", "getMultiEsdtTransferData", "signedIndexes", "manager", "SignTransactionsStateManager", "handleCancel", "cancelCrossWindowAction", "resolve", "reject", "signedTransactions", "economics", "getEconomics", "tx", "price", "currentScreenIndex", "updateScreen", "transaction", "currentNonce", "commonData", "tokenTransaction", "fungibleTransaction", "getCommonData", "error", "onBack", "onSetPpu", "ppu", "plainTransaction", "newGasPrice", "getRecommendedGasPrice", "newTransaction", "Transaction", "feeData", "getFeeData", "formattedGasPrice", "formatAmount", "DECIMALS", "DIGITS", "onCancel", "onNext", "onSign", "txNonce", "transactionToSign", "signedTxs", "isLastScreen", "allSignableTransactions", "areAllTransactionsSigned", "optionallyGuardedTransactions", "eventHandlersMap", "setupEventListeners", "event", "handler"]
|
|
7
|
+
}
|
|
@@ -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-AODYWSUW.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6AI3AGZ4.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/selectors/configSelectors.ts"],
|
|
4
|
-
"sourcesContent": ["import { StoreType } from 'store/store.types';\n\nexport const configSelector = ({ config }: StoreType) => config;\n\nexport const nativeAuthConfigSelector = ({ config }: StoreType) =>\n config.nativeAuthConfig;\n\nexport const walletConnectConfigSelector = ({ config }: StoreType) => {\n return config.walletConnectConfig;\n};\n
|
|
5
|
-
"mappings": "AAEO,IAAMA,EAAiB,CAAC,CAAE,OAAAC,CAAO,IAAiBA,EAE5CC,EAA2B,CAAC,CAAE,OAAAD,CAAO,IAChDA,EAAO,iBAEIE,EAA8B,CAAC,CAAE,OAAAF,CAAO,IAC5CA,EAAO
|
|
6
|
-
"names": ["configSelector", "config", "nativeAuthConfigSelector", "walletConnectConfigSelector"
|
|
4
|
+
"sourcesContent": ["import { StoreType } from 'store/store.types';\n\nexport const configSelector = ({ config }: StoreType) => config;\n\nexport const nativeAuthConfigSelector = ({ config }: StoreType) =>\n config.nativeAuthConfig;\n\nexport const walletConnectConfigSelector = ({ config }: StoreType) => {\n return config.walletConnectConfig;\n};\n"],
|
|
5
|
+
"mappings": "AAEO,IAAMA,EAAiB,CAAC,CAAE,OAAAC,CAAO,IAAiBA,EAE5CC,EAA2B,CAAC,CAAE,OAAAD,CAAO,IAChDA,EAAO,iBAEIE,EAA8B,CAAC,CAAE,OAAAF,CAAO,IAC5CA,EAAO",
|
|
6
|
+
"names": ["configSelector", "config", "nativeAuthConfigSelector", "walletConnectConfigSelector"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as r}from"./chunk-VMFJUT3G.mjs";import{a as e}from"./chunk-T4GLLB7R.mjs";var n=class{static get create(){return this.createComponent}static set create(t){this.createComponent=t}};n.createComponent=async({name:t,anchor:o})=>{if(await r(e),!e.document)return{};let m=e.document.createElement(t);return(o||e.document.body).appendChild(m),await customElements.whenDefined(t),m};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6KWXVSHC.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/ComponentFactory.ts"],
|
|
4
|
+
"sourcesContent": ["import { IEventBus } from '@multiversx/sdk-dapp-ui/dist/loader';\nimport { safeWindow } from 'constants/index';\nimport { UITagsEnum } from 'constants/UITags.enum';\nimport { defineCustomElements } from 'lib/sdkDappUi';\n\nexport interface CreateEventBusUIElementType extends HTMLElement {\n getEventBus: () => Promise<IEventBus | null>;\n}\n\nexport type CreateComponentType = <T = CreateEventBusUIElementType>({\n name,\n anchor\n}: {\n name: `${UITagsEnum}`;\n anchor?: HTMLElement;\n}) => Promise<T>;\n\nexport class ComponentFactory {\n private static createComponent: CreateComponentType = async <\n T = CreateEventBusUIElementType\n >({\n name,\n anchor\n }: {\n name: `${UITagsEnum}`;\n anchor?: HTMLElement;\n }) => {\n await defineCustomElements(safeWindow);\n\n if (!safeWindow.document) {\n return {} as T;\n }\n\n const element = safeWindow.document.createElement(name);\n const rootElement = anchor || safeWindow.document.body;\n rootElement.appendChild(element);\n await customElements.whenDefined(name);\n\n return element as T;\n };\n\n static get create() {\n return this.createComponent;\n }\n\n static set create(customCreateFunction: CreateComponentType) {\n this.createComponent = customCreateFunction;\n }\n}\n"],
|
|
5
|
+
"mappings": "kFAiBO,IAAMA,EAAN,KAAuB,CAwB5B,WAAW,QAAS,CAClB,OAAO,KAAK,eACd,CAEA,WAAW,OAAOC,EAA2C,CAC3D,KAAK,gBAAkBA,CACzB,CACF,EA/BaD,EACI,gBAAuC,MAEpD,CACA,KAAAE,EACA,OAAAC,CACF,IAGM,CAGJ,GAFA,MAAMC,EAAqBC,CAAU,EAEjC,CAACA,EAAW,SACd,MAAO,CAAC,EAGV,IAAMC,EAAUD,EAAW,SAAS,cAAcH,CAAI,EAEtD,OADoBC,GAAUE,EAAW,SAAS,MACtC,YAAYC,CAAO,EAC/B,MAAM,eAAe,YAAYJ,CAAI,EAE9BI,CACT",
|
|
6
|
+
"names": ["ComponentFactory", "customCreateFunction", "name", "anchor", "defineCustomElements", "safeWindow", "element"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"bignumber.js";var a=t=>{let i=new e(t).dividedBy(1e3).integerValue(e.ROUND_FLOOR),n=new e(i).dividedBy(60).integerValue(e.ROUND_FLOOR),r=new e(n).dividedBy(60).integerValue(e.ROUND_FLOOR),o=r.modulo(60).isGreaterThan(1),u=n.modulo(60).isGreaterThan(1),s=n.modulo(60).isLessThan(1);return o?`${r} hours`:u?`${n} minutes`:s?"less than 1 minute":`${n} minute`};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-6UZHM5LW.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/LogoutManager/helpers/getHumanReadableTokenExpirationTime.ts"],
|
|
4
|
+
"sourcesContent": ["import BigNumber from 'bignumber.js';\n\nexport const getHumanReadableTokenExpirationTime = (milliseconds: number) => {\n const seconds = new BigNumber(milliseconds)\n .dividedBy(1000)\n .integerValue(BigNumber.ROUND_FLOOR);\n\n const minutes = new BigNumber(seconds)\n .dividedBy(60)\n .integerValue(BigNumber.ROUND_FLOOR);\n\n const hours = new BigNumber(minutes)\n .dividedBy(60)\n .integerValue(BigNumber.ROUND_FLOOR);\n\n const overOneHour = hours.modulo(60).isGreaterThan(1);\n const overOneMinute = minutes.modulo(60).isGreaterThan(1);\n const underOneMinute = minutes.modulo(60).isLessThan(1);\n\n if (overOneHour) {\n return `${hours} hours`;\n }\n\n if (overOneMinute) {\n return `${minutes} minutes`;\n }\n\n if (underOneMinute) {\n return 'less than 1 minute';\n }\n\n return `${minutes} minute`;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAe,eAEf,IAAMC,EAAuCC,GAAyB,CAC3E,IAAMC,EAAU,IAAIH,EAAUE,CAAY,EACvC,UAAU,GAAI,EACd,aAAaF,EAAU,WAAW,EAE/BI,EAAU,IAAIJ,EAAUG,CAAO,EAClC,UAAU,EAAE,EACZ,aAAaH,EAAU,WAAW,EAE/BK,EAAQ,IAAIL,EAAUI,CAAO,EAChC,UAAU,EAAE,EACZ,aAAaJ,EAAU,WAAW,EAE/BM,EAAcD,EAAM,OAAO,EAAE,EAAE,cAAc,CAAC,EAC9CE,EAAgBH,EAAQ,OAAO,EAAE,EAAE,cAAc,CAAC,EAClDI,EAAiBJ,EAAQ,OAAO,EAAE,EAAE,WAAW,CAAC,EAEtD,OAAIE,EACK,GAAGD,CAAK,SAGbE,EACK,GAAGH,CAAO,WAGfI,EACK,qBAGF,GAAGJ,CAAO,SACnB",
|
|
6
|
+
"names": ["BigNumber", "getHumanReadableTokenExpirationTime", "milliseconds", "seconds", "minutes", "hours", "overOneHour", "overOneMinute", "underOneMinute"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-6KWXVSHC.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-7Z3LULCU.mjs.map
|