@dynamic-labs/sdk-react-core 0.17.0-RC.0 → 0.17.0-RC.10
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 +137 -0
- package/package.cjs +5 -5
- package/package.js +5 -5
- package/package.json +11 -8
- package/src/index.cjs +34 -24
- package/src/index.d.ts +5 -4
- package/src/index.js +10 -4
- package/src/lib/Main.cjs +14 -6
- package/src/lib/Main.js +13 -5
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +6 -2
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +6 -2
- package/src/lib/components/Alert/Alert.cjs +29 -0
- package/src/lib/components/Alert/Alert.js +25 -0
- package/src/lib/components/Alert/Alert.types.d.ts +4 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +12 -8
- package/src/lib/components/AnimatePresence/AnimatePresence.js +12 -8
- package/src/lib/components/AnimatePresence/AnimatePresence.types.d.ts +2 -4
- package/src/lib/components/AnimatePresence/index.d.ts +0 -1
- package/src/lib/components/Checkbox/Checkbox.cjs +3 -1
- package/src/lib/components/Checkbox/Checkbox.js +3 -1
- package/src/lib/components/Divider/Divider.cjs +6 -2
- package/src/lib/components/Divider/Divider.js +6 -2
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +3 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +3 -1
- package/src/lib/components/IconListTile/IconListTile.cjs +15 -0
- package/src/lib/components/IconListTile/IconListTile.d.ts +2 -0
- package/src/lib/components/IconListTile/IconListTile.js +11 -0
- package/src/lib/components/IconListTile/index.d.ts +1 -0
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +4 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +4 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.cjs +4 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.js +4 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +3 -0
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +3 -0
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +3 -0
- package/src/lib/components/IconWithStatus/IconWithStatus.js +3 -0
- package/src/lib/components/ListTile/ListTile.cjs +1 -1
- package/src/lib/components/ListTile/ListTile.js +1 -1
- package/src/lib/components/ListTile/index.d.ts +1 -0
- package/src/lib/components/LogoutButton/LogoutButton.cjs +3 -1
- package/src/lib/components/LogoutButton/LogoutButton.js +3 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +5 -2
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +5 -2
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +6 -3
- package/src/lib/components/NetworkPicker/NetworkPicker.d.ts +3 -2
- package/src/lib/components/NetworkPicker/NetworkPicker.js +6 -3
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +6 -2
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +6 -2
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +10 -6
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.d.ts +2 -2
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +10 -6
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +6 -2
- package/src/lib/components/NetworkPicker/components/Network/Network.js +6 -2
- package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.d.ts +4 -4
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.d.ts +2 -2
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +6 -2
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +6 -2
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +3 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +6 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +6 -2
- package/src/lib/components/OverlayCard/OverlayCard.cjs +49 -0
- package/src/lib/components/OverlayCard/OverlayCard.context.cjs +9 -0
- package/src/lib/components/OverlayCard/OverlayCard.context.d.ts +6 -0
- package/src/lib/components/OverlayCard/OverlayCard.context.js +5 -0
- package/src/lib/components/OverlayCard/OverlayCard.d.ts +8 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +44 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget.cjs +17 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget.d.ts +2 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget.js +13 -0
- package/src/lib/components/OverlayCard/index.d.ts +2 -0
- package/src/lib/components/Portal/Portal.cjs +21 -2
- package/src/lib/components/Portal/Portal.js +21 -2
- package/src/lib/components/Select/Select.cjs +3 -1
- package/src/lib/components/Select/Select.js +3 -1
- package/src/lib/components/ShadowDOM/utils.cjs +3 -1
- package/src/lib/components/ShadowDOM/utils.js +3 -1
- package/src/lib/components/Spinner/spinner.cjs +3 -1
- package/src/lib/components/Spinner/spinner.js +3 -1
- package/src/lib/components/Toolkit/Toolkit.cjs +4 -1
- package/src/lib/components/Toolkit/Toolkit.js +4 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +3 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +3 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +6 -2
- package/src/lib/components/Tooltip/Tooltip.js +6 -2
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +54 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.d.ts +4 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +50 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.types.d.ts +6 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/index.d.ts +1 -0
- package/src/lib/components/Transition/index.d.ts +1 -0
- package/src/lib/components/Transition/transition.type.d.ts +2 -4
- package/src/lib/components/UserAddress/UserAddress.cjs +7 -7
- package/src/lib/components/UserAddress/UserAddress.js +8 -8
- package/src/lib/components/UserProfile/UserProfile.cjs +16 -8
- package/src/lib/components/UserProfile/UserProfile.js +12 -4
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +6 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +6 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +6 -2
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +6 -2
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +6 -2
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +6 -2
- package/src/lib/components/index.d.ts +2 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +58 -29
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +8 -9
- package/src/lib/context/DynamicContext/DynamicContext.js +52 -23
- package/src/lib/context/DynamicContext/helpers.cjs +3 -1
- package/src/lib/context/DynamicContext/helpers.js +3 -1
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.cjs +3 -1
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.js +3 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +3 -0
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +3 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +84 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.d.ts +11 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +80 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.types.d.ts +4 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +6 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +6 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +4 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +4 -1
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +3 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +3 -1
- package/src/lib/context/DynamicContext/validators.cjs +3 -1
- package/src/lib/context/DynamicContext/validators.js +3 -1
- package/src/lib/context/FundingContext/FundingContext.cjs +69 -0
- package/src/lib/context/FundingContext/FundingContext.d.ts +14 -0
- package/src/lib/context/FundingContext/FundingContext.js +63 -0
- package/src/lib/context/FundingContext/index.d.ts +1 -0
- package/src/lib/context/MockContext/MockContext.cjs +3 -1
- package/src/lib/context/MockContext/MockContext.js +3 -1
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +6 -2
- package/src/lib/context/QrCodeContext/QrCodeContext.js +6 -2
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +117 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +17 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +111 -0
- package/src/lib/context/SocialRedirectContext/index.d.ts +1 -0
- package/src/lib/context/ThemeContext/themesData.cjs +3 -1
- package/src/lib/context/ThemeContext/themesData.js +3 -1
- package/src/lib/context/ViewContext/ViewContext.cjs +4 -1
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/ViewContext/ViewContext.js +4 -1
- package/src/lib/data/api.cjs +40 -21
- package/src/lib/data/api.d.ts +8 -1
- package/src/lib/data/api.js +28 -10
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +10 -4
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +10 -4
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +6 -2
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +6 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +6 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +6 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +7 -3
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +6 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +8 -4
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +6 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +8 -4
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +8 -4
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +6 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +6 -2
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +11 -4
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +11 -4
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +32 -42
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +32 -42
- package/src/lib/modals/TransactionConfirmationModal/hooks/index.d.ts +1 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/index.d.ts +1 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/useTransactionData.cjs +85 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/useTransactionData.d.ts +18 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/useTransactionData.js +81 -0
- package/src/lib/shared/assets/dots-horizontal.cjs +54 -0
- package/src/lib/shared/assets/dots-horizontal.js +30 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/types/index.d.ts +4 -6
- package/src/lib/shared/utils/functions/chain/getChainDisplayName.cjs +2 -2
- package/src/lib/shared/utils/functions/chain/getChainDisplayName.js +1 -1
- package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +2 -2
- package/src/lib/shared/utils/functions/chain/getChainIcon.js +1 -1
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.cjs +22 -0
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.d.ts +2 -0
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.js +18 -0
- package/src/lib/shared/utils/functions/formatBigNumber/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.cjs +5 -10
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.js +3 -8
- package/src/lib/shared/utils/functions/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useGlobalLoading/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.cjs +35 -0
- package/src/lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.d.ts +17 -0
- package/src/lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.js +31 -0
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.cjs +3 -1
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.js +3 -1
- 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 +3 -1
- package/src/lib/utils/constants/localStorage.d.ts +1 -0
- package/src/lib/utils/constants/localStorage.js +3 -2
- package/src/lib/utils/functions/generateMessages/index.cjs +4 -3
- package/src/lib/utils/functions/generateMessages/index.js +2 -1
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +3 -1
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +3 -1
- package/src/lib/utils/functions/getEnabledKYC/index.cjs +5 -0
- package/src/lib/utils/functions/getEnabledKYC/index.d.ts +5 -0
- package/src/lib/utils/functions/getEnabledKYC/index.js +5 -0
- package/src/lib/utils/functions/getEnabledUserProfileFields/getEnabledUserProfileFields.cjs +74 -0
- package/src/lib/utils/functions/getEnabledUserProfileFields/getEnabledUserProfileFields.d.ts +29 -0
- package/src/lib/utils/functions/getEnabledUserProfileFields/getEnabledUserProfileFields.js +68 -0
- package/src/lib/utils/functions/getNetwork/getNetwork.cjs +1 -6
- package/src/lib/utils/functions/getNetwork/getNetwork.d.ts +1 -1
- package/src/lib/utils/functions/getNetwork/getNetwork.js +1 -6
- package/src/lib/utils/functions/getSocialIcon/getSocialIcon.cjs +22 -0
- package/src/lib/utils/functions/getSocialIcon/getSocialIcon.d.ts +3 -0
- package/src/lib/utils/functions/getSocialIcon/getSocialIcon.js +18 -0
- package/src/lib/utils/functions/getSocialIcon/index.d.ts +1 -0
- package/src/lib/utils/functions/getWalletProvider/getWalletProvider.cjs +2 -2
- package/src/lib/utils/functions/getWalletProvider/getWalletProvider.js +1 -1
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs +1 -1
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.d.ts +1 -2
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js +1 -1
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +6 -3
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +4 -1
- package/src/lib/utils/functions/isProgrammableNetworkSwitchSupported/isProgrammableNetworkSwitchSupported.cjs +16 -1
- package/src/lib/utils/functions/isProgrammableNetworkSwitchSupported/isProgrammableNetworkSwitchSupported.d.ts +6 -0
- package/src/lib/utils/functions/isProgrammableNetworkSwitchSupported/isProgrammableNetworkSwitchSupported.js +16 -1
- package/src/lib/utils/functions/isSameWalletName/isSameWalletName.cjs +2 -2
- package/src/lib/utils/functions/isSameWalletName/isSameWalletName.js +1 -1
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs +3 -3
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js +1 -1
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +6 -1
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.d.ts +1 -1
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +6 -1
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.cjs +2 -2
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.js +1 -1
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.cjs +6 -3
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.d.ts +2 -0
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.js +4 -1
- package/src/lib/utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.cjs +2 -2
- package/src/lib/utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.js +1 -1
- package/src/lib/utils/functions/walletFilters/index.cjs +2 -0
- package/src/lib/utils/functions/walletFilters/index.d.ts +2 -0
- package/src/lib/utils/functions/walletFilters/index.js +2 -1
- package/src/lib/utils/functions/walletListBuilder/index.d.ts +1 -19
- package/src/lib/utils/functions/walletListBuilder/{index.cjs → walletListBuilder.cjs} +8 -6
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.d.ts +19 -0
- package/src/lib/utils/functions/walletListBuilder/{index.js → walletListBuilder.js} +5 -3
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +6 -4
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +3 -0
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +3 -0
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +2 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +1 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +4 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +4 -1
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +6 -3
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +4 -1
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +2 -2
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +1 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +34 -35
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +33 -34
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +3 -2
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.d.ts +2 -2
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +3 -2
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +4 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +4 -1
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs +53 -31
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts +5 -5
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +53 -31
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.cjs +4 -2
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.js +3 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +5 -2
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +4 -1
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs +3 -1
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +3 -1
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +1 -2
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +1 -2
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +16 -6
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.d.ts +5 -0
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +16 -6
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs +3 -1
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js +3 -1
- package/src/lib/utils/hooks/useMutation/useMutation.cjs +4 -4
- package/src/lib/utils/hooks/useMutation/useMutation.js +1 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +8 -5
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.d.ts +2 -2
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +10 -7
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +7 -0
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +7 -0
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +7 -0
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.cjs +6 -4
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.js +5 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +14 -12
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +10 -8
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +6 -3
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +4 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +9 -7
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +2 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +3 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +15 -6
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +13 -4
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -0
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +4 -16
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +2 -4
- package/src/lib/utils/hooks/useWallets/useWallets.js +4 -16
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +6 -2
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +6 -2
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +11 -6
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +11 -6
- package/src/lib/views/CollectUserDataView/{UserDataForm/UserDataForm.cjs → OnboardingUserDataForm/OnboardingUserDataForm.cjs} +15 -9
- package/src/lib/views/CollectUserDataView/{UserDataForm/UserDataForm.d.ts → OnboardingUserDataForm/OnboardingUserDataForm.d.ts} +1 -1
- package/src/lib/views/CollectUserDataView/{UserDataForm/UserDataForm.js → OnboardingUserDataForm/OnboardingUserDataForm.js} +15 -9
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/index.d.ts +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +8 -4
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +8 -4
- package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +3 -1
- package/src/lib/views/CollectUserDataView/fieldsConfig.js +3 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +9 -5
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +9 -5
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +8 -5
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +7 -4
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +6 -2
- package/src/lib/views/EmailUpdate/EmailUpdate.js +6 -2
- package/src/lib/views/EmailVerification/EmailVerification.cjs +12 -3
- package/src/lib/views/EmailVerification/EmailVerification.js +12 -3
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +8 -4
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +7 -3
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +6 -4
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +5 -3
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +6 -2
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +6 -2
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +12 -4
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +12 -4
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +68 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.d.ts +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +64 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/index.d.ts +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +15 -6
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +15 -6
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +8 -3
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +8 -3
- package/src/lib/views/{WalletNoAccess/WalletNoAccess.cjs → NoAccess/NoAccess.cjs} +24 -9
- package/src/lib/views/NoAccess/NoAccess.d.ts +2 -0
- package/src/lib/views/{WalletNoAccess/WalletNoAccess.js → NoAccess/NoAccess.js} +26 -11
- package/src/lib/views/NoAccess/index.d.ts +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +6 -2
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +6 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +6 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +6 -2
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +7 -3
- package/src/lib/views/PendingConnectView/PendingConnectView.js +6 -2
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +7 -3
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +7 -3
- package/src/lib/views/QrCodeView/QRCode.cjs +2 -2
- package/src/lib/views/QrCodeView/QRCode.js +1 -1
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +10 -6
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +9 -5
- package/src/lib/views/QrCodeView/QrCodeView.cjs +6 -2
- package/src/lib/views/QrCodeView/QrCodeView.js +6 -2
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +55 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.d.ts +2 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +51 -0
- package/src/lib/views/SocialRedirectView/index.d.ts +1 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +6 -2
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +6 -2
- package/src/lib/views/WalletList/WalletList.cjs +5 -3
- package/src/lib/views/WalletList/WalletList.js +4 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +6 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +6 -2
- package/src/lib/views/WalletList/data.cjs +6 -8
- package/src/lib/views/WalletList/data.d.ts +1 -2
- package/src/lib/views/WalletList/data.js +7 -8
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +7 -4
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +7 -4
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +8 -4
- package/src/lib/views/WalletUsedView/WalletUsedView.js +6 -2
- package/src/lib/views/index.d.ts +1 -1
- package/src/lib/views/viewToComponentMap.cjs +5 -3
- package/src/lib/views/viewToComponentMap.js +5 -3
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +9 -6
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +9 -6
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +7 -3
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.cjs +8 -4
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +7 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +17 -10
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +17 -10
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +24 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +24 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +9 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +9 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +7 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +7 -3
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.types.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +6 -2
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +7 -4
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +7 -4
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +3 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +6 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +3 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +22 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +18 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.cjs +7 -3
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.js +6 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +6 -2
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +55 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +51 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +9 -5
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +9 -5
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +6 -3
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +4 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +6 -2
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +11 -6
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +11 -6
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +6 -2
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +13 -6
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +11 -4
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +6 -2
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +10 -7
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +10 -7
- package/src/lib/widgets/FundingWidget/FundingWidget.cjs +10 -0
- package/src/lib/widgets/FundingWidget/FundingWidget.d.ts +2 -0
- package/src/lib/widgets/FundingWidget/FundingWidget.js +6 -0
- package/src/lib/widgets/FundingWidget/index.d.ts +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +57 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.d.ts +5 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +52 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/index.d.ts +1 -0
- package/src/lib/widgets/index.d.ts +1 -0
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.cjs +0 -57
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.d.ts +0 -4
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.js +0 -51
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/VerticalDrawerAnimation.types.d.ts +0 -8
- package/src/lib/components/AnimatePresence/animations/VerticalDrawerAnimation/index.d.ts +0 -1
- package/src/lib/components/AnimatePresence/animations/index.d.ts +0 -1
- package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.cjs +0 -12
- package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.d.ts +0 -2
- package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.js +0 -8
- package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/index.d.ts +0 -1
- package/src/lib/utils/hooks/useWallets/utils/index.d.ts +0 -1
- package/src/lib/views/CollectUserDataView/UserDataForm/index.d.ts +0 -1
- package/src/lib/views/WalletNoAccess/WalletNoAccess.d.ts +0 -2
- package/src/lib/views/WalletNoAccess/index.d.ts +0 -1
|
@@ -4,17 +4,19 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
8
8
|
require('@dynamic-labs/sdk-api');
|
|
9
9
|
var logger = require('../../../shared/logger.cjs');
|
|
10
10
|
require('@dynamic-labs/iconic');
|
|
11
11
|
require('react/jsx-runtime');
|
|
12
12
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
13
14
|
require('../../constants/colors.cjs');
|
|
15
|
+
require('ethers');
|
|
14
16
|
require('../../../shared/consts/index.cjs');
|
|
15
17
|
|
|
16
18
|
const orderedSecondaryWalletAddresses = (wallets) => wallets.map((wallet) => wallet.address).sort();
|
|
17
|
-
const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut, multiWallet
|
|
19
|
+
const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, setSelectedWalletConnector, setMultiWalletWidgetState, user, setPrimaryWalletId, connectWalletByAddressAndChain, }) => {
|
|
18
20
|
const [loadingNetwork, setLoadingNetwork] = React.useState(true);
|
|
19
21
|
const [network, setNetwork] = React.useState(undefined);
|
|
20
22
|
React.useEffect(() => {
|
|
@@ -45,14 +47,14 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
45
47
|
onAccountChange: (accounts) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
46
48
|
const [newAddress] = accounts;
|
|
47
49
|
yield computeConnectedStateForWallets();
|
|
48
|
-
if (
|
|
50
|
+
if (walletConnectorCore.isSameAddress(newAddress, primaryWallet.address, primaryWallet.chain)) {
|
|
49
51
|
setMultiWalletWidgetState('idle');
|
|
50
52
|
}
|
|
51
|
-
else if (!multiWallet
|
|
53
|
+
else if (!multiWallet) {
|
|
52
54
|
yield handleLogOut();
|
|
53
55
|
}
|
|
54
56
|
else if (multiWalletWidgetState === 'awaiting_account_switch') {
|
|
55
|
-
const linkedSecondaryWallet = secondaryWallets.find((wallet) =>
|
|
57
|
+
const linkedSecondaryWallet = secondaryWallets.find((wallet) => walletConnectorCore.isSameAddress(wallet.address, newAddress, wallet.chain));
|
|
56
58
|
// this means the user is linking a new account, so we need proof of ownership...
|
|
57
59
|
if (!linkedSecondaryWallet) {
|
|
58
60
|
setMultiWalletWidgetState('awaiting_signature', undefined, 'linking_new_wallet');
|
|
@@ -65,11 +67,11 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
65
67
|
yield computeConnectedStateForWallets();
|
|
66
68
|
}
|
|
67
69
|
else if (multiWalletWidgetState === 'idle' &&
|
|
68
|
-
secondaryWallets.some((wallet) =>
|
|
70
|
+
secondaryWallets.some((wallet) => walletConnectorCore.isSameAddress(wallet.address, newAddress, wallet.chain))) {
|
|
69
71
|
setMultiWalletWidgetState('detected_known_secondary_wallet');
|
|
70
72
|
}
|
|
71
73
|
else if (multiWalletWidgetState === 'idle' &&
|
|
72
|
-
!secondaryWallets.some((wallet) =>
|
|
74
|
+
!secondaryWallets.some((wallet) => walletConnectorCore.isSameAddress(wallet.address, newAddress, wallet.chain))) {
|
|
73
75
|
if (user) {
|
|
74
76
|
setMultiWalletWidgetState('detected_new_wallet');
|
|
75
77
|
setSelectedWalletConnector(primaryWallet.connector);
|
|
@@ -18,6 +18,6 @@ export type UseWalletEventListenersArgs = {
|
|
|
18
18
|
};
|
|
19
19
|
export declare const useWalletEventListeners: ({ computeConnectedStateForWallets, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, setSelectedWalletConnector, setMultiWalletWidgetState, user, setPrimaryWalletId, connectWalletByAddressAndChain, }: UseWalletEventListenersArgs) => {
|
|
20
20
|
loadingNetwork: boolean;
|
|
21
|
-
network: number | undefined;
|
|
22
|
-
setNetwork: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
|
|
21
|
+
network: string | number | undefined;
|
|
22
|
+
setNetwork: import("react").Dispatch<import("react").SetStateAction<string | number | undefined>>;
|
|
23
23
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
|
-
import { isSameAddress } from '@dynamic-labs/
|
|
3
|
+
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import { logger } from '../../../shared/logger.js';
|
|
6
6
|
import '@dynamic-labs/iconic';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '../../../context/ViewContext/ViewContext.js';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
9
10
|
import '../../constants/colors.js';
|
|
11
|
+
import 'ethers';
|
|
10
12
|
import '../../../shared/consts/index.js';
|
|
11
13
|
|
|
12
14
|
const orderedSecondaryWalletAddresses = (wallets) => wallets.map((wallet) => wallet.address).sort();
|
|
@@ -4,16 +4,19 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var utils = require('@dynamic-labs/utils');
|
|
8
8
|
var MockContext = require('../../../context/MockContext/MockContext.cjs');
|
|
9
9
|
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
10
10
|
var ErrorContext = require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
11
11
|
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
12
12
|
require('../../constants/colors.cjs');
|
|
13
|
+
require('@dynamic-labs/multi-wallet');
|
|
13
14
|
require('@dynamic-labs/sdk-api');
|
|
14
15
|
require('../../../shared/logger.cjs');
|
|
15
16
|
require('@dynamic-labs/iconic');
|
|
17
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
16
18
|
require('react/jsx-runtime');
|
|
19
|
+
require('ethers');
|
|
17
20
|
var requiresTwoStepAuthentication = require('../../functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.cjs');
|
|
18
21
|
var useConnectAndSign = require('../authenticationHooks/useConnectAndSign/useConnectAndSign.cjs');
|
|
19
22
|
require('../../../config/ApiEndpoint.cjs');
|
|
@@ -75,7 +78,14 @@ const useWalletItemActions = () => {
|
|
|
75
78
|
setError(undefined);
|
|
76
79
|
});
|
|
77
80
|
const handleAlreadyConnectedWallet = (walletConnector) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
78
|
-
|
|
81
|
+
const connectedAccounts = yield walletConnector.getConnectedAccounts();
|
|
82
|
+
const activeAccountAlreadyLinked = connectedWallets.find((wallet) => { var _a; return wallet.address.toLowerCase() === ((_a = connectedAccounts[0]) === null || _a === void 0 ? void 0 : _a.toLowerCase()); });
|
|
83
|
+
if (activeAccountAlreadyLinked) {
|
|
84
|
+
setMultiWalletWidgetState('awaiting_account_switch', 'linking_new_wallet');
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
setMultiWalletWidgetState('awaiting_signature', undefined, 'linking_new_wallet');
|
|
88
|
+
}
|
|
79
89
|
setShowAuthFlow(false);
|
|
80
90
|
setWalletConnectorAndWalletColor(walletConnector);
|
|
81
91
|
});
|
|
@@ -84,7 +94,7 @@ const useWalletItemActions = () => {
|
|
|
84
94
|
const wallet = wallets.find((wallet) => wallet.key === walletKey);
|
|
85
95
|
if (!wallet)
|
|
86
96
|
return;
|
|
87
|
-
if (
|
|
97
|
+
if (utils.isMobile()) {
|
|
88
98
|
openMobileWallet(wallet.walletConnector);
|
|
89
99
|
}
|
|
90
100
|
else if (wallet.walletConnector.canConnectViaCustodialService) {
|
|
@@ -95,12 +105,11 @@ const useWalletItemActions = () => {
|
|
|
95
105
|
}
|
|
96
106
|
};
|
|
97
107
|
const handleWalletItemClick = (wallet) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
98
|
-
var _a;
|
|
99
108
|
const { walletConnector, isInstalledOnBrowser } = wallet;
|
|
100
109
|
if (mockedSDK)
|
|
101
110
|
return;
|
|
102
111
|
if (walletConnector.connectedChain === 'FLOW') {
|
|
103
|
-
yield
|
|
112
|
+
yield walletConnector.endSession();
|
|
104
113
|
}
|
|
105
114
|
if (isSelectedWalletAlreadyConnected.isSelectedWalletAlreadyConnected(connectedWallets, walletConnector, user) &&
|
|
106
115
|
walletConnector.connectedChain !== 'FLOW') {
|
|
@@ -111,7 +120,7 @@ const useWalletItemActions = () => {
|
|
|
111
120
|
// providers like blocto and dapper
|
|
112
121
|
handleCustodialWalletClick(walletConnector);
|
|
113
122
|
}
|
|
114
|
-
else if (
|
|
123
|
+
else if (utils.isMobile()) {
|
|
115
124
|
// mobile wallets
|
|
116
125
|
if (walletConnector.name === 'WalletConnect') {
|
|
117
126
|
setView('wallet-connect-mobile-wallets-list');
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
-
import { isMobile } from '@dynamic-labs/
|
|
3
|
+
import { isMobile } from '@dynamic-labs/utils';
|
|
4
4
|
import { useMockContext } from '../../../context/MockContext/MockContext.js';
|
|
5
5
|
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
6
6
|
import { useErrorContext } from '../../../context/ErrorContext/ErrorContext.js';
|
|
7
7
|
import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
|
|
8
8
|
import '../../constants/colors.js';
|
|
9
|
+
import '@dynamic-labs/multi-wallet';
|
|
9
10
|
import '@dynamic-labs/sdk-api';
|
|
10
11
|
import '../../../shared/logger.js';
|
|
11
12
|
import '@dynamic-labs/iconic';
|
|
13
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
12
14
|
import 'react/jsx-runtime';
|
|
15
|
+
import 'ethers';
|
|
13
16
|
import { requiresTwoStepAuthentication } from '../../functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.js';
|
|
14
17
|
import { useConnectAndSign } from '../authenticationHooks/useConnectAndSign/useConnectAndSign.js';
|
|
15
18
|
import '../../../config/ApiEndpoint.js';
|
|
@@ -71,7 +74,14 @@ const useWalletItemActions = () => {
|
|
|
71
74
|
setError(undefined);
|
|
72
75
|
});
|
|
73
76
|
const handleAlreadyConnectedWallet = (walletConnector) => __awaiter(void 0, void 0, void 0, function* () {
|
|
74
|
-
|
|
77
|
+
const connectedAccounts = yield walletConnector.getConnectedAccounts();
|
|
78
|
+
const activeAccountAlreadyLinked = connectedWallets.find((wallet) => { var _a; return wallet.address.toLowerCase() === ((_a = connectedAccounts[0]) === null || _a === void 0 ? void 0 : _a.toLowerCase()); });
|
|
79
|
+
if (activeAccountAlreadyLinked) {
|
|
80
|
+
setMultiWalletWidgetState('awaiting_account_switch', 'linking_new_wallet');
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
setMultiWalletWidgetState('awaiting_signature', undefined, 'linking_new_wallet');
|
|
84
|
+
}
|
|
75
85
|
setShowAuthFlow(false);
|
|
76
86
|
setWalletConnectorAndWalletColor(walletConnector);
|
|
77
87
|
});
|
|
@@ -91,12 +101,11 @@ const useWalletItemActions = () => {
|
|
|
91
101
|
}
|
|
92
102
|
};
|
|
93
103
|
const handleWalletItemClick = (wallet) => __awaiter(void 0, void 0, void 0, function* () {
|
|
94
|
-
var _a;
|
|
95
104
|
const { walletConnector, isInstalledOnBrowser } = wallet;
|
|
96
105
|
if (mockedSDK)
|
|
97
106
|
return;
|
|
98
107
|
if (walletConnector.connectedChain === 'FLOW') {
|
|
99
|
-
yield
|
|
108
|
+
yield walletConnector.endSession();
|
|
100
109
|
}
|
|
101
110
|
if (isSelectedWalletAlreadyConnected(connectedWallets, walletConnector, user) &&
|
|
102
111
|
walletConnector.connectedChain !== 'FLOW') {
|
|
@@ -10,7 +10,9 @@ var TransactionConfirmationModal = require('../../../modals/TransactionConfirmat
|
|
|
10
10
|
var useConfirmationModal = require('../useConfirmationModal/useConfirmationModal.cjs');
|
|
11
11
|
require('../../constants/colors.cjs');
|
|
12
12
|
require('@dynamic-labs/multi-wallet');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
13
14
|
var getAuthToken = require('../../functions/getAuthToken/getAuthToken.cjs');
|
|
15
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
14
16
|
require('@dynamic-labs/sdk-api');
|
|
15
17
|
|
|
16
18
|
const useWalletUiUtils = ({ appLogoUrl, appName, getAppOrigin, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { WalletUiUtils } from '@dynamic-labs/
|
|
2
|
+
import { WalletUiUtils } from '@dynamic-labs/types';
|
|
3
3
|
import { WalletUiUtilsHookProps } from './useWalletUiUtils.types';
|
|
4
4
|
export declare const useWalletUiUtils: ({ appLogoUrl, appName, getAppOrigin, }: WalletUiUtilsHookProps) => [ReactNode | undefined, WalletUiUtils];
|
|
@@ -6,7 +6,9 @@ import { TransactionConfirmationModal } from '../../../modals/TransactionConfirm
|
|
|
6
6
|
import { useConfirmationModal } from '../useConfirmationModal/useConfirmationModal.js';
|
|
7
7
|
import '../../constants/colors.js';
|
|
8
8
|
import '@dynamic-labs/multi-wallet';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
9
10
|
import { getAuthToken } from '../../functions/getAuthToken/getAuthToken.js';
|
|
11
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
10
12
|
import '@dynamic-labs/sdk-api';
|
|
11
13
|
|
|
12
14
|
const useWalletUiUtils = ({ appLogoUrl, appName, getAppOrigin, }) => {
|
|
@@ -5,32 +5,26 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var data = require('../../../views/WalletList/data.cjs');
|
|
8
|
-
var getMagicLinkApiKeyFromProviders = require('./utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.cjs');
|
|
9
8
|
|
|
10
|
-
const useWallets = ({ projectSettings, appLogoUrl, appName, networkConfigurations,
|
|
9
|
+
const useWallets = ({ projectSettings, appLogoUrl, appName, networkConfigurations, walletUiUtils, }) => {
|
|
11
10
|
const [wallets, setWallets] = React.useState([]);
|
|
12
11
|
React.useEffect(() => {
|
|
13
12
|
const getWalletList = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
14
13
|
if (projectSettings) {
|
|
15
|
-
const magicLinkApiKey = getMagicLinkApiKeyFromProviders.getMagicLinkApiKeyFromProviders((projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) || []);
|
|
16
14
|
const installedWallets = yield data.getInstalledWallets(projectSettings, {
|
|
17
15
|
appLogoUrl,
|
|
18
16
|
appName,
|
|
19
|
-
|
|
20
|
-
magicLinkConfig,
|
|
17
|
+
customerApiProviders: projectSettings.providers || [],
|
|
21
18
|
networkConfigurations,
|
|
22
19
|
skipMemo: true,
|
|
23
|
-
vendorCredentials,
|
|
24
20
|
walletUiUtils,
|
|
25
21
|
});
|
|
26
22
|
const notInstalledWallets = yield data.getNotInstalledWallets(projectSettings, {
|
|
27
23
|
appLogoUrl,
|
|
28
24
|
appName,
|
|
29
|
-
|
|
30
|
-
magicLinkConfig,
|
|
25
|
+
customerApiProviders: projectSettings.providers || [],
|
|
31
26
|
networkConfigurations,
|
|
32
27
|
skipMemo: true,
|
|
33
|
-
vendorCredentials,
|
|
34
28
|
walletUiUtils,
|
|
35
29
|
});
|
|
36
30
|
const unfilteredWallets = [...installedWallets, ...notInstalledWallets];
|
|
@@ -38,13 +32,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, networkConfiguration
|
|
|
38
32
|
}
|
|
39
33
|
});
|
|
40
34
|
getWalletList();
|
|
41
|
-
}, [
|
|
42
|
-
projectSettings,
|
|
43
|
-
appLogoUrl,
|
|
44
|
-
appName,
|
|
45
|
-
vendorCredentials,
|
|
46
|
-
networkConfigurations,
|
|
47
|
-
]);
|
|
35
|
+
}, [projectSettings, appLogoUrl, appName, networkConfigurations]);
|
|
48
36
|
return { wallets };
|
|
49
37
|
};
|
|
50
38
|
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { MagicLinkConfig, NetworkConfigurationMap, VendorCredentials, WalletUiUtils } from '@dynamic-labs/multi-wallet';
|
|
2
1
|
import { ProjectSettings } from '@dynamic-labs/sdk-api';
|
|
2
|
+
import { NetworkConfigurationMap, WalletUiUtils } from '@dynamic-labs/types';
|
|
3
3
|
import { WalletOption } from '../../../shared';
|
|
4
4
|
type Props = {
|
|
5
5
|
appLogoUrl?: string;
|
|
6
6
|
appName?: string;
|
|
7
|
-
magicLinkConfig?: MagicLinkConfig;
|
|
8
7
|
networkConfigurations: NetworkConfigurationMap | undefined;
|
|
9
8
|
projectSettings: ProjectSettings | undefined;
|
|
10
|
-
vendorCredentials?: VendorCredentials;
|
|
11
9
|
walletUiUtils: WalletUiUtils;
|
|
12
10
|
};
|
|
13
|
-
export declare const useWallets: ({ projectSettings, appLogoUrl, appName, networkConfigurations,
|
|
11
|
+
export declare const useWallets: ({ projectSettings, appLogoUrl, appName, networkConfigurations, walletUiUtils, }: Props) => {
|
|
14
12
|
wallets: WalletOption[];
|
|
15
13
|
};
|
|
16
14
|
export {};
|
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import { getInstalledWallets, getNotInstalledWallets } from '../../../views/WalletList/data.js';
|
|
4
|
-
import { getMagicLinkApiKeyFromProviders } from './utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.js';
|
|
5
4
|
|
|
6
|
-
const useWallets = ({ projectSettings, appLogoUrl, appName, networkConfigurations,
|
|
5
|
+
const useWallets = ({ projectSettings, appLogoUrl, appName, networkConfigurations, walletUiUtils, }) => {
|
|
7
6
|
const [wallets, setWallets] = useState([]);
|
|
8
7
|
useEffect(() => {
|
|
9
8
|
const getWalletList = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
10
9
|
if (projectSettings) {
|
|
11
|
-
const magicLinkApiKey = getMagicLinkApiKeyFromProviders((projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) || []);
|
|
12
10
|
const installedWallets = yield getInstalledWallets(projectSettings, {
|
|
13
11
|
appLogoUrl,
|
|
14
12
|
appName,
|
|
15
|
-
|
|
16
|
-
magicLinkConfig,
|
|
13
|
+
customerApiProviders: projectSettings.providers || [],
|
|
17
14
|
networkConfigurations,
|
|
18
15
|
skipMemo: true,
|
|
19
|
-
vendorCredentials,
|
|
20
16
|
walletUiUtils,
|
|
21
17
|
});
|
|
22
18
|
const notInstalledWallets = yield getNotInstalledWallets(projectSettings, {
|
|
23
19
|
appLogoUrl,
|
|
24
20
|
appName,
|
|
25
|
-
|
|
26
|
-
magicLinkConfig,
|
|
21
|
+
customerApiProviders: projectSettings.providers || [],
|
|
27
22
|
networkConfigurations,
|
|
28
23
|
skipMemo: true,
|
|
29
|
-
vendorCredentials,
|
|
30
24
|
walletUiUtils,
|
|
31
25
|
});
|
|
32
26
|
const unfilteredWallets = [...installedWallets, ...notInstalledWallets];
|
|
@@ -34,13 +28,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, networkConfiguration
|
|
|
34
28
|
}
|
|
35
29
|
});
|
|
36
30
|
getWalletList();
|
|
37
|
-
}, [
|
|
38
|
-
projectSettings,
|
|
39
|
-
appLogoUrl,
|
|
40
|
-
appName,
|
|
41
|
-
vendorCredentials,
|
|
42
|
-
networkConfigurations,
|
|
43
|
-
]);
|
|
31
|
+
}, [projectSettings, appLogoUrl, appName, networkConfigurations]);
|
|
44
32
|
return { wallets };
|
|
45
33
|
};
|
|
46
34
|
|
|
@@ -9,11 +9,14 @@ require('react');
|
|
|
9
9
|
var Typography = require('../../components/Typography/Typography.cjs');
|
|
10
10
|
require('@dynamic-labs/sdk-api');
|
|
11
11
|
require('../../shared/logger.cjs');
|
|
12
|
-
require('@dynamic-labs/
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
13
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
14
15
|
require('../../utils/constants/colors.cjs');
|
|
16
|
+
require('ethers');
|
|
15
17
|
require('../../shared/consts/index.cjs');
|
|
16
18
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
19
|
+
require('@dynamic-labs/multi-wallet');
|
|
17
20
|
var requiresTwoStepAuthentication = require('../../utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.cjs');
|
|
18
21
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
19
22
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
@@ -23,13 +26,14 @@ require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
|
23
26
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
24
27
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
25
28
|
require('../../config/ApiEndpoint.cjs');
|
|
29
|
+
require('@dynamic-labs/rpc-providers');
|
|
26
30
|
var useVerifyWallet = require('../../utils/hooks/useVerifyWallet/useVerifyWallet.cjs');
|
|
27
|
-
require('ethers');
|
|
28
31
|
require('../../context/MockContext/MockContext.cjs');
|
|
29
32
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
30
33
|
var CaptchaContext = require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
31
34
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
32
35
|
require('../../components/IconButton/IconButton.cjs');
|
|
36
|
+
require('../../components/Alert/Alert.cjs');
|
|
33
37
|
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
34
38
|
var Captcha = require('../../components/Captcha/Captcha.cjs');
|
|
35
39
|
|
|
@@ -5,11 +5,14 @@ import 'react';
|
|
|
5
5
|
import { Typography } from '../../components/Typography/Typography.js';
|
|
6
6
|
import '@dynamic-labs/sdk-api';
|
|
7
7
|
import '../../shared/logger.js';
|
|
8
|
-
import '@dynamic-labs/
|
|
8
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
9
9
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
10
11
|
import '../../utils/constants/colors.js';
|
|
12
|
+
import 'ethers';
|
|
11
13
|
import '../../shared/consts/index.js';
|
|
12
14
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
15
|
+
import '@dynamic-labs/multi-wallet';
|
|
13
16
|
import { requiresTwoStepAuthentication } from '../../utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.js';
|
|
14
17
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
15
18
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
@@ -19,13 +22,14 @@ import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
|
19
22
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
20
23
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
21
24
|
import '../../config/ApiEndpoint.js';
|
|
25
|
+
import '@dynamic-labs/rpc-providers';
|
|
22
26
|
import { useVerifyWallet } from '../../utils/hooks/useVerifyWallet/useVerifyWallet.js';
|
|
23
|
-
import 'ethers';
|
|
24
27
|
import '../../context/MockContext/MockContext.js';
|
|
25
28
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
26
29
|
import { useCaptchaContext } from '../../context/CaptchaContext/CaptchaContext.js';
|
|
27
30
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
28
31
|
import '../../components/IconButton/IconButton.js';
|
|
32
|
+
import '../../components/Alert/Alert.js';
|
|
29
33
|
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
30
34
|
import { Captcha } from '../../components/Captcha/Captcha.js';
|
|
31
35
|
|
|
@@ -9,11 +9,14 @@ var Typography = require('../../components/Typography/Typography.cjs');
|
|
|
9
9
|
require('@dynamic-labs/sdk-api');
|
|
10
10
|
require('../../shared/logger.cjs');
|
|
11
11
|
require('@dynamic-labs/iconic');
|
|
12
|
-
require('@dynamic-labs/
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
13
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
14
15
|
require('../../utils/constants/colors.cjs');
|
|
16
|
+
require('ethers');
|
|
15
17
|
require('../../shared/consts/index.cjs');
|
|
16
18
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
19
|
+
require('@dynamic-labs/multi-wallet');
|
|
17
20
|
var createUserProfile = require('../../utils/functions/createUserProfile/createUserProfile.cjs');
|
|
18
21
|
var isSupportedNetwork = require('../../utils/functions/isSupportedNetwork/isSupportedNetwork.cjs');
|
|
19
22
|
var pixelToRem = require('../../utils/functions/pixelToRem/pixelToRem.cjs');
|
|
@@ -24,30 +27,32 @@ require('react-focus-lock');
|
|
|
24
27
|
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
25
28
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
26
29
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
27
|
-
var TextButton = require('../../components/TextButton/TextButton.cjs');
|
|
28
30
|
require('../../config/ApiEndpoint.cjs');
|
|
31
|
+
require('@dynamic-labs/rpc-providers');
|
|
29
32
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
30
|
-
require('ethers');
|
|
31
33
|
require('../../context/MockContext/MockContext.cjs');
|
|
32
34
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
33
35
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
36
|
+
var TextButton = require('../../components/TextButton/TextButton.cjs');
|
|
34
37
|
require('../../components/IconButton/IconButton.cjs');
|
|
38
|
+
require('../../components/Alert/Alert.cjs');
|
|
35
39
|
var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
|
|
36
40
|
var NetworkPicker = require('../../components/NetworkPicker/NetworkPicker.cjs');
|
|
37
41
|
var UserAddress = require('../../components/UserAddress/UserAddress.cjs');
|
|
38
|
-
var
|
|
42
|
+
var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
|
|
43
|
+
var OnboardingUserDataForm = require('./OnboardingUserDataForm/OnboardingUserDataForm.cjs');
|
|
39
44
|
|
|
40
45
|
const CollectUserDataView = () => {
|
|
41
|
-
var _a, _b;
|
|
42
46
|
const { appName, handleLogOut, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, onboardingImageUrl, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
43
47
|
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = React.useState(false);
|
|
48
|
+
const nameService = useFetchNameService.useFetchNameService();
|
|
44
49
|
if (!walletConnector || !decodedOnboardingOnlyToken) {
|
|
45
50
|
return null;
|
|
46
51
|
}
|
|
47
52
|
const userProfile = createUserProfile.createUserProfile(decodedOnboardingOnlyToken);
|
|
48
53
|
const evmNetworks = walletConnector.evmNetworks || [];
|
|
49
54
|
const _isSupportedNetwork = isSupportedNetwork.isSupportedNetwork({ network, walletConnector });
|
|
50
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxRuntime.jsxs(
|
|
55
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxRuntime.jsxs(OnboardingUserDataForm.OnboardingUserDataForm, Object.assign({ disableSubmit: !_isSupportedNetwork, userProfile: userProfile }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data__img-container' }, { children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsxRuntime.jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsxRuntime.jsx(walletBook.WalletIcon, { walletName: walletConnector.name, style: { height: pixelToRem.pixelToRem(64), width: pixelToRem.pixelToRem(64) } })) })), jsxRuntime.jsx(UserAddress.UserAddress, { userProfile: userProfile }), jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data__network-container' }, { children: jsxRuntime.jsx(NetworkPicker.NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) })), !_isSupportedNetwork ? (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: "Update Network" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Your wallet is not connected to a supported network. Please update before continuing." }))] }))) : (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
51
56
|
`Welcome to ${appName}` })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
52
57
|
'We need a bit of information to get started' }))] })))] })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))] }))] })));
|
|
53
58
|
};
|
|
@@ -5,11 +5,14 @@ import { Typography } from '../../components/Typography/Typography.js';
|
|
|
5
5
|
import '@dynamic-labs/sdk-api';
|
|
6
6
|
import '../../shared/logger.js';
|
|
7
7
|
import '@dynamic-labs/iconic';
|
|
8
|
-
import '@dynamic-labs/
|
|
8
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
9
9
|
import '../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
10
11
|
import '../../utils/constants/colors.js';
|
|
12
|
+
import 'ethers';
|
|
11
13
|
import '../../shared/consts/index.js';
|
|
12
14
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
15
|
+
import '@dynamic-labs/multi-wallet';
|
|
13
16
|
import { createUserProfile } from '../../utils/functions/createUserProfile/createUserProfile.js';
|
|
14
17
|
import { isSupportedNetwork } from '../../utils/functions/isSupportedNetwork/isSupportedNetwork.js';
|
|
15
18
|
import { pixelToRem } from '../../utils/functions/pixelToRem/pixelToRem.js';
|
|
@@ -20,30 +23,32 @@ import 'react-focus-lock';
|
|
|
20
23
|
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
21
24
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
22
25
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
23
|
-
import { TextButton } from '../../components/TextButton/TextButton.js';
|
|
24
26
|
import '../../config/ApiEndpoint.js';
|
|
27
|
+
import '@dynamic-labs/rpc-providers';
|
|
25
28
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
26
|
-
import 'ethers';
|
|
27
29
|
import '../../context/MockContext/MockContext.js';
|
|
28
30
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
29
31
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
32
|
+
import { TextButton } from '../../components/TextButton/TextButton.js';
|
|
30
33
|
import '../../components/IconButton/IconButton.js';
|
|
34
|
+
import '../../components/Alert/Alert.js';
|
|
31
35
|
import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
|
|
32
36
|
import { NetworkPicker } from '../../components/NetworkPicker/NetworkPicker.js';
|
|
33
37
|
import { UserAddress } from '../../components/UserAddress/UserAddress.js';
|
|
34
|
-
import {
|
|
38
|
+
import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
|
|
39
|
+
import { OnboardingUserDataForm } from './OnboardingUserDataForm/OnboardingUserDataForm.js';
|
|
35
40
|
|
|
36
41
|
const CollectUserDataView = () => {
|
|
37
|
-
var _a, _b;
|
|
38
42
|
const { appName, handleLogOut, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, onboardingImageUrl, } = useInternalDynamicContext();
|
|
39
43
|
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = useState(false);
|
|
44
|
+
const nameService = useFetchNameService();
|
|
40
45
|
if (!walletConnector || !decodedOnboardingOnlyToken) {
|
|
41
46
|
return null;
|
|
42
47
|
}
|
|
43
48
|
const userProfile = createUserProfile(decodedOnboardingOnlyToken);
|
|
44
49
|
const evmNetworks = walletConnector.evmNetworks || [];
|
|
45
50
|
const _isSupportedNetwork = isSupportedNetwork({ network, walletConnector });
|
|
46
|
-
return (jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxs(
|
|
51
|
+
return (jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxs(OnboardingUserDataForm, Object.assign({ disableSubmit: !_isSupportedNetwork, userProfile: userProfile }, { children: [jsx("div", Object.assign({ className: 'collect-user-data__img-container' }, { children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsx(WalletIcon, { walletName: walletConnector.name, style: { height: pixelToRem(64), width: pixelToRem(64) } })) })), jsx(UserAddress, { userProfile: userProfile }), jsx("div", Object.assign({ className: 'collect-user-data__network-container' }, { children: jsx(NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) })), !_isSupportedNetwork ? (jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: "Update Network" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Your wallet is not connected to a supported network. Please update before continuing." }))] }))) : (jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
47
52
|
`Welcome to ${appName}` })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
48
53
|
'We need a bit of information to get started' }))] })))] })), jsx(TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))] }))] })));
|
|
49
54
|
};
|
|
@@ -9,11 +9,14 @@ var formik = require('formik');
|
|
|
9
9
|
var decodeJwt = require('../../../shared/utils/functions/decodeJwt/decodeJwt.cjs');
|
|
10
10
|
require('../../../shared/logger.cjs');
|
|
11
11
|
require('@dynamic-labs/iconic');
|
|
12
|
-
require('@dynamic-labs/
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
13
|
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
14
15
|
require('../../../utils/constants/colors.cjs');
|
|
16
|
+
require('ethers');
|
|
15
17
|
require('../../../shared/consts/index.cjs');
|
|
16
18
|
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
19
|
+
require('@dynamic-labs/multi-wallet');
|
|
17
20
|
require('@dynamic-labs/sdk-api');
|
|
18
21
|
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
19
22
|
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
@@ -23,18 +26,19 @@ require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
|
23
26
|
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
24
27
|
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
25
28
|
require('../../../config/ApiEndpoint.cjs');
|
|
29
|
+
require('@dynamic-labs/rpc-providers');
|
|
26
30
|
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
27
|
-
require('ethers');
|
|
28
31
|
require('../../../context/MockContext/MockContext.cjs');
|
|
29
32
|
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
30
33
|
var useUserUpdateRequest = require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
31
34
|
var Button = require('../../../components/Button/Button.cjs');
|
|
32
35
|
require('../../../components/IconButton/IconButton.cjs');
|
|
36
|
+
require('../../../components/Alert/Alert.cjs');
|
|
33
37
|
var index = require('../UserDataFields/index.cjs');
|
|
34
38
|
var useUserDataForm = require('../../../utils/hooks/useUserDataForm/useUserDataForm.cjs');
|
|
35
39
|
|
|
36
|
-
const
|
|
37
|
-
const { policiesConsentInnerComponent, onboardingOnlyJwt, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
40
|
+
const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
41
|
+
const { policiesConsentInnerComponent, onboardingOnlyJwt, setShowAuthFlow, setCallback, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
38
42
|
const { setView } = ViewContext.useViewContext();
|
|
39
43
|
const decodedJwt = decodeJwt.decodeJwt(onboardingOnlyJwt);
|
|
40
44
|
const { updateUser } = useUserUpdateRequest.useUserUpdateRequestInternal({
|
|
@@ -47,7 +51,8 @@ const UserDataForm = ({ children, userProfile }) => {
|
|
|
47
51
|
return;
|
|
48
52
|
}
|
|
49
53
|
setShowAuthFlow(false);
|
|
50
|
-
|
|
54
|
+
setCallback('authSuccess');
|
|
55
|
+
}), [setCallback, setShowAuthFlow, setView, updateUser]);
|
|
51
56
|
const { fetch: loading, formikInitialValues, formikValidationSchema, enforcePolicies, onFormSubmit, } = useUserDataForm.useUserDataForm({
|
|
52
57
|
fields: (decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields) || [],
|
|
53
58
|
onSubmit,
|
|
@@ -58,11 +63,12 @@ const UserDataForm = ({ children, userProfile }) => {
|
|
|
58
63
|
].flat();
|
|
59
64
|
return (jsxRuntime.jsx(formik.Formik, Object.assign({ onSubmit: onFormSubmit, initialValues: formikInitialValues, validationSchema: formikValidationSchema }, { children: ({ errors, touched, values }) => {
|
|
60
65
|
var _a;
|
|
61
|
-
const isSubmitBtnDisabled =
|
|
62
|
-
(
|
|
63
|
-
(
|
|
66
|
+
const isSubmitBtnDisabled = disableSubmit ||
|
|
67
|
+
(enforcePolicies &&
|
|
68
|
+
(policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.length) !==
|
|
69
|
+
((_a = values.policiesConsentArray) === null || _a === void 0 ? void 0 : _a.length));
|
|
64
70
|
return (jsxRuntime.jsx(formik.Form, Object.assign({ className: 'user-data-form__form' }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, jsxRuntime.jsx(index.UserDataFields, { fields: decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields, errors: errors, touched: touched, policiesConsentInnerComponentArray: policiesConsentInnerComponentArray }), jsxRuntime.jsx(Button.Button, Object.assign({ type: 'submit', loading: loading, disabled: isSubmitBtnDisabled, buttonVariant: 'primary', expanded: true, buttonRounded: 'default', buttonPadding: 'large' }, { children: "Continue" }))] }) })));
|
|
65
71
|
} })));
|
|
66
72
|
};
|
|
67
73
|
|
|
68
|
-
exports.
|
|
74
|
+
exports.OnboardingUserDataForm = OnboardingUserDataForm;
|