@dynamic-labs/sdk-react-core 0.18.0-RC.1 → 0.18.0-RC.3
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/CHANGELOG.md +35 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/index.cjs +10 -15
- package/src/index.js +3 -5
- package/src/lib/Main.cjs +5 -6
- package/src/lib/Main.js +4 -5
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +2 -1
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +2 -1
- package/src/lib/components/Alert/Alert.cjs +1 -1
- package/src/lib/components/Alert/Alert.js +1 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +2 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.js +2 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +19 -9
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +19 -9
- package/src/lib/components/Checkbox/Checkbox.cjs +1 -1
- package/src/lib/components/Checkbox/Checkbox.js +1 -1
- package/src/lib/components/Divider/Divider.cjs +2 -1
- package/src/lib/components/Divider/Divider.js +2 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +3 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +9 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +3 -2
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +1 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +1 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +1 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +1 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.cjs +1 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.js +1 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +1 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +1 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +1 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.js +1 -1
- package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -1
- package/src/lib/components/LogoutButton/LogoutButton.js +1 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +1 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -1
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +2 -1
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +2 -1
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +2 -1
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +2 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +2 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.js +2 -1
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +2 -1
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +2 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -1
- package/src/lib/components/OptionsSwitcher/OptionsSwitcher.d.ts +6 -6
- package/src/lib/components/OverlayCard/OverlayCard.cjs +2 -1
- package/src/lib/components/OverlayCard/OverlayCard.js +2 -1
- package/src/lib/components/Portal/Portal.cjs +2 -1
- package/src/lib/components/Portal/Portal.js +2 -1
- package/src/lib/components/Search/Search.cjs +1 -1
- package/src/lib/components/Search/Search.js +1 -1
- package/src/lib/components/Select/Select.cjs +1 -1
- package/src/lib/components/Select/Select.js +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +1 -1
- package/src/lib/components/ShadowDOM/utils.cjs +1 -1
- package/src/lib/components/ShadowDOM/utils.js +1 -1
- package/src/lib/components/Spinner/spinner.cjs +1 -1
- package/src/lib/components/Spinner/spinner.js +1 -1
- package/src/lib/components/Step/Step.cjs +14 -0
- package/src/lib/components/Step/Step.js +10 -0
- package/src/lib/components/Stepper/Stepper.cjs +14 -0
- package/src/lib/components/Stepper/Stepper.js +10 -0
- package/src/lib/components/Toolkit/Toolkit.cjs +1 -1
- package/src/lib/components/Toolkit/Toolkit.js +1 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +1 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +1 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +2 -1
- package/src/lib/components/Tooltip/Tooltip.js +2 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +2 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +2 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +2 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +2 -1
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -1
- package/src/lib/components/UserAddress/UserAddress.js +1 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +1 -1
- package/src/lib/components/UserProfile/UserProfile.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +3 -2
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +3 -2
- package/src/lib/components/UserProfileForm/UserProfileForm.cjs +43 -0
- package/src/lib/components/UserProfileForm/UserProfileForm.d.ts +11 -0
- package/src/lib/components/UserProfileForm/UserProfileForm.js +39 -0
- package/src/lib/components/index.d.ts +0 -2
- package/src/lib/context/DynamicContext/DynamicContext.cjs +80 -38
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +15 -3
- package/src/lib/context/DynamicContext/DynamicContext.js +77 -35
- package/src/lib/context/DynamicContext/helpers.cjs +3 -4
- package/src/lib/context/DynamicContext/helpers.js +2 -3
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +2 -2
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +2 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +2 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +2 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +5 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +5 -1
- package/src/lib/context/DynamicContext/validators.cjs +1 -1
- package/src/lib/context/DynamicContext/validators.js +1 -1
- package/src/lib/context/MockContext/MockContext.cjs +1 -1
- package/src/lib/context/MockContext/MockContext.js +1 -1
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +2 -1
- package/src/lib/context/QrCodeContext/QrCodeContext.js +2 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +2 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +2 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +2 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +2 -1
- package/src/lib/context/ThemeContext/themesData.cjs +1 -1
- package/src/lib/context/ThemeContext/themesData.js +1 -1
- package/src/lib/data/api.cjs +1 -1
- package/src/lib/data/api.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +4 -4
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +3 -3
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +10 -4
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +11 -5
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +53 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.d.ts +6 -2
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +49 -0
- package/src/lib/layouts/BridgeWelcomeLayout/index.d.ts +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +53 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +49 -0
- package/src/lib/layouts/SelectWalletListLayout/SelectWalletListLayout.cjs +52 -0
- package/src/lib/layouts/SelectWalletListLayout/SelectWalletListLayout.js +48 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/MultiWalletStepSelectorModal.cjs +77 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/MultiWalletStepSelectorModal.d.ts +2 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/MultiWalletStepSelectorModal.js +73 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/index.d.ts +1 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/ResumeView.cjs +61 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/ResumeView.d.ts +6 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/ResumeView.js +57 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/index.d.ts +1 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/SelectWalletView.cjs +89 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/SelectWalletView.d.ts +8 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/SelectWalletView.js +85 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/index.d.ts +1 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/WelcomeView.cjs +71 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/WelcomeView.d.ts +7 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/WelcomeView.js +67 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/index.d.ts +1 -0
- package/src/lib/modals/MultiWalletStepSelectorModal/views/index.d.ts +3 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +2 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +2 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -1
- package/src/lib/modals/index.d.ts +1 -0
- package/src/lib/shared/utils/classes/index.d.ts +1 -0
- package/src/lib/shared/utils/classes/storage/localStorage.cjs +68 -0
- package/src/lib/shared/utils/classes/storage/localStorage.d.ts +11 -0
- package/src/lib/shared/utils/classes/storage/localStorage.js +63 -0
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.cjs +3 -4
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.js +2 -3
- package/src/lib/shared/utils/functions/index.d.ts +0 -1
- package/src/lib/shared/utils/functions/wallet/createWallet.cjs +2 -2
- package/src/lib/shared/utils/functions/wallet/createWallet.d.ts +2 -1
- package/src/lib/shared/utils/functions/wallet/createWallet.js +2 -2
- package/src/lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.cjs +6 -1
- package/src/lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.d.ts +3 -1
- package/src/lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.js +6 -1
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.cjs +6 -18
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.js +6 -18
- package/src/lib/shared/utils/index.d.ts +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/localStorage.cjs +2 -2
- package/src/lib/utils/constants/localStorage.d.ts +1 -1
- package/src/lib/utils/constants/localStorage.js +2 -2
- package/src/lib/utils/functions/getAuthToken/getAuthToken.cjs +3 -5
- package/src/lib/utils/functions/getAuthToken/getAuthToken.d.ts +1 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.js +3 -5
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +1 -1
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +1 -1
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.cjs +2 -2
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.js +2 -2
- package/src/lib/utils/functions/groupBy/groupBy.cjs +30 -0
- package/src/lib/utils/functions/groupBy/groupBy.d.ts +12 -0
- package/src/lib/utils/functions/groupBy/groupBy.js +26 -0
- package/src/lib/utils/functions/groupBy/index.d.ts +1 -0
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +2 -2
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +2 -2
- package/src/lib/utils/functions/index.d.ts +1 -0
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.cjs +1 -1
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.js +1 -1
- package/src/lib/utils/functions/storeAuthToken/index.cjs +3 -4
- package/src/lib/utils/functions/storeAuthToken/index.js +2 -3
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.cjs +2 -2
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.d.ts +2 -1
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.js +2 -2
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +2 -2
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.d.ts +3 -1
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +2 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +9 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +8 -7
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +9 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +8 -7
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +2 -2
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +2 -2
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +1 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +1 -1
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +1 -1
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +1 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +58 -25
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +6 -5
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +60 -27
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +1 -1
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +1 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +4 -4
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +4 -4
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs +3 -4
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +4 -5
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.cjs +1 -1
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.js +1 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +2 -3
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +3 -4
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs +1 -1
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +1 -1
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +3 -4
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +2 -3
- package/src/lib/utils/hooks/useHandleWalletsToConnect/index.d.ts +1 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +35 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.d.ts +3 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +31 -0
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs +1 -1
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js +1 -1
- package/src/lib/utils/hooks/usePrimaryWalletId/index.d.ts +1 -0
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +35 -0
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.d.ts +5 -0
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +31 -0
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +1 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +1 -1
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.cjs +1 -1
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.js +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +5 -6
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +5 -6
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +6 -15
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +6 -5
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +6 -15
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +2 -2
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +2 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +1 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -1
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +5 -2
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +3 -1
- package/src/lib/utils/hooks/useWallets/useWallets.js +5 -2
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +1 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +2 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +2 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +2 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +2 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +3 -2
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +3 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +2 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +2 -1
- package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +1 -1
- package/src/lib/views/CollectUserDataView/fieldsConfig.js +1 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +2 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +2 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +4 -3
- package/src/lib/views/EmailUpdate/EmailUpdate.js +4 -3
- package/src/lib/views/EmailVerification/EmailVerification.cjs +9 -7
- package/src/lib/views/EmailVerification/EmailVerification.js +9 -7
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -1
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -1
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +6 -5
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +5 -4
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +3 -2
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +3 -2
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +2 -1
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +2 -1
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs +3 -4
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.js +2 -3
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +2 -1
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +2 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +2 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +2 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +3 -2
- package/src/lib/views/NoAccess/NoAccess.js +3 -2
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +5 -3
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +6 -4
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +2 -1
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +2 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -1
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +2 -1
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +2 -1
- package/src/lib/views/QrCodeView/QrCodeView.cjs +4 -2
- package/src/lib/views/QrCodeView/QrCodeView.js +5 -3
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +2 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +2 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +2 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +2 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +2 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +2 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +2 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +2 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +2 -1
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +2 -1
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +2 -1
- package/src/lib/views/WalletList/WalletList.cjs +24 -20
- package/src/lib/views/WalletList/WalletList.js +23 -19
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +8 -6
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +9 -7
- package/src/lib/views/WalletList/data.cjs +2 -2
- package/src/lib/views/WalletList/data.js +2 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -3
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -3
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +5 -4
- package/src/lib/views/WalletUsedView/WalletUsedView.js +5 -4
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +25 -5
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +5 -2
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +25 -5
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +51 -3
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.d.ts +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +52 -4
- package/src/lib/widgets/{DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs → DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs} +14 -19
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.d.ts +7 -0
- package/src/lib/widgets/{DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js → DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js} +11 -20
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +51 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +9 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +47 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs +44 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.d.ts +10 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js +41 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetViews/DynamicBridgeWidgetViews.cjs +6 -11
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetViews/DynamicBridgeWidgetViews.js +3 -4
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs +5 -4
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.d.ts +2 -2
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js +6 -5
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +24 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +24 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.cjs +24 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.js +25 -2
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +50 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +51 -2
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +43 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.d.ts +7 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +34 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +16 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +16 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +6 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +6 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js +3 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +2 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +4 -3
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +4 -3
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +5 -3
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +6 -4
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +3 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +5 -2
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +6 -3
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +2 -1
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +6 -21
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +6 -21
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +2 -1
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/{IndexView/IndexView.cjs → WalletsView/WalletsView.cjs} +4 -3
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/{IndexView/IndexView.js → WalletsView/WalletsView.js} +4 -3
- package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +2 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +2 -1
- package/src/lib/components/ChainWalletsList/ChainWalletsList.d.ts +0 -7
- package/src/lib/components/ChainWalletsList/index.d.ts +0 -1
- package/src/lib/components/WalletInfoCard/WalletInfoCard.d.ts +0 -8
- package/src/lib/components/WalletInfoCard/index.d.ts +0 -1
- package/src/lib/config/LSSuffix.cjs +0 -24
- package/src/lib/config/LSSuffix.d.ts +0 -7
- package/src/lib/config/LSSuffix.js +0 -22
- package/src/lib/shared/utils/functions/storage/getDynamicLSKey.cjs +0 -9
- package/src/lib/shared/utils/functions/storage/getDynamicLSKey.d.ts +0 -1
- package/src/lib/shared/utils/functions/storage/getDynamicLSKey.js +0 -5
- package/src/lib/shared/utils/functions/storage/getFromLS.cjs +0 -25
- package/src/lib/shared/utils/functions/storage/getFromLS.d.ts +0 -1
- package/src/lib/shared/utils/functions/storage/getFromLS.js +0 -21
- package/src/lib/shared/utils/functions/storage/index.d.ts +0 -4
- package/src/lib/shared/utils/functions/storage/removeFromLS.cjs +0 -15
- package/src/lib/shared/utils/functions/storage/removeFromLS.d.ts +0 -1
- package/src/lib/shared/utils/functions/storage/removeFromLS.js +0 -11
- package/src/lib/shared/utils/functions/storage/setToLS.cjs +0 -15
- package/src/lib/shared/utils/functions/storage/setToLS.d.ts +0 -1
- package/src/lib/shared/utils/functions/storage/setToLS.js +0 -11
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.d.ts +0 -5
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.d.ts +0 -2
|
@@ -7,7 +7,6 @@ var React = require('react');
|
|
|
7
7
|
var Typography = require('../../components/Typography/Typography.cjs');
|
|
8
8
|
require('@dynamic-labs/sdk-api');
|
|
9
9
|
require('../../shared/logger.cjs');
|
|
10
|
-
require('../../config/LSSuffix.cjs');
|
|
11
10
|
require('@dynamic-labs/iconic');
|
|
12
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
13
12
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
@@ -16,6 +15,7 @@ var signCircle = require('../../shared/assets/sign-circle.cjs');
|
|
|
16
15
|
require('@dynamic-labs/wallet-book');
|
|
17
16
|
require('@dynamic-labs/utils');
|
|
18
17
|
require('../../utils/constants/colors.cjs');
|
|
18
|
+
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
19
|
require('ethers');
|
|
20
20
|
var usePreventPageScroll = require('../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
|
|
21
21
|
var index = require('../../shared/consts/index.cjs');
|
|
@@ -42,6 +42,7 @@ require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
|
42
42
|
var VerticalDrawerTransition = require('../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs');
|
|
43
43
|
require('../../components/Alert/Alert.cjs');
|
|
44
44
|
var AppOriginTile = require('../../components/AppOriginTile/AppOriginTile.cjs');
|
|
45
|
+
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
45
46
|
require('../../context/MockContext/MockContext.cjs');
|
|
46
47
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
47
48
|
var useMutation = require('../../utils/hooks/useMutation/useMutation.cjs');
|
|
@@ -3,7 +3,6 @@ import { useRef, useState, useCallback } from 'react';
|
|
|
3
3
|
import { Typography } from '../../components/Typography/Typography.js';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import '../../shared/logger.js';
|
|
6
|
-
import '../../config/LSSuffix.js';
|
|
7
6
|
import '@dynamic-labs/iconic';
|
|
8
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
9
8
|
import '../../context/ViewContext/ViewContext.js';
|
|
@@ -12,6 +11,7 @@ import { ReactComponent as SvgSignCircle } from '../../shared/assets/sign-circle
|
|
|
12
11
|
import '@dynamic-labs/wallet-book';
|
|
13
12
|
import '@dynamic-labs/utils';
|
|
14
13
|
import '../../utils/constants/colors.js';
|
|
14
|
+
import '../../shared/utils/classes/storage/localStorage.js';
|
|
15
15
|
import 'ethers';
|
|
16
16
|
import { usePreventPageScroll } from '../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
|
|
17
17
|
import { authModalZIndex } from '../../shared/consts/index.js';
|
|
@@ -38,6 +38,7 @@ import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
|
38
38
|
import { VerticalDrawerTransition } from '../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js';
|
|
39
39
|
import '../../components/Alert/Alert.js';
|
|
40
40
|
import { AppOriginTile } from '../../components/AppOriginTile/AppOriginTile.js';
|
|
41
|
+
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
41
42
|
import '../../context/MockContext/MockContext.js';
|
|
42
43
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
43
44
|
import { useMutation } from '../../utils/hooks/useMutation/useMutation.js';
|
|
@@ -6,13 +6,13 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
require('@dynamic-labs/sdk-api');
|
|
8
8
|
require('../../shared/logger.cjs');
|
|
9
|
-
require('../../config/LSSuffix.cjs');
|
|
10
9
|
require('@dynamic-labs/iconic');
|
|
11
10
|
require('@dynamic-labs/wallet-connector-core');
|
|
12
11
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
13
12
|
require('@dynamic-labs/wallet-book');
|
|
14
13
|
require('@dynamic-labs/utils');
|
|
15
14
|
require('../../utils/constants/colors.cjs');
|
|
15
|
+
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
16
16
|
require('ethers');
|
|
17
17
|
var usePreventPageScroll = require('../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
|
|
18
18
|
var index = require('../../shared/consts/index.cjs');
|
|
@@ -32,6 +32,7 @@ require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
|
32
32
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
33
33
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
34
34
|
require('../../components/Alert/Alert.cjs');
|
|
35
|
+
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
35
36
|
require('../../context/MockContext/MockContext.cjs');
|
|
36
37
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
37
38
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -2,13 +2,13 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useState, useRef, useCallback } from 'react';
|
|
3
3
|
import '@dynamic-labs/sdk-api';
|
|
4
4
|
import '../../shared/logger.js';
|
|
5
|
-
import '../../config/LSSuffix.js';
|
|
6
5
|
import '@dynamic-labs/iconic';
|
|
7
6
|
import '@dynamic-labs/wallet-connector-core';
|
|
8
7
|
import '../../context/ViewContext/ViewContext.js';
|
|
9
8
|
import '@dynamic-labs/wallet-book';
|
|
10
9
|
import '@dynamic-labs/utils';
|
|
11
10
|
import '../../utils/constants/colors.js';
|
|
11
|
+
import '../../shared/utils/classes/storage/localStorage.js';
|
|
12
12
|
import 'ethers';
|
|
13
13
|
import { usePreventPageScroll } from '../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
|
|
14
14
|
import { authModalZIndex } from '../../shared/consts/index.js';
|
|
@@ -28,6 +28,7 @@ import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
|
28
28
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
29
29
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
30
30
|
import '../../components/Alert/Alert.js';
|
|
31
|
+
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
31
32
|
import '../../context/MockContext/MockContext.js';
|
|
32
33
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
33
34
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LocalStorage } from './storage/localStorage';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var localStorage = require('../../../../utils/constants/localStorage.cjs');
|
|
6
|
+
require('../../../../utils/constants/colors.cjs');
|
|
7
|
+
var logger = require('../../../logger.cjs');
|
|
8
|
+
|
|
9
|
+
class LocalStorage {
|
|
10
|
+
static getDynamicLSKey(key) {
|
|
11
|
+
return `${key}${LocalStorage.getSuffix()}`;
|
|
12
|
+
}
|
|
13
|
+
static setSuffix(localStorageSuffix) {
|
|
14
|
+
if (!LocalStorage.__suffix__) {
|
|
15
|
+
const suffix = (localStorageSuffix && `_${localStorageSuffix}`) || '';
|
|
16
|
+
LocalStorage.__suffix__ = suffix;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// Will be refactored on INC-155
|
|
20
|
+
static getAuthTokenValue() {
|
|
21
|
+
if (typeof window === 'undefined') {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
const value = window.localStorage.getItem(LocalStorage.getDynamicLSKey(localStorage.AUTH_TOKEN));
|
|
25
|
+
try {
|
|
26
|
+
if (value) {
|
|
27
|
+
return JSON.parse(value);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
logger.logger.error(e);
|
|
32
|
+
// Return auth token string for backwards compatibility
|
|
33
|
+
return value || undefined;
|
|
34
|
+
}
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
static getFromLS(key) {
|
|
38
|
+
if (typeof window === 'undefined') {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
const value = window.localStorage.getItem(LocalStorage.getDynamicLSKey(key));
|
|
42
|
+
try {
|
|
43
|
+
if (value) {
|
|
44
|
+
return JSON.parse(value);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch (e) {
|
|
48
|
+
logger.logger.error(e);
|
|
49
|
+
}
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
static removeFromLS(key) {
|
|
53
|
+
if (typeof window === 'undefined') {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
return window.localStorage.removeItem(LocalStorage.getDynamicLSKey(key));
|
|
57
|
+
}
|
|
58
|
+
static setToLS(key, value) {
|
|
59
|
+
if (typeof window === 'undefined') {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
window.localStorage.setItem(LocalStorage.getDynamicLSKey(key), JSON.stringify(value));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
LocalStorage.getSuffix = () => LocalStorage.__suffix__ || '';
|
|
66
|
+
|
|
67
|
+
exports.LocalStorage = LocalStorage;
|
|
68
|
+
exports["default"] = LocalStorage;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class LocalStorage {
|
|
2
|
+
private static __suffix__;
|
|
3
|
+
static getSuffix: () => string;
|
|
4
|
+
private static getDynamicLSKey;
|
|
5
|
+
static setSuffix(localStorageSuffix?: string): void;
|
|
6
|
+
static getAuthTokenValue(): string | undefined;
|
|
7
|
+
static getFromLS<T = any>(key: string): T | undefined;
|
|
8
|
+
static removeFromLS(key: string): void;
|
|
9
|
+
static setToLS<T = any>(key: string, value: T): void;
|
|
10
|
+
}
|
|
11
|
+
export default LocalStorage;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { AUTH_TOKEN } from '../../../../utils/constants/localStorage.js';
|
|
2
|
+
import '../../../../utils/constants/colors.js';
|
|
3
|
+
import { logger } from '../../../logger.js';
|
|
4
|
+
|
|
5
|
+
class LocalStorage {
|
|
6
|
+
static getDynamicLSKey(key) {
|
|
7
|
+
return `${key}${LocalStorage.getSuffix()}`;
|
|
8
|
+
}
|
|
9
|
+
static setSuffix(localStorageSuffix) {
|
|
10
|
+
if (!LocalStorage.__suffix__) {
|
|
11
|
+
const suffix = (localStorageSuffix && `_${localStorageSuffix}`) || '';
|
|
12
|
+
LocalStorage.__suffix__ = suffix;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
// Will be refactored on INC-155
|
|
16
|
+
static getAuthTokenValue() {
|
|
17
|
+
if (typeof window === 'undefined') {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
const value = window.localStorage.getItem(LocalStorage.getDynamicLSKey(AUTH_TOKEN));
|
|
21
|
+
try {
|
|
22
|
+
if (value) {
|
|
23
|
+
return JSON.parse(value);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
logger.error(e);
|
|
28
|
+
// Return auth token string for backwards compatibility
|
|
29
|
+
return value || undefined;
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
static getFromLS(key) {
|
|
34
|
+
if (typeof window === 'undefined') {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
const value = window.localStorage.getItem(LocalStorage.getDynamicLSKey(key));
|
|
38
|
+
try {
|
|
39
|
+
if (value) {
|
|
40
|
+
return JSON.parse(value);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
logger.error(e);
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
static removeFromLS(key) {
|
|
49
|
+
if (typeof window === 'undefined') {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
return window.localStorage.removeItem(LocalStorage.getDynamicLSKey(key));
|
|
53
|
+
}
|
|
54
|
+
static setToLS(key, value) {
|
|
55
|
+
if (typeof window === 'undefined') {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
window.localStorage.setItem(LocalStorage.getDynamicLSKey(key), JSON.stringify(value));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
LocalStorage.getSuffix = () => LocalStorage.__suffix__ || '';
|
|
62
|
+
|
|
63
|
+
export { LocalStorage, LocalStorage as default };
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var utils = require('@dynamic-labs/utils');
|
|
6
|
-
var localStorage = require('../../../../utils/constants/localStorage.cjs');
|
|
6
|
+
var localStorage$1 = require('../../../../utils/constants/localStorage.cjs');
|
|
7
7
|
require('../../../../utils/constants/colors.cjs');
|
|
8
|
-
var
|
|
9
|
-
require('../../../../config/LSSuffix.cjs');
|
|
8
|
+
var localStorage = require('../../classes/storage/localStorage.cjs');
|
|
10
9
|
var isWalletGroup = require('../../../../utils/functions/walletListBuilder/utils/isWalletGroup/isWalletGroup.cjs');
|
|
11
10
|
|
|
12
11
|
const comingSoonToMultiWalletMobile = ['Coinbase', 'MyAlgo', 'Braavos'];
|
|
13
12
|
const comingSoonToMultiWalletDesktop = ['MyAlgo'];
|
|
14
|
-
const getLastUsedWalletName = () =>
|
|
13
|
+
const getLastUsedWalletName = () => localStorage.LocalStorage.getFromLS(localStorage$1.LAST_USED_WALLET);
|
|
15
14
|
const getWalletGroupLabel = (walletGroup) => {
|
|
16
15
|
const lastUsedWalletName = getLastUsedWalletName();
|
|
17
16
|
const hasNestedLastUsedWallet = walletGroup.groupedWallets.some((walletOption) => walletOption.walletConnector.name === lastUsedWalletName);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { isMobile } from '@dynamic-labs/utils';
|
|
2
2
|
import { LAST_USED_WALLET } from '../../../../utils/constants/localStorage.js';
|
|
3
3
|
import '../../../../utils/constants/colors.js';
|
|
4
|
-
import {
|
|
5
|
-
import '../../../../config/LSSuffix.js';
|
|
4
|
+
import { LocalStorage } from '../../classes/storage/localStorage.js';
|
|
6
5
|
import { isWalletGroup } from '../../../../utils/functions/walletListBuilder/utils/isWalletGroup/isWalletGroup.js';
|
|
7
6
|
|
|
8
7
|
const comingSoonToMultiWalletMobile = ['Coinbase', 'MyAlgo', 'Braavos'];
|
|
9
8
|
const comingSoonToMultiWalletDesktop = ['MyAlgo'];
|
|
10
|
-
const getLastUsedWalletName = () => getFromLS(LAST_USED_WALLET);
|
|
9
|
+
const getLastUsedWalletName = () => LocalStorage.getFromLS(LAST_USED_WALLET);
|
|
11
10
|
const getWalletGroupLabel = (walletGroup) => {
|
|
12
11
|
const lastUsedWalletName = getLastUsedWalletName();
|
|
13
12
|
const hasNestedLastUsedWallet = walletGroup.groupedWallets.some((walletOption) => walletOption.walletConnector.name === lastUsedWalletName);
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
6
6
|
|
|
7
|
-
const createWallet = (wallet) => {
|
|
7
|
+
const createWallet = (walletBook$1, wallet) => {
|
|
8
8
|
var _a, _b;
|
|
9
9
|
return ({
|
|
10
|
-
group: (_a = walletBook.findWalletBookWallet(wallet.name)) === null || _a === void 0 ? void 0 : _a.group,
|
|
10
|
+
group: (_a = walletBook.findWalletBookWallet(walletBook$1, wallet.name)) === null || _a === void 0 ? void 0 : _a.group,
|
|
11
11
|
isInstalledOnBrowser: (_b = wallet.isInstalledOnBrowser()) !== null && _b !== void 0 ? _b : false,
|
|
12
12
|
key: wallet.key,
|
|
13
13
|
name: wallet.name,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
1
2
|
import type { WalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
2
3
|
import { WalletOption } from '../../../types';
|
|
3
|
-
export declare const createWallet: (wallet: WalletConnector) => WalletOption;
|
|
4
|
+
export declare const createWallet: (walletBook: WalletBookSchema, wallet: WalletConnector) => WalletOption;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
2
2
|
|
|
3
|
-
const createWallet = (wallet) => {
|
|
3
|
+
const createWallet = (walletBook, wallet) => {
|
|
4
4
|
var _a, _b;
|
|
5
5
|
return ({
|
|
6
|
-
group: (_a = findWalletBookWallet(wallet.name)) === null || _a === void 0 ? void 0 : _a.group,
|
|
6
|
+
group: (_a = findWalletBookWallet(walletBook, wallet.name)) === null || _a === void 0 ? void 0 : _a.group,
|
|
7
7
|
isInstalledOnBrowser: (_b = wallet.isInstalledOnBrowser()) !== null && _b !== void 0 ? _b : false,
|
|
8
8
|
key: wallet.key,
|
|
9
9
|
name: wallet.name,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var index = require('../../functions/lastAuthenticatedAccount/index.cjs');
|
|
7
7
|
|
|
8
|
-
const useGlobalLoading = ({ authMode, connectedInfo, connectedWallet, projectSettings, primaryWallet, user, }) => {
|
|
8
|
+
const useGlobalLoading = ({ authMode, connectedInfo, connectedWallet, projectSettings, primaryWallet, user, walletBook, }) => {
|
|
9
9
|
var _a;
|
|
10
10
|
const [sdkHasLoaded, setSdkHasLoaded] = React.useState(false);
|
|
11
11
|
const primaryWalletIsLoading = user &&
|
|
@@ -13,6 +13,10 @@ const useGlobalLoading = ({ authMode, connectedInfo, connectedWallet, projectSet
|
|
|
13
13
|
!primaryWallet;
|
|
14
14
|
const connectOnlyUserIsLoading = authMode === 'connect-only' && connectedInfo && !connectedWallet;
|
|
15
15
|
React.useEffect(() => {
|
|
16
|
+
var _a;
|
|
17
|
+
if (!Object.keys((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {}).length) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
16
20
|
if (projectSettings) {
|
|
17
21
|
if (primaryWalletIsLoading || connectOnlyUserIsLoading) {
|
|
18
22
|
return;
|
|
@@ -25,6 +29,7 @@ const useGlobalLoading = ({ authMode, connectedInfo, connectedWallet, projectSet
|
|
|
25
29
|
user,
|
|
26
30
|
primaryWalletIsLoading,
|
|
27
31
|
connectOnlyUserIsLoading,
|
|
32
|
+
walletBook,
|
|
28
33
|
]);
|
|
29
34
|
return {
|
|
30
35
|
sdkHasLoaded,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ProjectSettings } from '@dynamic-labs/sdk-api';
|
|
3
|
+
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
3
4
|
import { UserProfile, Wallet } from '../../../types';
|
|
4
5
|
import { ConnectedWalletConnectorType } from '../../../../utils/hooks/useConnectWallet/useConnectWallet';
|
|
5
6
|
type Props = {
|
|
@@ -9,8 +10,9 @@ type Props = {
|
|
|
9
10
|
primaryWallet: Wallet | null;
|
|
10
11
|
projectSettings: ProjectSettings | undefined;
|
|
11
12
|
user: UserProfile | undefined;
|
|
13
|
+
walletBook: WalletBookSchema;
|
|
12
14
|
};
|
|
13
|
-
export declare const useGlobalLoading: ({ authMode, connectedInfo, connectedWallet, projectSettings, primaryWallet, user, }: Props) => {
|
|
15
|
+
export declare const useGlobalLoading: ({ authMode, connectedInfo, connectedWallet, projectSettings, primaryWallet, user, walletBook, }: Props) => {
|
|
14
16
|
sdkHasLoaded: boolean;
|
|
15
17
|
setSdkHasLoaded: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
16
18
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
import { lastAuthenticatedAccount } from '../../functions/lastAuthenticatedAccount/index.js';
|
|
3
3
|
|
|
4
|
-
const useGlobalLoading = ({ authMode, connectedInfo, connectedWallet, projectSettings, primaryWallet, user, }) => {
|
|
4
|
+
const useGlobalLoading = ({ authMode, connectedInfo, connectedWallet, projectSettings, primaryWallet, user, walletBook, }) => {
|
|
5
5
|
var _a;
|
|
6
6
|
const [sdkHasLoaded, setSdkHasLoaded] = useState(false);
|
|
7
7
|
const primaryWalletIsLoading = user &&
|
|
@@ -9,6 +9,10 @@ const useGlobalLoading = ({ authMode, connectedInfo, connectedWallet, projectSet
|
|
|
9
9
|
!primaryWallet;
|
|
10
10
|
const connectOnlyUserIsLoading = authMode === 'connect-only' && connectedInfo && !connectedWallet;
|
|
11
11
|
useEffect(() => {
|
|
12
|
+
var _a;
|
|
13
|
+
if (!Object.keys((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {}).length) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
12
16
|
if (projectSettings) {
|
|
13
17
|
if (primaryWalletIsLoading || connectOnlyUserIsLoading) {
|
|
14
18
|
return;
|
|
@@ -21,6 +25,7 @@ const useGlobalLoading = ({ authMode, connectedInfo, connectedWallet, projectSet
|
|
|
21
25
|
user,
|
|
22
26
|
primaryWalletIsLoading,
|
|
23
27
|
connectOnlyUserIsLoading,
|
|
28
|
+
walletBook,
|
|
24
29
|
]);
|
|
25
30
|
return {
|
|
26
31
|
sdkHasLoaded,
|
|
@@ -4,27 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var logger = require('../../../logger.cjs');
|
|
7
|
-
require('
|
|
8
|
-
var getFromLS = require('../../functions/storage/getFromLS.cjs');
|
|
9
|
-
require('../../../../config/LSSuffix.cjs');
|
|
10
|
-
var removeFromLS = require('../../functions/storage/removeFromLS.cjs');
|
|
11
|
-
var setToLS = require('../../functions/storage/setToLS.cjs');
|
|
12
|
-
require('@dynamic-labs/iconic');
|
|
13
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
14
|
-
require('react/jsx-runtime');
|
|
15
|
-
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
16
|
-
require('@dynamic-labs/wallet-book');
|
|
17
|
-
require('@dynamic-labs/utils');
|
|
18
|
-
require('../../../../utils/constants/colors.cjs');
|
|
19
|
-
require('ethers');
|
|
7
|
+
var localStorage = require('../../classes/storage/localStorage.cjs');
|
|
20
8
|
|
|
21
9
|
const useLocalStorage = (key, initialValue, valueValidator, otherKeysToRemove) => {
|
|
22
10
|
const [storedValue, setStoredValue] = React.useState(() => {
|
|
23
11
|
try {
|
|
24
|
-
const item =
|
|
12
|
+
const item = localStorage.LocalStorage.getFromLS(key);
|
|
25
13
|
if (Boolean(item) && valueValidator && !valueValidator(item)) {
|
|
26
|
-
|
|
27
|
-
otherKeysToRemove === null || otherKeysToRemove === void 0 ? void 0 : otherKeysToRemove.forEach((k) =>
|
|
14
|
+
localStorage.LocalStorage.removeFromLS(key);
|
|
15
|
+
otherKeysToRemove === null || otherKeysToRemove === void 0 ? void 0 : otherKeysToRemove.forEach((k) => localStorage.LocalStorage.removeFromLS(k));
|
|
28
16
|
return initialValue;
|
|
29
17
|
}
|
|
30
18
|
else {
|
|
@@ -40,14 +28,14 @@ const useLocalStorage = (key, initialValue, valueValidator, otherKeysToRemove) =
|
|
|
40
28
|
try {
|
|
41
29
|
const valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
42
30
|
setStoredValue(valueToStore);
|
|
43
|
-
|
|
31
|
+
localStorage.LocalStorage.setToLS(key, valueToStore);
|
|
44
32
|
}
|
|
45
33
|
catch (error) {
|
|
46
34
|
logger.logger.error(error);
|
|
47
35
|
}
|
|
48
36
|
}, [key, storedValue]);
|
|
49
37
|
const removeValue = React.useCallback(() => {
|
|
50
|
-
|
|
38
|
+
localStorage.LocalStorage.removeFromLS(key);
|
|
51
39
|
setStoredValue(initialValue);
|
|
52
40
|
}, [initialValue, key]);
|
|
53
41
|
return [storedValue, setValue, removeValue];
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { useState, useCallback } from 'react';
|
|
2
2
|
import { logger } from '../../../logger.js';
|
|
3
|
-
import '
|
|
4
|
-
import { getFromLS } from '../../functions/storage/getFromLS.js';
|
|
5
|
-
import '../../../../config/LSSuffix.js';
|
|
6
|
-
import { removeFromLS } from '../../functions/storage/removeFromLS.js';
|
|
7
|
-
import { setToLS } from '../../functions/storage/setToLS.js';
|
|
8
|
-
import '@dynamic-labs/iconic';
|
|
9
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
10
|
-
import 'react/jsx-runtime';
|
|
11
|
-
import '../../../../context/ViewContext/ViewContext.js';
|
|
12
|
-
import '@dynamic-labs/wallet-book';
|
|
13
|
-
import '@dynamic-labs/utils';
|
|
14
|
-
import '../../../../utils/constants/colors.js';
|
|
15
|
-
import 'ethers';
|
|
3
|
+
import { LocalStorage } from '../../classes/storage/localStorage.js';
|
|
16
4
|
|
|
17
5
|
const useLocalStorage = (key, initialValue, valueValidator, otherKeysToRemove) => {
|
|
18
6
|
const [storedValue, setStoredValue] = useState(() => {
|
|
19
7
|
try {
|
|
20
|
-
const item = getFromLS(key);
|
|
8
|
+
const item = LocalStorage.getFromLS(key);
|
|
21
9
|
if (Boolean(item) && valueValidator && !valueValidator(item)) {
|
|
22
|
-
removeFromLS(key);
|
|
23
|
-
otherKeysToRemove === null || otherKeysToRemove === void 0 ? void 0 : otherKeysToRemove.forEach((k) => removeFromLS(k));
|
|
10
|
+
LocalStorage.removeFromLS(key);
|
|
11
|
+
otherKeysToRemove === null || otherKeysToRemove === void 0 ? void 0 : otherKeysToRemove.forEach((k) => LocalStorage.removeFromLS(k));
|
|
24
12
|
return initialValue;
|
|
25
13
|
}
|
|
26
14
|
else {
|
|
@@ -36,14 +24,14 @@ const useLocalStorage = (key, initialValue, valueValidator, otherKeysToRemove) =
|
|
|
36
24
|
try {
|
|
37
25
|
const valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
38
26
|
setStoredValue(valueToStore);
|
|
39
|
-
setToLS(key, valueToStore);
|
|
27
|
+
LocalStorage.setToLS(key, valueToStore);
|
|
40
28
|
}
|
|
41
29
|
catch (error) {
|
|
42
30
|
logger.error(error);
|
|
43
31
|
}
|
|
44
32
|
}, [key, storedValue]);
|
|
45
33
|
const removeValue = useCallback(() => {
|
|
46
|
-
removeFromLS(key);
|
|
34
|
+
LocalStorage.removeFromLS(key);
|
|
47
35
|
setStoredValue(initialValue);
|
|
48
36
|
}, [initialValue, key]);
|
|
49
37
|
return [storedValue, setValue, removeValue];
|