@dynamic-labs/sdk-react-core 0.18.0-RC.1 → 0.18.0-RC.11
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 +163 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +9 -9
- package/src/index.cjs +12 -8
- package/src/index.d.ts +1 -0
- package/src/index.js +7 -4
- package/src/lib/Main.cjs +8 -8
- package/src/lib/Main.js +7 -7
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +8 -4
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +9 -5
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.types.d.ts +1 -0
- 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 +3 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.js +3 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +20 -9
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +20 -9
- package/src/lib/components/Badge/Badge.cjs +1 -1
- package/src/lib/components/Badge/Badge.js +1 -1
- package/src/lib/components/ChainCard/ChainCard.cjs +11 -0
- package/src/lib/components/ChainCard/ChainCard.d.ts +4 -2
- package/src/lib/components/ChainCard/ChainCard.js +7 -0
- 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 +3 -1
- package/src/lib/components/Divider/Divider.js +3 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -3
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -3
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +11 -0
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +9 -0
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +7 -0
- 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/InlineWidget/InlineWidget.cjs +12 -0
- package/src/lib/components/InlineWidget/InlineWidget.d.ts +7 -0
- package/src/lib/components/InlineWidget/InlineWidget.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.cjs +12 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.d.ts +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/components/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/index.d.ts +2 -0
- package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -1
- package/src/lib/components/LogoutButton/LogoutButton.js +1 -1
- package/src/lib/components/Modal/Modal.cjs +37 -1
- package/src/lib/components/Modal/Modal.d.ts +3 -0
- package/src/lib/components/Modal/Modal.js +37 -1
- package/src/lib/components/ModalCard/ModalCard.cjs +4 -1
- package/src/lib/components/ModalCard/ModalCard.d.ts +6 -1
- package/src/lib/components/ModalCard/ModalCard.js +4 -1
- package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +1 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +27 -2
- package/src/lib/components/NetworkPicker/NetworkPicker.js +27 -2
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +3 -1
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +3 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +6 -2
- package/src/lib/components/NetworkPicker/components/Network/Network.d.ts +2 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.js +6 -2
- package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.cjs +6 -1
- package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.d.ts +2 -1
- package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.js +6 -1
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.cjs +0 -5
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.d.ts +1 -1
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.js +0 -5
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +3 -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 +5 -4
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +0 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +5 -4
- package/src/lib/components/OptionsSwitcher/OptionsSwitcher.d.ts +6 -6
- package/src/lib/components/OverlayCard/OverlayCard.cjs +3 -1
- package/src/lib/components/OverlayCard/OverlayCard.js +3 -1
- package/src/lib/components/Portal/Portal.cjs +4 -2
- package/src/lib/components/Portal/Portal.js +4 -2
- 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/SelectWalletChainLayout/SelectWalletChainLayout.cjs +12 -0
- package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.d.ts +0 -2
- package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.js +8 -0
- 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 +46 -0
- package/src/lib/components/Step/Step.d.ts +3 -3
- package/src/lib/components/Step/Step.js +42 -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 +4 -2
- package/src/lib/components/Tooltip/Tooltip.js +4 -2
- package/src/lib/components/TosAndPp/TosAndPp.cjs +6 -5
- package/src/lib/components/TosAndPp/TosAndPp.d.ts +3 -4
- package/src/lib/components/TosAndPp/TosAndPp.js +6 -5
- 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 +3 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +3 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +3 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +3 -1
- package/src/lib/components/Transition/transition.type.d.ts +3 -3
- package/src/lib/components/UserAddress/UserAddress.cjs +31 -3
- package/src/lib/components/UserAddress/UserAddress.d.ts +4 -2
- package/src/lib/components/UserAddress/UserAddress.js +31 -3
- 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 +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +3 -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 +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +3 -1
- 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 +1 -2
- package/src/lib/context/DynamicContext/DynamicContext.cjs +147 -59
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +23 -4
- package/src/lib/context/DynamicContext/DynamicContext.js +147 -59
- package/src/lib/context/DynamicContext/helpers.cjs +15 -4
- package/src/lib/context/DynamicContext/helpers.d.ts +6 -0
- package/src/lib/context/DynamicContext/helpers.js +15 -5
- 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 +3 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +3 -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 +7 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +7 -1
- package/src/lib/context/DynamicContext/validators.cjs +1 -1
- package/src/lib/context/DynamicContext/validators.js +1 -1
- package/src/lib/context/ErrorContext/ErrorContext.cjs +6 -0
- package/src/lib/context/ErrorContext/ErrorContext.js +6 -0
- package/src/lib/context/MockContext/MockContext.cjs +2 -14
- package/src/lib/context/MockContext/MockContext.js +2 -14
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +3 -1
- package/src/lib/context/QrCodeContext/QrCodeContext.js +3 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +3 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +3 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +3 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +3 -1
- package/src/lib/context/ThemeContext/themesData.cjs +1 -1
- package/src/lib/context/ThemeContext/themesData.js +1 -1
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +46 -0
- package/src/lib/context/WalletContext/WalletContext.d.ts +7 -0
- package/src/lib/context/WalletContext/WalletContext.js +41 -0
- package/src/lib/context/WalletContext/index.d.ts +1 -0
- package/src/lib/context/WalletGroupContext/WalletGroupContext.cjs +37 -0
- package/src/lib/context/WalletGroupContext/WalletGroupContext.d.ts +9 -0
- package/src/lib/context/WalletGroupContext/WalletGroupContext.js +27 -0
- package/src/lib/data/api.cjs +4 -1
- package/src/lib/data/api.js +5 -2
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +20 -57
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.d.ts +1 -6
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +21 -58
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +37 -15
- package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +1 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +38 -16
- package/src/lib/layout/DynamicAuthLayout/Header/header.types.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/EmptyFooterContent/empty-footer-content.cjs → HelpContent/EmptyHelpContent/EmptyHelpContent.cjs} +2 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/EmptyHelpContent.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/EmptyHelpContent.js +6 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +36 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +32 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +56 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +52 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +5 -4
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +4 -3
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.cjs → HelpContent/WalletListHelpContent/WalletListHelpContent.cjs} +13 -6
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.d.ts → HelpContent/WalletListHelpContent/WalletListHelpContent.d.ts} +1 -1
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.js → HelpContent/WalletListHelpContent/WalletListHelpContent.js} +14 -7
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/WalletMoreInfoContent.cjs +6 -6
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +7 -0
- package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/WalletMoreInfoContent.js +6 -6
- package/src/lib/layout/DynamicAuthLayout/HelpContent/index.d.ts +4 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +49 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +45 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +59 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +55 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.cjs +18 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.d.ts +3 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.js +14 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/utils/index.d.ts +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +52 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.d.ts +9 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +48 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/index.d.ts +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +54 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.d.ts +6 -2
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +50 -0
- package/src/lib/layouts/BridgeWelcomeLayout/index.d.ts +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +54 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +50 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +3 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +3 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +3 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +3 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +3 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +3 -1
- package/src/lib/shared/assets/chevron-left.cjs +5 -5
- package/src/lib/shared/assets/chevron-left.js +5 -5
- package/src/lib/shared/assets/close.cjs +5 -5
- package/src/lib/shared/assets/close.js +5 -5
- package/src/lib/shared/assets/footer-info-icon.cjs +2 -2
- package/src/lib/shared/assets/footer-info-icon.js +2 -2
- package/src/lib/shared/assets/index.d.ts +2 -0
- package/src/lib/shared/assets/key.cjs +53 -0
- package/src/lib/shared/assets/key.js +29 -0
- package/src/lib/shared/assets/question-mark.cjs +58 -0
- package/src/lib/shared/assets/question-mark.js +34 -0
- package/src/lib/shared/types/index.d.ts +3 -0
- package/src/lib/shared/utils/classes/index.d.ts +1 -0
- package/src/lib/shared/utils/classes/storage/localStorage.cjs +74 -0
- package/src/lib/shared/utils/classes/storage/localStorage.d.ts +12 -0
- package/src/lib/shared/utils/classes/storage/localStorage.js +69 -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/index.d.ts +1 -0
- 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/hooks/useMediaQuery/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useMediaQuery/useMediaQuery.cjs +31 -0
- package/src/lib/shared/utils/hooks/useMediaQuery/useMediaQuery.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useMediaQuery/useMediaQuery.js +27 -0
- 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 +7 -27
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.d.ts +3 -4
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +8 -28
- package/src/lib/utils/functions/getMissingChains/getMissingChains.cjs +16 -0
- package/src/lib/utils/functions/getMissingChains/getMissingChains.d.ts +3 -0
- package/src/lib/utils/functions/getMissingChains/getMissingChains.js +12 -0
- package/src/lib/utils/functions/getMissingChains/index.d.ts +1 -0
- 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/getWalletConnectorNetworks/getWalletConnectorNetworks.cjs +12 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.d.ts +3 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.js +8 -0
- package/src/lib/utils/functions/groupBy/groupBy.d.ts +12 -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 +3 -0
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.cjs +3 -2
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.js +3 -2
- package/src/lib/utils/functions/isProviderEnabled/index.d.ts +1 -0
- package/src/lib/utils/functions/isProviderEnabled/isProviderEnabled.cjs +7 -0
- package/src/lib/utils/functions/isProviderEnabled/isProviderEnabled.d.ts +2 -0
- package/src/lib/utils/functions/isProviderEnabled/isProviderEnabled.js +3 -0
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +8 -8
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +8 -8
- 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/utils/isWalletGroup/isWalletGroup.d.ts +2 -4
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +3 -3
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.d.ts +3 -1
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +26 -9
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +25 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +12 -9
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +11 -8
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -16
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -16
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +13 -0
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +13 -0
- package/src/lib/utils/hooks/index.d.ts +4 -0
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +13 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +13 -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/useAuthLayoutChecks/index.d.ts +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +82 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +11 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +78 -0
- 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/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +16 -3
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +16 -3
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.cjs +16 -18
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.js +16 -18
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +73 -21
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +17 -4
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +75 -23
- 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/useCountdown/useCountdown.cjs +39 -0
- package/src/lib/utils/hooks/useCountdown/useCountdown.d.ts +11 -0
- package/src/lib/utils/hooks/useCountdown/useCountdown.js +35 -0
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +9 -8
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +9 -8
- package/src/lib/utils/hooks/useDynamicScopes/index.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +40 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.d.ts +6 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +36 -0
- 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 +7 -11
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +8 -12
- 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 +45 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.d.ts +3 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +41 -0
- package/src/lib/utils/hooks/useInterval/useInterval.d.ts +1 -0
- package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs +10 -0
- package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +2 -0
- package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +6 -0
- package/src/lib/utils/hooks/useKeyboardEventListener/useKeyboardEventListener.cjs +6 -8
- package/src/lib/utils/hooks/useKeyboardEventListener/useKeyboardEventListener.js +7 -9
- 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/usePromise/usePromise.cjs +6 -2
- package/src/lib/utils/hooks/usePromise/usePromise.d.ts +4 -1
- package/src/lib/utils/hooks/usePromise/usePromise.js +6 -2
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +7 -29
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.d.ts +0 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +8 -30
- package/src/lib/utils/hooks/useTimeout/useTimeout.cjs +27 -0
- package/src/lib/utils/hooks/useTimeout/useTimeout.d.ts +1 -0
- package/src/lib/utils/hooks/useTimeout/useTimeout.js +23 -0
- package/src/lib/utils/hooks/useTransition/useTransition.cjs +16 -24
- package/src/lib/utils/hooks/useTransition/useTransition.d.ts +3 -3
- package/src/lib/utils/hooks/useTransition/useTransition.js +17 -25
- package/src/lib/utils/hooks/useTransitionEvents/useTransitionEvents.cjs +11 -9
- package/src/lib/utils/hooks/useTransitionEvents/useTransitionEvents.js +11 -9
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +4 -3
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +4 -3
- 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/useUserUpdateRequest/useUserUpdateRequest.cjs +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +1 -1
- package/src/lib/utils/hooks/useValidateSession/index.d.ts +1 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +79 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +12 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +75 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +14 -24
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +15 -25
- 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 +2 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +2 -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 +3 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +3 -1
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +14 -2
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +4 -1
- package/src/lib/utils/hooks/useWallets/useWallets.js +15 -3
- package/src/lib/utils/hooks/useWallets/utils/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs +35 -0
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.d.ts +6 -0
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js +29 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +1 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +1 -1
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +38 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.d.ts +2 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +34 -0
- package/src/lib/views/BridgeNextWalletConnectionView/index.d.ts +1 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +44 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.d.ts +2 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +40 -0
- package/src/lib/views/BridgeSummaryView/index.d.ts +1 -0
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +48 -0
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.d.ts +2 -0
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +44 -0
- package/src/lib/views/BridgeWelcomeView/index.d.ts +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +3 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +3 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +4 -2
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +4 -2
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +4 -2
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +4 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +3 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +3 -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 +4 -2
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +4 -2
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +5 -4
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +5 -4
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +7 -4
- package/src/lib/views/EmailUpdate/EmailUpdate.js +7 -4
- package/src/lib/views/EmailVerification/EmailVerification.cjs +25 -32
- package/src/lib/views/EmailVerification/EmailVerification.js +26 -33
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +5 -3
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +5 -3
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +10 -7
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +9 -6
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +3 -1
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +3 -1
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +5 -2
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +5 -2
- 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 +3 -1
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +3 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +16 -10
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +16 -10
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +29 -16
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +29 -16
- package/src/lib/views/NoAccess/NoAccess.cjs +14 -21
- package/src/lib/views/NoAccess/NoAccess.js +14 -21
- package/src/lib/views/NoAccess/useNoAccessText.cjs +93 -0
- package/src/lib/views/NoAccess/useNoAccessText.d.ts +31 -0
- package/src/lib/views/NoAccess/useNoAccessText.js +88 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +6 -3
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +7 -4
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +3 -1
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +3 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +5 -4
- package/src/lib/views/PendingConnectView/PendingConnectView.js +5 -4
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +5 -4
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +5 -4
- package/src/lib/views/QrCodeView/QRCode.cjs +36 -4
- package/src/lib/views/QrCodeView/QRCode.js +37 -5
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +5 -3
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +1 -3
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +5 -3
- package/src/lib/views/QrCodeView/QrCodeView.cjs +9 -9
- package/src/lib/views/QrCodeView/QrCodeView.js +10 -10
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +3 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +3 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +5 -5
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +5 -5
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +3 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +3 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +3 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +3 -1
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs +15 -0
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.js +15 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +3 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +3 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +21 -0
- package/src/lib/views/WalletGroupView/WalletGroupView.d.ts +2 -0
- package/src/lib/views/WalletGroupView/WalletGroupView.js +17 -0
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +55 -0
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.d.ts +6 -0
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +51 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +3 -1
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +3 -1
- package/src/lib/views/WalletList/WalletList.cjs +29 -25
- package/src/lib/views/WalletList/WalletList.js +30 -26
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +13 -5
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +14 -6
- package/src/lib/views/WalletList/data.cjs +4 -3
- package/src/lib/views/WalletList/data.js +4 -3
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +63 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.d.ts +2 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.js +59 -0
- package/src/lib/views/WalletLockedView/index.d.ts +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +5 -3
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +5 -3
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +6 -4
- package/src/lib/views/WalletUsedView/WalletUsedView.js +6 -4
- package/src/lib/views/viewToComponentMap.cjs +11 -0
- package/src/lib/views/viewToComponentMap.js +11 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +34 -7
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +2 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +35 -8
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +52 -3
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.d.ts +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +53 -4
- package/src/lib/widgets/{DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs → DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs} +15 -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} +12 -20
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +52 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +9 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +48 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +59 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.d.ts +7 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +55 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/index.d.ts +1 -0
- 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 +53 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +54 -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 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +17 -4
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +17 -4
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.types.d.ts +2 -7
- 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 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +17 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +17 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +7 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +7 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +3 -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 +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +13 -2
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +14 -3
- 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 +3 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +3 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +5 -3
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +5 -3
- package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +18 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.d.ts +3 -0
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +18 -2
- 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 +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +6 -3
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +7 -4
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +7 -3
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +3 -1
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +7 -21
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +7 -21
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +3 -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} +5 -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} +5 -3
- package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +3 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +3 -1
- package/src/polyfills.cjs +1 -2
- package/src/polyfills.js +1 -2
- 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/layout/DynamicAuthLayout/Footer/Footer.cjs +0 -65
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.d.ts +0 -10
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +0 -61
- package/src/lib/layout/DynamicAuthLayout/Footer/index.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/FooterContent/EmptyFooterContent/empty-footer-content.d.ts +0 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/EmptyFooterContent/empty-footer-content.js +0 -6
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/index.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +0 -8
- package/src/lib/layout/DynamicAuthLayout/FooterContent/index.d.ts +0 -3
- 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/utils/functions/hasWalletGroupFlag/hasWalletGroupFlag.cjs +0 -12
- package/src/lib/utils/functions/hasWalletGroupFlag/hasWalletGroupFlag.d.ts +0 -1
- package/src/lib/utils/functions/hasWalletGroupFlag/hasWalletGroupFlag.js +0 -8
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs +0 -9
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.d.ts +0 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js +0 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.d.ts +0 -5
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.d.ts +0 -2
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/index.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.cjs +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.js +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/index.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/index.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/index.d.ts +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
const useCountdown = ({ callback, seconds }) => {
|
|
8
|
+
const [remainingSeconds, setRemainingSeconds] = React.useState(seconds);
|
|
9
|
+
const timeoutRef = React.useRef();
|
|
10
|
+
const startCountdown = () => {
|
|
11
|
+
if (timeoutRef.current) {
|
|
12
|
+
return setRemainingSeconds(seconds);
|
|
13
|
+
}
|
|
14
|
+
runCountdown();
|
|
15
|
+
};
|
|
16
|
+
const stopCountdown = () => {
|
|
17
|
+
clearTimeout(timeoutRef.current);
|
|
18
|
+
timeoutRef.current = undefined;
|
|
19
|
+
};
|
|
20
|
+
const runCountdown = () => {
|
|
21
|
+
timeoutRef.current = setTimeout(() => {
|
|
22
|
+
setRemainingSeconds((prevSeconds) => prevSeconds - 1);
|
|
23
|
+
}, 1000);
|
|
24
|
+
};
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
if (!timeoutRef.current)
|
|
27
|
+
return;
|
|
28
|
+
if (remainingSeconds <= 0) {
|
|
29
|
+
if (callback)
|
|
30
|
+
callback();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
runCountdown();
|
|
34
|
+
return () => clearTimeout(timeoutRef.current);
|
|
35
|
+
}, [remainingSeconds, callback]);
|
|
36
|
+
return { remainingSeconds, startCountdown, stopCountdown };
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.useCountdown = useCountdown;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Prop = {
|
|
2
|
+
callback?: () => void;
|
|
3
|
+
seconds: number;
|
|
4
|
+
};
|
|
5
|
+
export interface UseCountdown {
|
|
6
|
+
remainingSeconds: number;
|
|
7
|
+
startCountdown: () => void;
|
|
8
|
+
stopCountdown: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const useCountdown: ({ callback, seconds }: Prop) => UseCountdown;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useState, useRef, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const useCountdown = ({ callback, seconds }) => {
|
|
4
|
+
const [remainingSeconds, setRemainingSeconds] = useState(seconds);
|
|
5
|
+
const timeoutRef = useRef();
|
|
6
|
+
const startCountdown = () => {
|
|
7
|
+
if (timeoutRef.current) {
|
|
8
|
+
return setRemainingSeconds(seconds);
|
|
9
|
+
}
|
|
10
|
+
runCountdown();
|
|
11
|
+
};
|
|
12
|
+
const stopCountdown = () => {
|
|
13
|
+
clearTimeout(timeoutRef.current);
|
|
14
|
+
timeoutRef.current = undefined;
|
|
15
|
+
};
|
|
16
|
+
const runCountdown = () => {
|
|
17
|
+
timeoutRef.current = setTimeout(() => {
|
|
18
|
+
setRemainingSeconds((prevSeconds) => prevSeconds - 1);
|
|
19
|
+
}, 1000);
|
|
20
|
+
};
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!timeoutRef.current)
|
|
23
|
+
return;
|
|
24
|
+
if (remainingSeconds <= 0) {
|
|
25
|
+
if (callback)
|
|
26
|
+
callback();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
runCountdown();
|
|
30
|
+
return () => clearTimeout(timeoutRef.current);
|
|
31
|
+
}, [remainingSeconds, callback]);
|
|
32
|
+
return { remainingSeconds, startCountdown, stopCountdown };
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { useCountdown };
|
package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs
CHANGED
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
7
8
|
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
8
9
|
var decodeJwt = require('../../../shared/utils/functions/decodeJwt/decodeJwt.cjs');
|
|
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('react/jsx-runtime');
|
|
13
|
+
require('../../../shared/logger.cjs');
|
|
14
14
|
require('@dynamic-labs/wallet-book');
|
|
15
15
|
require('@dynamic-labs/utils');
|
|
16
16
|
require('../../constants/colors.cjs');
|
|
17
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
17
18
|
require('ethers');
|
|
18
19
|
require('../../../shared/consts/index.cjs');
|
|
19
20
|
var index = require('../../functions/storeAuthToken/index.cjs');
|
|
@@ -23,19 +24,19 @@ require('@dynamic-labs/sdk-api');
|
|
|
23
24
|
|
|
24
25
|
const useCreateUserProfileByJWTCallback = () => {
|
|
25
26
|
const { setUser, handleLogOut } = useInternalDynamicContext.useInternalDynamicContext();
|
|
26
|
-
const {
|
|
27
|
-
const createUserProfileByJWT = React.useCallback((jwt) => {
|
|
27
|
+
const { goToInitialView } = ViewContext.useViewContext();
|
|
28
|
+
const createUserProfileByJWT = React.useCallback((jwt) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
28
29
|
const decodedJWT = decodeJwt.decodeJwt(jwt);
|
|
29
30
|
if (!decodedJWT) {
|
|
30
|
-
handleLogOut();
|
|
31
|
-
|
|
31
|
+
yield handleLogOut();
|
|
32
|
+
goToInitialView();
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
35
|
+
index.storeAuthToken(jwt);
|
|
34
36
|
const userProfile = createUserProfile.createUserProfile(decodedJWT);
|
|
35
37
|
setUser(userProfile);
|
|
36
|
-
index.storeAuthToken(jwt);
|
|
37
38
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
-
}, []);
|
|
39
|
+
}), []);
|
|
39
40
|
return { createUserProfileByJWT };
|
|
40
41
|
};
|
|
41
42
|
|
package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
1
2
|
import { useCallback } from 'react';
|
|
2
3
|
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
3
4
|
import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
|
|
4
5
|
import { decodeJwt } from '../../../shared/utils/functions/decodeJwt/decodeJwt.js';
|
|
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 'react/jsx-runtime';
|
|
9
|
+
import '../../../shared/logger.js';
|
|
10
10
|
import '@dynamic-labs/wallet-book';
|
|
11
11
|
import '@dynamic-labs/utils';
|
|
12
12
|
import '../../constants/colors.js';
|
|
13
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
13
14
|
import 'ethers';
|
|
14
15
|
import '../../../shared/consts/index.js';
|
|
15
16
|
import { storeAuthToken } from '../../functions/storeAuthToken/index.js';
|
|
@@ -19,19 +20,19 @@ import '@dynamic-labs/sdk-api';
|
|
|
19
20
|
|
|
20
21
|
const useCreateUserProfileByJWTCallback = () => {
|
|
21
22
|
const { setUser, handleLogOut } = useInternalDynamicContext();
|
|
22
|
-
const {
|
|
23
|
-
const createUserProfileByJWT = useCallback((jwt) => {
|
|
23
|
+
const { goToInitialView } = useViewContext();
|
|
24
|
+
const createUserProfileByJWT = useCallback((jwt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
25
|
const decodedJWT = decodeJwt(jwt);
|
|
25
26
|
if (!decodedJWT) {
|
|
26
|
-
handleLogOut();
|
|
27
|
-
|
|
27
|
+
yield handleLogOut();
|
|
28
|
+
goToInitialView();
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
31
|
+
storeAuthToken(jwt);
|
|
30
32
|
const userProfile = createUserProfile(decodedJWT);
|
|
31
33
|
setUser(userProfile);
|
|
32
|
-
storeAuthToken(jwt);
|
|
33
34
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
34
|
-
}, []);
|
|
35
|
+
}), []);
|
|
35
36
|
return { createUserProfileByJWT };
|
|
36
37
|
};
|
|
37
38
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useDynamicScopes } from './useDynamicScopes';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
7
|
+
|
|
8
|
+
// This hook can be used to get all of the user's scopes (nft/token gates)
|
|
9
|
+
// and check if the user has a specific scopes with some logic AND/OR (nft/token gate)
|
|
10
|
+
const useDynamicScopes = () => {
|
|
11
|
+
const { decodedAuthToken } = useInternalDynamicContext.useInternalDynamicContext();
|
|
12
|
+
const userScopes = React.useMemo(() => {
|
|
13
|
+
const { scope } = decodedAuthToken || {};
|
|
14
|
+
if (!scope)
|
|
15
|
+
return [];
|
|
16
|
+
// We need to split the scopes string into an array of scopes
|
|
17
|
+
// because the scopes string is a space separated string of scopes
|
|
18
|
+
// e.g. '"scope": "customerservice marketing tech"'
|
|
19
|
+
return scope.split(' ');
|
|
20
|
+
}, [decodedAuthToken]);
|
|
21
|
+
// If customer will set scopes to an empty string it will return false
|
|
22
|
+
const userHasScopes = (scopes, logicOperator = 'OR') => {
|
|
23
|
+
if (!scopes.length)
|
|
24
|
+
return false;
|
|
25
|
+
if (typeof scopes === 'string')
|
|
26
|
+
scopes = scopes.split(' ');
|
|
27
|
+
if (logicOperator === 'AND') {
|
|
28
|
+
// If the logic operator is AND, the user must have all of the scopes
|
|
29
|
+
// If the logic operator is OR, the user must have at least one of the scopes
|
|
30
|
+
return scopes.every((scope) => Boolean(userScopes.includes(scope)));
|
|
31
|
+
}
|
|
32
|
+
return scopes.some((scope) => Boolean(userScopes.includes(scope)));
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
userHasScopes,
|
|
36
|
+
userScopes,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
exports.useDynamicScopes = useDynamicScopes;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
3
|
+
|
|
4
|
+
// This hook can be used to get all of the user's scopes (nft/token gates)
|
|
5
|
+
// and check if the user has a specific scopes with some logic AND/OR (nft/token gate)
|
|
6
|
+
const useDynamicScopes = () => {
|
|
7
|
+
const { decodedAuthToken } = useInternalDynamicContext();
|
|
8
|
+
const userScopes = useMemo(() => {
|
|
9
|
+
const { scope } = decodedAuthToken || {};
|
|
10
|
+
if (!scope)
|
|
11
|
+
return [];
|
|
12
|
+
// We need to split the scopes string into an array of scopes
|
|
13
|
+
// because the scopes string is a space separated string of scopes
|
|
14
|
+
// e.g. '"scope": "customerservice marketing tech"'
|
|
15
|
+
return scope.split(' ');
|
|
16
|
+
}, [decodedAuthToken]);
|
|
17
|
+
// If customer will set scopes to an empty string it will return false
|
|
18
|
+
const userHasScopes = (scopes, logicOperator = 'OR') => {
|
|
19
|
+
if (!scopes.length)
|
|
20
|
+
return false;
|
|
21
|
+
if (typeof scopes === 'string')
|
|
22
|
+
scopes = scopes.split(' ');
|
|
23
|
+
if (logicOperator === 'AND') {
|
|
24
|
+
// If the logic operator is AND, the user must have all of the scopes
|
|
25
|
+
// If the logic operator is OR, the user must have at least one of the scopes
|
|
26
|
+
return scopes.every((scope) => Boolean(userScopes.includes(scope)));
|
|
27
|
+
}
|
|
28
|
+
return scopes.some((scope) => Boolean(userScopes.includes(scope)));
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
userHasScopes,
|
|
32
|
+
userScopes,
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { useDynamicScopes };
|
|
@@ -7,8 +7,6 @@ var utils = require('@dynamic-labs/utils');
|
|
|
7
7
|
var api = require('../../../data/api.cjs');
|
|
8
8
|
require('@dynamic-labs/sdk-api');
|
|
9
9
|
require('../../../shared/logger.cjs');
|
|
10
|
-
var getFromLS = require('../../../shared/utils/functions/storage/getFromLS.cjs');
|
|
11
|
-
require('../../../config/LSSuffix.cjs');
|
|
12
10
|
require('@dynamic-labs/iconic');
|
|
13
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
14
12
|
require('react/jsx-runtime');
|
|
@@ -16,6 +14,7 @@ require('../../../context/ViewContext/ViewContext.cjs');
|
|
|
16
14
|
require('@dynamic-labs/wallet-book');
|
|
17
15
|
var localStorage = require('../../constants/localStorage.cjs');
|
|
18
16
|
require('../../constants/colors.cjs');
|
|
17
|
+
var localStorage$1 = require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
18
|
require('ethers');
|
|
20
19
|
var useLocalStorage = require('../../../shared/utils/hooks/useLocalStorage/useLocalStorage.cjs');
|
|
21
20
|
require('../../../shared/consts/index.cjs');
|
|
@@ -49,8 +48,8 @@ const useFetchNetworkConfigurations = ({ authToken, environmentId, evmNetworks:
|
|
|
49
48
|
}
|
|
50
49
|
}, [environmentId, handleRemoveLsNetworks, lsNetworks, removeLsNetworks]);
|
|
51
50
|
React.useEffect(() => {
|
|
52
|
-
const connectedWalletData =
|
|
53
|
-
if (!authToken && !connectedWalletData) {
|
|
51
|
+
const connectedWalletData = localStorage$1.LocalStorage.getFromLS(localStorage.CONNECTED_WALLETS_INFO) || [];
|
|
52
|
+
if (!authToken && !(connectedWalletData === null || connectedWalletData === void 0 ? void 0 : connectedWalletData.length)) {
|
|
54
53
|
handleRemoveLsNetworks();
|
|
55
54
|
}
|
|
56
55
|
}, [authToken, handleRemoveLsNetworks]);
|
|
@@ -3,15 +3,14 @@ import { DynamicError } from '@dynamic-labs/utils';
|
|
|
3
3
|
import { fetchNetworkSettings } from '../../../data/api.js';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import '../../../shared/logger.js';
|
|
6
|
-
import { getFromLS } from '../../../shared/utils/functions/storage/getFromLS.js';
|
|
7
|
-
import '../../../config/LSSuffix.js';
|
|
8
6
|
import '@dynamic-labs/iconic';
|
|
9
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
10
8
|
import 'react/jsx-runtime';
|
|
11
9
|
import '../../../context/ViewContext/ViewContext.js';
|
|
12
10
|
import '@dynamic-labs/wallet-book';
|
|
13
|
-
import { NETWORKS_STORAGE_KEY,
|
|
11
|
+
import { NETWORKS_STORAGE_KEY, CONNECTED_WALLETS_INFO } from '../../constants/localStorage.js';
|
|
14
12
|
import '../../constants/colors.js';
|
|
13
|
+
import { LocalStorage } from '../../../shared/utils/classes/storage/localStorage.js';
|
|
15
14
|
import 'ethers';
|
|
16
15
|
import { useLocalStorage } from '../../../shared/utils/hooks/useLocalStorage/useLocalStorage.js';
|
|
17
16
|
import '../../../shared/consts/index.js';
|
|
@@ -45,8 +44,8 @@ const useFetchNetworkConfigurations = ({ authToken, environmentId, evmNetworks:
|
|
|
45
44
|
}
|
|
46
45
|
}, [environmentId, handleRemoveLsNetworks, lsNetworks, removeLsNetworks]);
|
|
47
46
|
useEffect(() => {
|
|
48
|
-
const connectedWalletData = getFromLS(
|
|
49
|
-
if (!authToken && !connectedWalletData) {
|
|
47
|
+
const connectedWalletData = LocalStorage.getFromLS(CONNECTED_WALLETS_INFO) || [];
|
|
48
|
+
if (!authToken && !(connectedWalletData === null || connectedWalletData === void 0 ? void 0 : connectedWalletData.length)) {
|
|
50
49
|
handleRemoveLsNetworks();
|
|
51
50
|
}
|
|
52
51
|
}, [authToken, handleRemoveLsNetworks]);
|
|
@@ -7,7 +7,6 @@ var utils = require('@dynamic-labs/utils');
|
|
|
7
7
|
var api = require('../../../data/api.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('react/jsx-runtime');
|
|
@@ -15,6 +14,7 @@ require('../../../context/ViewContext/ViewContext.cjs');
|
|
|
15
14
|
require('@dynamic-labs/wallet-book');
|
|
16
15
|
var localStorage = require('../../constants/localStorage.cjs');
|
|
17
16
|
require('../../constants/colors.cjs');
|
|
17
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
18
18
|
require('ethers');
|
|
19
19
|
var useLocalStorage = require('../../../shared/utils/hooks/useLocalStorage/useLocalStorage.cjs');
|
|
20
20
|
require('../../../shared/consts/index.cjs');
|
|
@@ -3,7 +3,6 @@ import { DynamicError } from '@dynamic-labs/utils';
|
|
|
3
3
|
import { fetchNonce } from '../../../data/api.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 'react/jsx-runtime';
|
|
@@ -11,6 +10,7 @@ import '../../../context/ViewContext/ViewContext.js';
|
|
|
11
10
|
import '@dynamic-labs/wallet-book';
|
|
12
11
|
import { NONCE_STORAGE_KEY } from '../../constants/localStorage.js';
|
|
13
12
|
import '../../constants/colors.js';
|
|
13
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
14
14
|
import 'ethers';
|
|
15
15
|
import { useLocalStorage } from '../../../shared/utils/hooks/useLocalStorage/useLocalStorage.js';
|
|
16
16
|
import '../../../shared/consts/index.js';
|
|
@@ -7,8 +7,6 @@ var utils = require('@dynamic-labs/utils');
|
|
|
7
7
|
var api = require('../../../data/api.cjs');
|
|
8
8
|
require('@dynamic-labs/sdk-api');
|
|
9
9
|
require('../../../shared/logger.cjs');
|
|
10
|
-
var getFromLS = require('../../../shared/utils/functions/storage/getFromLS.cjs');
|
|
11
|
-
require('../../../config/LSSuffix.cjs');
|
|
12
10
|
require('@dynamic-labs/iconic');
|
|
13
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
14
12
|
require('react/jsx-runtime');
|
|
@@ -16,6 +14,7 @@ require('../../../context/ViewContext/ViewContext.cjs');
|
|
|
16
14
|
require('@dynamic-labs/wallet-book');
|
|
17
15
|
var localStorage = require('../../constants/localStorage.cjs');
|
|
18
16
|
require('../../constants/colors.cjs');
|
|
17
|
+
var localStorage$1 = require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
18
|
require('ethers');
|
|
20
19
|
var useLocalStorage = require('../../../shared/utils/hooks/useLocalStorage/useLocalStorage.cjs');
|
|
21
20
|
require('../../../shared/consts/index.cjs');
|
|
@@ -34,7 +33,7 @@ const useFetchProjectSettings = ({ authToken, environmentId, maxRetries = 2, })
|
|
|
34
33
|
removeLsSettings();
|
|
35
34
|
}
|
|
36
35
|
React.useEffect(() => {
|
|
37
|
-
const connectedWalletData =
|
|
36
|
+
const [connectedWalletData] = localStorage$1.LocalStorage.getFromLS(localStorage.CONNECTED_WALLETS_INFO) || [];
|
|
38
37
|
if (!authToken && !connectedWalletData) {
|
|
39
38
|
removeLsSettings();
|
|
40
39
|
}
|
|
@@ -3,15 +3,14 @@ import { DynamicError } from '@dynamic-labs/utils';
|
|
|
3
3
|
import { fetchProjectSettings } from '../../../data/api.js';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import '../../../shared/logger.js';
|
|
6
|
-
import { getFromLS } from '../../../shared/utils/functions/storage/getFromLS.js';
|
|
7
|
-
import '../../../config/LSSuffix.js';
|
|
8
6
|
import '@dynamic-labs/iconic';
|
|
9
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
10
8
|
import 'react/jsx-runtime';
|
|
11
9
|
import '../../../context/ViewContext/ViewContext.js';
|
|
12
10
|
import '@dynamic-labs/wallet-book';
|
|
13
|
-
import { PROJECT_SETTINGS_STORAGE_KEY,
|
|
11
|
+
import { PROJECT_SETTINGS_STORAGE_KEY, CONNECTED_WALLETS_INFO } from '../../constants/localStorage.js';
|
|
14
12
|
import '../../constants/colors.js';
|
|
13
|
+
import { LocalStorage } from '../../../shared/utils/classes/storage/localStorage.js';
|
|
15
14
|
import 'ethers';
|
|
16
15
|
import { useLocalStorage } from '../../../shared/utils/hooks/useLocalStorage/useLocalStorage.js';
|
|
17
16
|
import '../../../shared/consts/index.js';
|
|
@@ -30,7 +29,7 @@ const useFetchProjectSettings = ({ authToken, environmentId, maxRetries = 2, })
|
|
|
30
29
|
removeLsSettings();
|
|
31
30
|
}
|
|
32
31
|
useEffect(() => {
|
|
33
|
-
const connectedWalletData = getFromLS(
|
|
32
|
+
const [connectedWalletData] = LocalStorage.getFromLS(CONNECTED_WALLETS_INFO) || [];
|
|
34
33
|
if (!authToken && !connectedWalletData) {
|
|
35
34
|
removeLsSettings();
|
|
36
35
|
}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
require('@dynamic-labs/sdk-api');
|
|
7
7
|
require('../../../shared/logger.cjs');
|
|
8
|
-
require('../../../config/LSSuffix.cjs');
|
|
9
8
|
require('@dynamic-labs/iconic');
|
|
10
9
|
require('@dynamic-labs/wallet-connector-core');
|
|
11
10
|
require('react/jsx-runtime');
|
|
@@ -13,21 +12,18 @@ require('../../../context/ViewContext/ViewContext.cjs');
|
|
|
13
12
|
require('@dynamic-labs/wallet-book');
|
|
14
13
|
require('@dynamic-labs/utils');
|
|
15
14
|
require('../../constants/colors.cjs');
|
|
15
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
16
16
|
require('ethers');
|
|
17
17
|
var index = require('../../../shared/consts/index.cjs');
|
|
18
18
|
|
|
19
19
|
const useFetchWalletsForChainsMap = (propsWalletsChainsMap) => {
|
|
20
|
-
const walletsForChainsMap =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (propsWalletsChainsMap) {
|
|
24
|
-
Object.assign(walletsForChainsMap, {
|
|
25
|
-
primary_chain: propsWalletsChainsMap.primary_chain,
|
|
26
|
-
wallets: Object.assign(Object.assign({}, index.defaultWalletsForChains.wallets), (Boolean(propsWalletsChainsMap.wallets) &&
|
|
27
|
-
propsWalletsChainsMap.wallets)),
|
|
28
|
-
});
|
|
20
|
+
const walletsForChainsMap = React.useMemo(() => {
|
|
21
|
+
if (!propsWalletsChainsMap) {
|
|
22
|
+
return index.defaultWalletsForChains;
|
|
29
23
|
}
|
|
30
|
-
|
|
24
|
+
return Object.assign(Object.assign({}, index.defaultWalletsForChains), { primary_chain: propsWalletsChainsMap.primary_chain, wallets: Object.assign(Object.assign({}, index.defaultWalletsForChains.wallets), (Boolean(propsWalletsChainsMap.wallets) &&
|
|
25
|
+
propsWalletsChainsMap.wallets)) });
|
|
26
|
+
}, [propsWalletsChainsMap]);
|
|
31
27
|
return { walletsForChainsMap };
|
|
32
28
|
};
|
|
33
29
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
2
|
import '@dynamic-labs/sdk-api';
|
|
3
3
|
import '../../../shared/logger.js';
|
|
4
|
-
import '../../../config/LSSuffix.js';
|
|
5
4
|
import '@dynamic-labs/iconic';
|
|
6
5
|
import '@dynamic-labs/wallet-connector-core';
|
|
7
6
|
import 'react/jsx-runtime';
|
|
@@ -9,21 +8,18 @@ import '../../../context/ViewContext/ViewContext.js';
|
|
|
9
8
|
import '@dynamic-labs/wallet-book';
|
|
10
9
|
import '@dynamic-labs/utils';
|
|
11
10
|
import '../../constants/colors.js';
|
|
11
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
12
12
|
import 'ethers';
|
|
13
13
|
import { defaultWalletsForChains } from '../../../shared/consts/index.js';
|
|
14
14
|
|
|
15
15
|
const useFetchWalletsForChainsMap = (propsWalletsChainsMap) => {
|
|
16
|
-
const walletsForChainsMap =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (propsWalletsChainsMap) {
|
|
20
|
-
Object.assign(walletsForChainsMap, {
|
|
21
|
-
primary_chain: propsWalletsChainsMap.primary_chain,
|
|
22
|
-
wallets: Object.assign(Object.assign({}, defaultWalletsForChains.wallets), (Boolean(propsWalletsChainsMap.wallets) &&
|
|
23
|
-
propsWalletsChainsMap.wallets)),
|
|
24
|
-
});
|
|
16
|
+
const walletsForChainsMap = useMemo(() => {
|
|
17
|
+
if (!propsWalletsChainsMap) {
|
|
18
|
+
return defaultWalletsForChains;
|
|
25
19
|
}
|
|
26
|
-
|
|
20
|
+
return Object.assign(Object.assign({}, defaultWalletsForChains), { primary_chain: propsWalletsChainsMap.primary_chain, wallets: Object.assign(Object.assign({}, defaultWalletsForChains.wallets), (Boolean(propsWalletsChainsMap.wallets) &&
|
|
21
|
+
propsWalletsChainsMap.wallets)) });
|
|
22
|
+
}, [propsWalletsChainsMap]);
|
|
27
23
|
return { walletsForChainsMap };
|
|
28
24
|
};
|
|
29
25
|
|
|
@@ -6,16 +6,15 @@ var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
require('@dynamic-labs/sdk-api');
|
|
8
8
|
require('../../../shared/logger.cjs');
|
|
9
|
-
var getFromLS = require('../../../shared/utils/functions/storage/getFromLS.cjs');
|
|
10
|
-
require('../../../config/LSSuffix.cjs');
|
|
11
9
|
require('@dynamic-labs/iconic');
|
|
12
10
|
require('@dynamic-labs/wallet-connector-core');
|
|
13
11
|
require('react/jsx-runtime');
|
|
14
12
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
15
13
|
require('@dynamic-labs/wallet-book');
|
|
16
14
|
require('@dynamic-labs/utils');
|
|
17
|
-
var localStorage = require('../../constants/localStorage.cjs');
|
|
15
|
+
var localStorage$1 = require('../../constants/localStorage.cjs');
|
|
18
16
|
require('../../constants/colors.cjs');
|
|
17
|
+
var localStorage = require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
18
|
require('ethers');
|
|
20
19
|
require('../../../shared/consts/index.cjs');
|
|
21
20
|
var handleUnlinkHelper = require('../../functions/handleUnlinkHelper/handleUnlinkHelper.cjs');
|
|
@@ -33,7 +32,7 @@ const useHandleUnlinkWallet = ({ verifiedCredentials, environmentId, primaryWall
|
|
|
33
32
|
// handleUnlinkWallet('1234');
|
|
34
33
|
// }
|
|
35
34
|
// without fetching from LS, primaryWalletId would still be 1234 when handleUnlinkWallet runs in the example above
|
|
36
|
-
const currentPrimaryWalletId = (_a =
|
|
35
|
+
const currentPrimaryWalletId = (_a = localStorage.LocalStorage.getFromLS(localStorage$1.PRIMARY_WALLET_ID)) !== null && _a !== void 0 ? _a : primaryWalletId;
|
|
37
36
|
if (walletId === currentPrimaryWalletId)
|
|
38
37
|
return;
|
|
39
38
|
const newUser = yield handleUnlinkHelper.handleUnlinkHelper({
|
|
@@ -2,8 +2,6 @@ import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import '@dynamic-labs/sdk-api';
|
|
4
4
|
import '../../../shared/logger.js';
|
|
5
|
-
import { getFromLS } from '../../../shared/utils/functions/storage/getFromLS.js';
|
|
6
|
-
import '../../../config/LSSuffix.js';
|
|
7
5
|
import '@dynamic-labs/iconic';
|
|
8
6
|
import '@dynamic-labs/wallet-connector-core';
|
|
9
7
|
import 'react/jsx-runtime';
|
|
@@ -12,6 +10,7 @@ import '@dynamic-labs/wallet-book';
|
|
|
12
10
|
import '@dynamic-labs/utils';
|
|
13
11
|
import { PRIMARY_WALLET_ID } from '../../constants/localStorage.js';
|
|
14
12
|
import '../../constants/colors.js';
|
|
13
|
+
import { LocalStorage } from '../../../shared/utils/classes/storage/localStorage.js';
|
|
15
14
|
import 'ethers';
|
|
16
15
|
import '../../../shared/consts/index.js';
|
|
17
16
|
import { handleUnlinkHelper } from '../../functions/handleUnlinkHelper/handleUnlinkHelper.js';
|
|
@@ -29,7 +28,7 @@ const useHandleUnlinkWallet = ({ verifiedCredentials, environmentId, primaryWall
|
|
|
29
28
|
// handleUnlinkWallet('1234');
|
|
30
29
|
// }
|
|
31
30
|
// without fetching from LS, primaryWalletId would still be 1234 when handleUnlinkWallet runs in the example above
|
|
32
|
-
const currentPrimaryWalletId = (_a = getFromLS(PRIMARY_WALLET_ID)) !== null && _a !== void 0 ? _a : primaryWalletId;
|
|
31
|
+
const currentPrimaryWalletId = (_a = LocalStorage.getFromLS(PRIMARY_WALLET_ID)) !== null && _a !== void 0 ? _a : primaryWalletId;
|
|
33
32
|
if (walletId === currentPrimaryWalletId)
|
|
34
33
|
return;
|
|
35
34
|
const newUser = yield handleUnlinkHelper({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useHandleWalletsToConnect } from './useHandleWalletsToConnect';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
6
|
+
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
7
|
+
|
|
8
|
+
const useHandleWalletsToConnect = () => {
|
|
9
|
+
const { walletsToConnectByChain, setWalletsToConnectByChain, setShowAuthFlow, setConnectedUser, isUserConnected, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
10
|
+
const { setView, goToInitialView } = ViewContext.useViewContext();
|
|
11
|
+
const handleWalletsToConnect = () => {
|
|
12
|
+
if (!walletsToConnectByChain) {
|
|
13
|
+
setConnectedUser(true);
|
|
14
|
+
setShowAuthFlow(false);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const [firstWallet, ...restOfTheWallets] = walletsToConnectByChain;
|
|
18
|
+
if (firstWallet.numberOfWallets > 1) {
|
|
19
|
+
const updatedWallets = [
|
|
20
|
+
Object.assign(Object.assign({}, firstWallet), { numberOfWallets: firstWallet.numberOfWallets - 1 }),
|
|
21
|
+
...restOfTheWallets,
|
|
22
|
+
];
|
|
23
|
+
setWalletsToConnectByChain(updatedWallets);
|
|
24
|
+
setView('wallet-list');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
setWalletsToConnectByChain(restOfTheWallets);
|
|
28
|
+
const allWalletsConnected = restOfTheWallets.length === 0;
|
|
29
|
+
if (allWalletsConnected) {
|
|
30
|
+
if (!isUserConnected) {
|
|
31
|
+
setConnectedUser(true);
|
|
32
|
+
setView('bridge-summary');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
setShowAuthFlow(false);
|
|
36
|
+
goToInitialView();
|
|
37
|
+
}
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
setView('bridge-next-wallet-connection');
|
|
41
|
+
};
|
|
42
|
+
return { handleWalletsToConnect };
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
exports.useHandleWalletsToConnect = useHandleWalletsToConnect;
|