@dynamic-labs/sdk-react-core 0.19.0-alpha.5 → 0.19.0-alpha.7
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 +39 -0
- package/package.cjs +7 -5
- package/package.js +7 -5
- package/package.json +14 -12
- package/src/index.cjs +3 -0
- package/src/index.js +2 -0
- package/src/lib/Main.cjs +1 -0
- package/src/lib/Main.js +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -0
- package/src/lib/components/Divider/Divider.cjs +1 -0
- package/src/lib/components/Divider/Divider.js +1 -0
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +3 -2
- package/src/lib/components/IconWithSpinner/IconWithSpinner.d.ts +4 -2
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +3 -2
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -0
- package/src/lib/components/Modal/Modal.cjs +1 -0
- package/src/lib/components/Modal/Modal.js +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.d.ts +0 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +9 -3
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +9 -3
- package/src/lib/components/OverlayCard/OverlayCard.cjs +1 -1
- package/src/lib/components/OverlayCard/OverlayCard.js +1 -1
- package/src/lib/components/Portal/Portal.cjs +1 -0
- package/src/lib/components/Portal/Portal.js +1 -0
- package/src/lib/components/Search/Search.d.ts +0 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +86 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.d.ts +11 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.js +82 -0
- package/src/lib/components/Switch/Switch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/AuthModeSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/TemplateSelect.d.ts +0 -1
- package/src/lib/components/Toolkit/components/ThemeSwitch.d.ts +0 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
- package/src/lib/components/Tooltip/Tooltip.js +1 -0
- package/src/lib/components/TosAndPp/TosAndPp.d.ts +0 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -0
- package/src/lib/components/UserAddress/UserAddress.js +1 -0
- 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 +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +2 -1
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +36 -18
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +14 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +36 -18
- package/src/lib/context/DynamicContext/helpers.cjs +30 -3
- package/src/lib/context/DynamicContext/helpers.d.ts +5 -1
- package/src/lib/context/DynamicContext/helpers.js +28 -4
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs +5 -2
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.d.ts +4 -2
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.js +5 -2
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.d.ts +1 -1
- package/src/lib/context/DynamicContext/types/index.d.ts +6 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +1 -0
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +2 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +2 -1
- package/src/lib/context/ErrorContext/ErrorContext.cjs +1 -0
- package/src/lib/context/ErrorContext/ErrorContext.js +1 -0
- package/src/lib/context/MockContext/MockContext.cjs +1 -0
- package/src/lib/context/MockContext/MockContext.js +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -0
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +2 -16
- package/src/lib/context/WalletContext/WalletContext.js +2 -16
- package/src/lib/data/api.cjs +7 -0
- package/src/lib/data/api.js +7 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +2 -2
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +2 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +3 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +3 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -0
- package/src/lib/locale/en/translation.cjs +92 -0
- package/src/lib/locale/en/translation.js +79 -0
- package/src/lib/locale/index.d.ts +1 -0
- package/src/lib/locale/locale.cjs +55 -0
- package/src/lib/locale/locale.d.ts +13 -0
- package/src/lib/locale/locale.js +46 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -0
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -0
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/assets/sign-in-with-email.cjs +59 -0
- package/src/lib/shared/assets/sign-in-with-email.js +35 -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 +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/createUserProfile/createUserProfile.cjs +1 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +31 -16
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +31 -16
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +6 -2
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +6 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +13 -8
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +1 -19
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +13 -8
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +2 -2
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +2 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +22 -28
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +23 -29
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +74 -0
- package/src/lib/utils/{functions/getDynamicLayoutData/getDynamicLayoutData.d.ts → hooks/useDynamicLayoutData/useDynamicLayoutData.d.ts} +2 -2
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +70 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +1 -6
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +1 -6
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +8 -6
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +8 -6
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +15 -10
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +15 -10
- package/src/lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.cjs +0 -5
- package/src/lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.js +0 -5
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +0 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +0 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +7 -0
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +7 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -0
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +3 -1
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +3 -2
- package/src/lib/utils/hooks/useWallets/useWallets.js +3 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +2 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.js +2 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +4 -3
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +4 -3
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +1 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +1 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +10 -3
- package/src/lib/views/EmailVerification/EmailVerification.js +11 -4
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
- package/src/lib/views/LoginView/LoginView.cjs +6 -6
- package/src/lib/views/LoginView/LoginView.js +6 -6
- package/src/lib/views/LoginView/{components/EmailSignIn → sections/EmailSignInSection}/LoginEmailForm.cjs +1 -0
- package/src/lib/views/LoginView/{components/EmailSignIn → sections/EmailSignInSection}/LoginEmailForm.js +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +64 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.d.ts +2 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +60 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +35 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.d.ts +2 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +31 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/index.d.ts +1 -0
- package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/ListItemButton/ListItemButton.cjs +1 -0
- package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/ListItemButton/ListItemButton.js +1 -0
- package/src/lib/views/LoginView/{components/WalletSignIn/WalletSignIn.cjs → sections/WalletSignInSection/WalletSignInSection.cjs} +7 -2
- package/src/lib/views/LoginView/{components/WalletSignIn/WalletSignIn.d.ts → sections/WalletSignInSection/WalletSignInSection.d.ts} +1 -1
- package/src/lib/views/LoginView/{components/WalletSignIn/WalletSignIn.js → sections/WalletSignInSection/WalletSignInSection.js} +7 -2
- package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/WalletSimpleSignIn/WalletSimpleSignIn.cjs +3 -1
- package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/WalletSimpleSignIn/WalletSimpleSignIn.js +3 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/index.d.ts +4 -0
- package/src/lib/views/LoginView/useLoginView.cjs +17 -4
- package/src/lib/views/LoginView/useLoginView.js +17 -4
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -0
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -0
- package/src/lib/views/NoAccess/NoAccess.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
- package/src/lib/views/QrCodeView/QRCode.cjs +1 -0
- package/src/lib/views/QrCodeView/QRCode.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +1 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -0
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -0
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -0
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -0
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
- package/src/lib/views/viewToComponentMap.cjs +1 -0
- package/src/lib/views/viewToComponentMap.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +3 -3
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +3 -3
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +7 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +7 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +4 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +4 -3
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +4 -3
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -0
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +0 -67
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +0 -63
- package/src/lib/views/LoginView/components/SocialSignIn/SocialSignIn.cjs +0 -88
- package/src/lib/views/LoginView/components/SocialSignIn/SocialSignIn.d.ts +0 -2
- package/src/lib/views/LoginView/components/SocialSignIn/SocialSignIn.js +0 -84
- package/src/lib/views/LoginView/components/WalletSignIn/index.d.ts +0 -1
- package/src/lib/views/LoginView/components/index.d.ts +0 -3
- /package/src/lib/{views/LoginView/components → components}/SocialSignIn/index.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/EmailSignIn → sections/EmailSignInSection}/LoginEmailForm.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/EmailSignIn → sections/EmailSignInSection}/index.d.ts +0 -0
- /package/src/lib/views/LoginView/{components → sections}/LoginWidget.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/ListItemButton/ListItemButton.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/ListItemButton/index.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/WalletSimpleSignIn/WalletSimpleSignIn.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/WalletSimpleSignIn/index.d.ts +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { WalletConnectIcon } from '@dynamic-labs/iconic';
|
|
4
|
+
|
|
5
|
+
const useDynamicLayoutData = ({ view }) => {
|
|
6
|
+
const { t } = useTranslation();
|
|
7
|
+
if (view === 'no-access') {
|
|
8
|
+
const headerData = {
|
|
9
|
+
heading: t('dyn_no_access.title'),
|
|
10
|
+
};
|
|
11
|
+
return { headerData };
|
|
12
|
+
}
|
|
13
|
+
const helpHeaderMap = {
|
|
14
|
+
'login-with-email-or-wallet-full-wallet-list': {
|
|
15
|
+
heading: t('dyn_login.helper.all_wallet_list'),
|
|
16
|
+
},
|
|
17
|
+
'login-with-wallet-only': {
|
|
18
|
+
heading: t('dyn_login.helper.wallet_only'),
|
|
19
|
+
},
|
|
20
|
+
'pending-connect': {
|
|
21
|
+
heading: t('dyn_login.helper.pending_connect'),
|
|
22
|
+
},
|
|
23
|
+
'pending-signature': {
|
|
24
|
+
heading: t('dyn_login.helper.pending_signature'),
|
|
25
|
+
},
|
|
26
|
+
'pending-signature-without-back-button': {
|
|
27
|
+
heading: t('dyn_login.helper.pending_signature_without_back_button'),
|
|
28
|
+
},
|
|
29
|
+
'qr-code': {
|
|
30
|
+
heading: t('dyn_login.helper.qr_code.title'),
|
|
31
|
+
},
|
|
32
|
+
'wallet-connect-mobile-wallets-list': {
|
|
33
|
+
heading: t('dyn_wallet_conect.mobile.wallet_list.helper'),
|
|
34
|
+
},
|
|
35
|
+
'wallet-list': {
|
|
36
|
+
heading: t('dyn_wallet_list.helper'),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const headerMap = {
|
|
40
|
+
'account-exists': { heading: t('dyn_account_exists.title') },
|
|
41
|
+
'chainalysis-blocked-wallet': {
|
|
42
|
+
heading: t('dyn_chainalysis_blocked_wallet.title'),
|
|
43
|
+
},
|
|
44
|
+
'login-with-email-or-wallet': { heading: t('dyn_login.title.all') },
|
|
45
|
+
'login-with-email-or-wallet-full-wallet-list': {
|
|
46
|
+
heading: t('dyn_login.title.all_wallet_list'),
|
|
47
|
+
},
|
|
48
|
+
'login-with-wallet-only': {
|
|
49
|
+
heading: t('dyn_login.title.wallet_only'),
|
|
50
|
+
},
|
|
51
|
+
'multi-wallet-wallet-list': {
|
|
52
|
+
heading: t('dyn_wallet_list.title.link'),
|
|
53
|
+
},
|
|
54
|
+
'wallet-connect-mobile-wallets-list': {
|
|
55
|
+
heading: (jsxs(Fragment, { children: [jsx(WalletConnectIcon, { style: { height: '1.5rem', width: '1.5rem' } }), ' ', t('dyn_wallet_conect.mobile.wallet_list.title')] })),
|
|
56
|
+
},
|
|
57
|
+
'wallet-list': {
|
|
58
|
+
heading: t('dyn_wallet_list.title.select'),
|
|
59
|
+
},
|
|
60
|
+
'wallet-sign': { heading: t('dyn_wallet_transfer.sign.title') },
|
|
61
|
+
};
|
|
62
|
+
const helpHeaderData = helpHeaderMap[view];
|
|
63
|
+
const headerData = headerMap[view];
|
|
64
|
+
return {
|
|
65
|
+
headerData,
|
|
66
|
+
helpHeaderData,
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { useDynamicLayoutData };
|
|
@@ -147,6 +147,7 @@ const useSocialAccounts = ({ sessionTimeout } = {
|
|
|
147
147
|
if (!isValidMessage) {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
|
+
setIsProcessing(true);
|
|
150
151
|
if (!((_c = providersWaitingOauthMessages.current) === null || _c === void 0 ? void 0 : _c[provider])) {
|
|
151
152
|
handleError(types.SocialOAuthErrorCode.SESSION_TIMEOUT, `Linking ${provider} account session timeout.`);
|
|
152
153
|
return;
|
|
@@ -201,15 +202,9 @@ const useSocialAccounts = ({ sessionTimeout } = {
|
|
|
201
202
|
if (!providersWithoutWindowOpenerRefence.includes(provider)) {
|
|
202
203
|
// For provider that support window.opener, we need to clear all states/listeners when the window is closed
|
|
203
204
|
authWindowInterval.current = setInterval(() => {
|
|
204
|
-
var _a;
|
|
205
205
|
if (!(authWindow === null || authWindow === void 0 ? void 0 : authWindow.closed)) {
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
-
// window was closed by user, before completing oauth
|
|
209
|
-
if ((_a = providersWaitingOauthMessages.current) === null || _a === void 0 ? void 0 : _a[provider]) {
|
|
210
|
-
clearListeners();
|
|
211
|
-
handleError(types.SocialOAuthErrorCode.OAUTH_WINDOW_CLOSED, `Linking ${provider} account window closed.`);
|
|
212
|
-
}
|
|
213
208
|
clearInterval(authWindowInterval.current);
|
|
214
209
|
setIsProcessing(false);
|
|
215
210
|
});
|
|
@@ -143,6 +143,7 @@ const useSocialAccounts = ({ sessionTimeout } = {
|
|
|
143
143
|
if (!isValidMessage) {
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
+
setIsProcessing(true);
|
|
146
147
|
if (!((_c = providersWaitingOauthMessages.current) === null || _c === void 0 ? void 0 : _c[provider])) {
|
|
147
148
|
handleError(SocialOAuthErrorCode.SESSION_TIMEOUT, `Linking ${provider} account session timeout.`);
|
|
148
149
|
return;
|
|
@@ -197,15 +198,9 @@ const useSocialAccounts = ({ sessionTimeout } = {
|
|
|
197
198
|
if (!providersWithoutWindowOpenerRefence.includes(provider)) {
|
|
198
199
|
// For provider that support window.opener, we need to clear all states/listeners when the window is closed
|
|
199
200
|
authWindowInterval.current = setInterval(() => {
|
|
200
|
-
var _a;
|
|
201
201
|
if (!(authWindow === null || authWindow === void 0 ? void 0 : authWindow.closed)) {
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
|
-
// window was closed by user, before completing oauth
|
|
205
|
-
if ((_a = providersWaitingOauthMessages.current) === null || _a === void 0 ? void 0 : _a[provider]) {
|
|
206
|
-
clearListeners();
|
|
207
|
-
handleError(SocialOAuthErrorCode.OAUTH_WINDOW_CLOSED, `Linking ${provider} account window closed.`);
|
|
208
|
-
}
|
|
209
204
|
clearInterval(authWindowInterval.current);
|
|
210
205
|
setIsProcessing(false);
|
|
211
206
|
});
|
package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs
CHANGED
|
@@ -11,17 +11,19 @@ var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
|
|
|
11
11
|
var validateUpdateRequest = require('./validateUpdateRequest/validateUpdateRequest.cjs');
|
|
12
12
|
|
|
13
13
|
/** Saves the values updated by the user */
|
|
14
|
-
const saveUserValues = ({ fields: newValues, updateUserResult: { isEmailVerificationRequired }, }, internalEvents,
|
|
14
|
+
const saveUserValues = ({ fields: newValues, updateUserResult: { isEmailVerificationRequired }, }, internalEvents, internalSetShowAuthFlow, setView, resolve, reject) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
15
15
|
// If no verification is needed, we are done
|
|
16
16
|
if (!isEmailVerificationRequired) {
|
|
17
17
|
resolve(newValues);
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
// Show email verification view
|
|
21
|
-
|
|
21
|
+
internalSetShowAuthFlow(true);
|
|
22
22
|
setView('verify-email');
|
|
23
23
|
// Subscribe to email verification result
|
|
24
|
-
internalEvents.current.once('emailVerificationResult', (wasSuccessful) => {
|
|
24
|
+
internalEvents.current.once('emailVerificationResult', (wasSuccessful, newEmail) => {
|
|
25
|
+
// Make sure we're using the correct, updated email. User might have changed it mid-OTP
|
|
26
|
+
newValues.email = newEmail;
|
|
25
27
|
wasSuccessful
|
|
26
28
|
? resolve(newValues)
|
|
27
29
|
: reject('Failed to verify email, no fields were updated');
|
|
@@ -32,7 +34,7 @@ const saveUserValues = ({ fields: newValues, updateUserResult: { isEmailVerifica
|
|
|
32
34
|
* The fields must have been previously enabled in the dashboard
|
|
33
35
|
*/
|
|
34
36
|
const useUpdateUserWithModal = (updateUser) => {
|
|
35
|
-
const { user, projectSettings,
|
|
37
|
+
const { user, projectSettings, internalSetShowAuthFlow, internalEvents } = useInternalDynamicContext.useInternalDynamicContext();
|
|
36
38
|
const { setView } = ViewContext.useViewContext();
|
|
37
39
|
const editorContext = React.useContext(UserFieldEditorContext.UserFieldEditorContext);
|
|
38
40
|
if (!editorContext)
|
|
@@ -52,7 +54,7 @@ const useUpdateUserWithModal = (updateUser) => {
|
|
|
52
54
|
subtitle: options === null || options === void 0 ? void 0 : options.subtitle,
|
|
53
55
|
title: options === null || options === void 0 ? void 0 : options.title,
|
|
54
56
|
}, updateUser)
|
|
55
|
-
.then((updateValues) => saveUserValues(updateValues, internalEvents,
|
|
57
|
+
.then((updateValues) => saveUserValues(updateValues, internalEvents, internalSetShowAuthFlow, setView, resolve, reject))
|
|
56
58
|
.catch((error) => {
|
|
57
59
|
if (/email already exists/gi.test(error))
|
|
58
60
|
throw error;
|
|
@@ -63,7 +65,7 @@ const useUpdateUserWithModal = (updateUser) => {
|
|
|
63
65
|
projectSettings,
|
|
64
66
|
promptUserForValues,
|
|
65
67
|
updateUser,
|
|
66
|
-
|
|
68
|
+
internalSetShowAuthFlow,
|
|
67
69
|
setView,
|
|
68
70
|
internalEvents,
|
|
69
71
|
]);
|
package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js
CHANGED
|
@@ -7,17 +7,19 @@ import { useViewContext } from '../../../../context/ViewContext/ViewContext.js';
|
|
|
7
7
|
import { validateUpdateRequest } from './validateUpdateRequest/validateUpdateRequest.js';
|
|
8
8
|
|
|
9
9
|
/** Saves the values updated by the user */
|
|
10
|
-
const saveUserValues = ({ fields: newValues, updateUserResult: { isEmailVerificationRequired }, }, internalEvents,
|
|
10
|
+
const saveUserValues = ({ fields: newValues, updateUserResult: { isEmailVerificationRequired }, }, internalEvents, internalSetShowAuthFlow, setView, resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
|
|
11
11
|
// If no verification is needed, we are done
|
|
12
12
|
if (!isEmailVerificationRequired) {
|
|
13
13
|
resolve(newValues);
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
16
|
// Show email verification view
|
|
17
|
-
|
|
17
|
+
internalSetShowAuthFlow(true);
|
|
18
18
|
setView('verify-email');
|
|
19
19
|
// Subscribe to email verification result
|
|
20
|
-
internalEvents.current.once('emailVerificationResult', (wasSuccessful) => {
|
|
20
|
+
internalEvents.current.once('emailVerificationResult', (wasSuccessful, newEmail) => {
|
|
21
|
+
// Make sure we're using the correct, updated email. User might have changed it mid-OTP
|
|
22
|
+
newValues.email = newEmail;
|
|
21
23
|
wasSuccessful
|
|
22
24
|
? resolve(newValues)
|
|
23
25
|
: reject('Failed to verify email, no fields were updated');
|
|
@@ -28,7 +30,7 @@ const saveUserValues = ({ fields: newValues, updateUserResult: { isEmailVerifica
|
|
|
28
30
|
* The fields must have been previously enabled in the dashboard
|
|
29
31
|
*/
|
|
30
32
|
const useUpdateUserWithModal = (updateUser) => {
|
|
31
|
-
const { user, projectSettings,
|
|
33
|
+
const { user, projectSettings, internalSetShowAuthFlow, internalEvents } = useInternalDynamicContext();
|
|
32
34
|
const { setView } = useViewContext();
|
|
33
35
|
const editorContext = useContext(UserFieldEditorContext);
|
|
34
36
|
if (!editorContext)
|
|
@@ -48,7 +50,7 @@ const useUpdateUserWithModal = (updateUser) => {
|
|
|
48
50
|
subtitle: options === null || options === void 0 ? void 0 : options.subtitle,
|
|
49
51
|
title: options === null || options === void 0 ? void 0 : options.title,
|
|
50
52
|
}, updateUser)
|
|
51
|
-
.then((updateValues) => saveUserValues(updateValues, internalEvents,
|
|
53
|
+
.then((updateValues) => saveUserValues(updateValues, internalEvents, internalSetShowAuthFlow, setView, resolve, reject))
|
|
52
54
|
.catch((error) => {
|
|
53
55
|
if (/email already exists/gi.test(error))
|
|
54
56
|
throw error;
|
|
@@ -59,7 +61,7 @@ const useUpdateUserWithModal = (updateUser) => {
|
|
|
59
61
|
projectSettings,
|
|
60
62
|
promptUserForValues,
|
|
61
63
|
updateUser,
|
|
62
|
-
|
|
64
|
+
internalSetShowAuthFlow,
|
|
63
65
|
setView,
|
|
64
66
|
internalEvents,
|
|
65
67
|
]);
|
|
@@ -90,21 +90,26 @@ const useVerifyWallet = ({ consumeNonce, displaySiweStatement, environmentId, pr
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
|
+
const handleWalletUsedError = (e) => {
|
|
94
|
+
var _a;
|
|
95
|
+
// This is a special case where the user is trying to link a wallet
|
|
96
|
+
// and the wallet is already linked and we don't want to kill the session.
|
|
97
|
+
setShowAuthFlow(true);
|
|
98
|
+
setView('wallet-used');
|
|
99
|
+
setIsSingleWalletAccount(false);
|
|
100
|
+
if (e.code === 'reassign_wallet_error') {
|
|
101
|
+
if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.preventOrphanedAccounts) {
|
|
102
|
+
setView('wallet-cannot-be-transferred');
|
|
103
|
+
}
|
|
104
|
+
setIsSingleWalletAccount(true);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
93
107
|
const handleError = (e, walletConnector, address, oauth) => {
|
|
94
108
|
removeConnectedWalletsInfo();
|
|
95
109
|
// Ensure auth verification flag is taken down
|
|
96
110
|
setIsVerificationInProgress(false);
|
|
97
|
-
// This is a special case where the user is trying to link a wallet
|
|
98
|
-
// and the wallet is already linked and we don't want to kill the session.
|
|
99
111
|
if (e instanceof utils.WalletUsedError) {
|
|
100
|
-
|
|
101
|
-
setView('wallet-used');
|
|
102
|
-
setIsSingleWalletAccount(false);
|
|
103
|
-
if (e.code === 'reassign_wallet_error') {
|
|
104
|
-
setView('wallet-cannot-be-transferred');
|
|
105
|
-
setIsSingleWalletAccount(true);
|
|
106
|
-
}
|
|
107
|
-
return;
|
|
112
|
+
return handleWalletUsedError(e);
|
|
108
113
|
}
|
|
109
114
|
walletConnector.endSession();
|
|
110
115
|
if (e instanceof utils.ChainalysisError) {
|
|
@@ -86,21 +86,26 @@ const useVerifyWallet = ({ consumeNonce, displaySiweStatement, environmentId, pr
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
+
const handleWalletUsedError = (e) => {
|
|
90
|
+
var _a;
|
|
91
|
+
// This is a special case where the user is trying to link a wallet
|
|
92
|
+
// and the wallet is already linked and we don't want to kill the session.
|
|
93
|
+
setShowAuthFlow(true);
|
|
94
|
+
setView('wallet-used');
|
|
95
|
+
setIsSingleWalletAccount(false);
|
|
96
|
+
if (e.code === 'reassign_wallet_error') {
|
|
97
|
+
if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.preventOrphanedAccounts) {
|
|
98
|
+
setView('wallet-cannot-be-transferred');
|
|
99
|
+
}
|
|
100
|
+
setIsSingleWalletAccount(true);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
89
103
|
const handleError = (e, walletConnector, address, oauth) => {
|
|
90
104
|
removeConnectedWalletsInfo();
|
|
91
105
|
// Ensure auth verification flag is taken down
|
|
92
106
|
setIsVerificationInProgress(false);
|
|
93
|
-
// This is a special case where the user is trying to link a wallet
|
|
94
|
-
// and the wallet is already linked and we don't want to kill the session.
|
|
95
107
|
if (e instanceof WalletUsedError) {
|
|
96
|
-
|
|
97
|
-
setView('wallet-used');
|
|
98
|
-
setIsSingleWalletAccount(false);
|
|
99
|
-
if (e.code === 'reassign_wallet_error') {
|
|
100
|
-
setView('wallet-cannot-be-transferred');
|
|
101
|
-
setIsSingleWalletAccount(true);
|
|
102
|
-
}
|
|
103
|
-
return;
|
|
108
|
+
return handleWalletUsedError(e);
|
|
104
109
|
}
|
|
105
110
|
walletConnector.endSession();
|
|
106
111
|
if (e instanceof ChainalysisError) {
|
|
@@ -19,11 +19,6 @@ const useWalletConnectorEvent = (eventEmitters, eventName, handler) => {
|
|
|
19
19
|
/**
|
|
20
20
|
* Initialize the event listeners for the wallet connectors
|
|
21
21
|
* to ensure they were initialized before listening to events
|
|
22
|
-
*
|
|
23
|
-
* This will be removed when all wallets are migrated to
|
|
24
|
-
* use the event emitter "emit" method
|
|
25
|
-
*
|
|
26
|
-
* Ticket todo - QNTM-88
|
|
27
22
|
*/
|
|
28
23
|
eventEmittersArray.forEach((connector) => connector.initEventListener());
|
|
29
24
|
const uniqueEventEmitters = Array.from(new Set(eventEmittersArray));
|
|
@@ -15,11 +15,6 @@ const useWalletConnectorEvent = (eventEmitters, eventName, handler) => {
|
|
|
15
15
|
/**
|
|
16
16
|
* Initialize the event listeners for the wallet connectors
|
|
17
17
|
* to ensure they were initialized before listening to events
|
|
18
|
-
*
|
|
19
|
-
* This will be removed when all wallets are migrated to
|
|
20
|
-
* use the event emitter "emit" method
|
|
21
|
-
*
|
|
22
|
-
* Ticket todo - QNTM-88
|
|
23
18
|
*/
|
|
24
19
|
eventEmittersArray.forEach((connector) => connector.initEventListener());
|
|
25
20
|
const uniqueEventEmitters = Array.from(new Set(eventEmittersArray));
|
|
@@ -50,8 +50,6 @@ const useWalletConnectors = ({ authMode, authToken, connectedWallets, wallets: a
|
|
|
50
50
|
* initialize the bridge between the old event listeners and the new event emitter.
|
|
51
51
|
* When the wallet connectors are migrated to the new event emitter, there will be no
|
|
52
52
|
* need to initialize or teardown event listeners, then we can remove this useEffect.
|
|
53
|
-
* @todo remove this useEffect
|
|
54
|
-
* Ticket todo - QNTM-88
|
|
55
53
|
*/
|
|
56
54
|
React.useEffect(() => walletsBasedOnAuthMode.forEach((wallet) => {
|
|
57
55
|
wallet.connector.initEventListener();
|
|
@@ -46,8 +46,6 @@ const useWalletConnectors = ({ authMode, authToken, connectedWallets, wallets: a
|
|
|
46
46
|
* initialize the bridge between the old event listeners and the new event emitter.
|
|
47
47
|
* When the wallet connectors are migrated to the new event emitter, there will be no
|
|
48
48
|
* need to initialize or teardown event listeners, then we can remove this useEffect.
|
|
49
|
-
* @todo remove this useEffect
|
|
50
|
-
* Ticket todo - QNTM-88
|
|
51
49
|
*/
|
|
52
50
|
useEffect(() => walletsBasedOnAuthMode.forEach((wallet) => {
|
|
53
51
|
wallet.connector.initEventListener();
|
|
@@ -131,6 +131,13 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
131
131
|
}));
|
|
132
132
|
useWalletConnectorEvent.useWalletConnectorEvent(uniqueNonPrimaryWallets, 'disconnect', () => {
|
|
133
133
|
logger.logger.debug('secondary wallet disconnect');
|
|
134
|
+
// argent sends a disconnect event when the user adds a new account
|
|
135
|
+
if (authMode === 'connect-only' &&
|
|
136
|
+
secondaryWallets.length &&
|
|
137
|
+
secondaryWallets[0].connector.key === 'argentx') {
|
|
138
|
+
refreshConnectedWallet(secondaryWallets[0].id, secondaryWallets[0].connector);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
134
141
|
computeConnectedStateForWallets();
|
|
135
142
|
});
|
|
136
143
|
const handleAccountChangeWhenAwaitingAccountSwitch = React.useCallback((isPrimaryWallet, newAddress) => {
|
|
@@ -127,6 +127,13 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
127
127
|
}));
|
|
128
128
|
useWalletConnectorEvent(uniqueNonPrimaryWallets, 'disconnect', () => {
|
|
129
129
|
logger.debug('secondary wallet disconnect');
|
|
130
|
+
// argent sends a disconnect event when the user adds a new account
|
|
131
|
+
if (authMode === 'connect-only' &&
|
|
132
|
+
secondaryWallets.length &&
|
|
133
|
+
secondaryWallets[0].connector.key === 'argentx') {
|
|
134
|
+
refreshConnectedWallet(secondaryWallets[0].id, secondaryWallets[0].connector);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
130
137
|
computeConnectedStateForWallets();
|
|
131
138
|
});
|
|
132
139
|
const handleAccountChangeWhenAwaitingAccountSwitch = useCallback((isPrimaryWallet, newAddress) => {
|
|
@@ -49,6 +49,7 @@ require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
49
49
|
require('formik');
|
|
50
50
|
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
51
51
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
52
|
+
require('../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
52
53
|
|
|
53
54
|
const useWalletUiUtils = ({ appLogoUrl, appName, getAppOrigin, }) => {
|
|
54
55
|
const confirmationStateRef = React.useRef('enabled');
|
|
@@ -45,6 +45,7 @@ import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
45
45
|
import 'formik';
|
|
46
46
|
import '../../../components/InlineWidget/InlineWidget.js';
|
|
47
47
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
48
|
+
import '../../../components/OverlayCard/OverlayCard.context.js';
|
|
48
49
|
|
|
49
50
|
const useWalletUiUtils = ({ appLogoUrl, appName, getAppOrigin, }) => {
|
|
50
51
|
const confirmationStateRef = useRef('enabled');
|
|
@@ -6,7 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var data = require('../../../views/WalletList/data.cjs');
|
|
7
7
|
var verifyMagicIsSetup = require('./utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
8
8
|
|
|
9
|
-
const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }) => {
|
|
9
|
+
const useWallets = ({ projectSettings, appLogoUrl, appName, deepLinkPreference, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }) => {
|
|
10
10
|
const wallets = React.useMemo(() => {
|
|
11
11
|
if (!projectSettings || !Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length)
|
|
12
12
|
return [];
|
|
@@ -14,6 +14,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
14
14
|
appLogoUrl,
|
|
15
15
|
appName,
|
|
16
16
|
customerApiProviders: projectSettings.providers || [],
|
|
17
|
+
deepLinkPreference,
|
|
17
18
|
flowNetwork,
|
|
18
19
|
networkConfigurations,
|
|
19
20
|
skipMemo: true,
|
|
@@ -26,6 +27,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
26
27
|
appLogoUrl,
|
|
27
28
|
appName,
|
|
28
29
|
customerApiProviders: projectSettings.providers || [],
|
|
30
|
+
deepLinkPreference,
|
|
29
31
|
flowNetwork,
|
|
30
32
|
networkConfigurations,
|
|
31
33
|
skipMemo: true,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ProjectSettings } from '@dynamic-labs/sdk-api';
|
|
2
2
|
import { NetworkConfigurationMap, WalletUiUtils } from '@dynamic-labs/types';
|
|
3
|
-
import { WalletConnector, WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
+
import { DeepLinkVariant, WalletConnector, WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
5
5
|
type Props = {
|
|
6
6
|
appLogoUrl?: string;
|
|
7
7
|
appName?: string;
|
|
8
|
+
deepLinkPreference?: DeepLinkVariant;
|
|
8
9
|
flowNetwork?: 'mainnet' | 'testnet';
|
|
9
10
|
networkConfigurations: NetworkConfigurationMap | undefined;
|
|
10
11
|
projectSettings: ProjectSettings | undefined;
|
|
@@ -13,7 +14,7 @@ type Props = {
|
|
|
13
14
|
walletConnectorsProp?: WalletConnectorsMethod[];
|
|
14
15
|
walletUiUtils: WalletUiUtils<WalletConnector>;
|
|
15
16
|
};
|
|
16
|
-
export declare const useWallets: ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }: Props) => {
|
|
17
|
+
export declare const useWallets: ({ projectSettings, appLogoUrl, appName, deepLinkPreference, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }: Props) => {
|
|
17
18
|
wallets: import("../../../shared").WalletOption[];
|
|
18
19
|
};
|
|
19
20
|
export {};
|
|
@@ -2,7 +2,7 @@ import { useMemo, useEffect } from 'react';
|
|
|
2
2
|
import { getInstalledWallets, getNotInstalledWallets } from '../../../views/WalletList/data.js';
|
|
3
3
|
import { verifyMagicIsSetup } from './utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
4
4
|
|
|
5
|
-
const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }) => {
|
|
5
|
+
const useWallets = ({ projectSettings, appLogoUrl, appName, deepLinkPreference, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }) => {
|
|
6
6
|
const wallets = useMemo(() => {
|
|
7
7
|
if (!projectSettings || !Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length)
|
|
8
8
|
return [];
|
|
@@ -10,6 +10,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
10
10
|
appLogoUrl,
|
|
11
11
|
appName,
|
|
12
12
|
customerApiProviders: projectSettings.providers || [],
|
|
13
|
+
deepLinkPreference,
|
|
13
14
|
flowNetwork,
|
|
14
15
|
networkConfigurations,
|
|
15
16
|
skipMemo: true,
|
|
@@ -22,6 +23,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
22
23
|
appLogoUrl,
|
|
23
24
|
appName,
|
|
24
25
|
customerApiProviders: projectSettings.providers || [],
|
|
26
|
+
deepLinkPreference,
|
|
25
27
|
flowNetwork,
|
|
26
28
|
networkConfigurations,
|
|
27
29
|
skipMemo: true,
|
|
@@ -52,8 +52,9 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
52
52
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
53
53
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
54
54
|
var capitalize = require('../../shared/utils/functions/capitalize/capitalize.cjs');
|
|
55
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
55
56
|
var SocialRedirectContext = require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
56
|
-
var LoginEmailForm = require('../LoginView/
|
|
57
|
+
var LoginEmailForm = require('../LoginView/sections/EmailSignInSection/LoginEmailForm.cjs');
|
|
57
58
|
|
|
58
59
|
const AccountExistsView = () => {
|
|
59
60
|
const { existentAccountData } = AccountExistsContext.useAccountExistsContext();
|
|
@@ -48,8 +48,9 @@ import '../../components/Popper/PopperContext/PopperContext.js';
|
|
|
48
48
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
49
49
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
50
50
|
import { capitalize } from '../../shared/utils/functions/capitalize/capitalize.js';
|
|
51
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
51
52
|
import { useSocialRedirectContext } from '../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
52
|
-
import { LoginEmailForm } from '../LoginView/
|
|
53
|
+
import { LoginEmailForm } from '../LoginView/sections/EmailSignInSection/LoginEmailForm.js';
|
|
53
54
|
|
|
54
55
|
const AccountExistsView = () => {
|
|
55
56
|
const { existentAccountData } = useAccountExistsContext();
|
|
@@ -48,6 +48,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
48
48
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
49
49
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
50
50
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
51
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
51
52
|
var Captcha = require('../../components/Captcha/Captcha.cjs');
|
|
52
53
|
|
|
53
54
|
const CaptchaVerifyUser = () => {
|
|
@@ -44,6 +44,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
44
44
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
45
45
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
46
46
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
47
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
47
48
|
import { Captcha } from '../../components/Captcha/Captcha.js';
|
|
48
49
|
|
|
49
50
|
const CaptchaVerifyUser = () => {
|
|
@@ -50,6 +50,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
50
50
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
51
51
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
52
52
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
53
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
53
54
|
var NetworkPicker = require('../../components/NetworkPicker/NetworkPicker.cjs');
|
|
54
55
|
var UserAddress = require('../../components/UserAddress/UserAddress.cjs');
|
|
55
56
|
var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
|
|
@@ -46,6 +46,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
46
46
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
47
47
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
48
48
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
49
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
49
50
|
import { NetworkPicker } from '../../components/NetworkPicker/NetworkPicker.js';
|
|
50
51
|
import { UserAddress } from '../../components/UserAddress/UserAddress.js';
|
|
51
52
|
import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
|
|
@@ -50,9 +50,10 @@ require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
50
50
|
require('yup');
|
|
51
51
|
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
52
52
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
53
|
+
require('../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
53
54
|
|
|
54
55
|
const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
55
|
-
const { policiesConsentInnerComponent, onboardingOnlyJwt,
|
|
56
|
+
const { policiesConsentInnerComponent, onboardingOnlyJwt, internalSetShowAuthFlow, setCallback, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
56
57
|
const { setView, view } = ViewContext.useViewContext();
|
|
57
58
|
const decodedJwt = decodeJwt.decodeJwt(onboardingOnlyJwt);
|
|
58
59
|
const { updateUser } = useUserUpdateRequest.useUserUpdateRequestInternal({
|
|
@@ -71,9 +72,9 @@ const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
|
71
72
|
setView(view);
|
|
72
73
|
return;
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
+
internalSetShowAuthFlow(false);
|
|
75
76
|
setCallback('authSuccess');
|
|
76
|
-
}), [setCallback,
|
|
77
|
+
}), [setCallback, internalSetShowAuthFlow, setView, updateUser]);
|
|
77
78
|
const { fetch: loading, formikInitialValues, formikValidationSchema, enforcePolicies, onFormSubmit, } = useUserDataForm.useUserDataForm({
|
|
78
79
|
fields: (decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields) || [],
|
|
79
80
|
onSubmit,
|
|
@@ -46,9 +46,10 @@ import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
46
46
|
import 'yup';
|
|
47
47
|
import '../../../components/InlineWidget/InlineWidget.js';
|
|
48
48
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
49
|
+
import '../../../components/OverlayCard/OverlayCard.context.js';
|
|
49
50
|
|
|
50
51
|
const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
51
|
-
const { policiesConsentInnerComponent, onboardingOnlyJwt,
|
|
52
|
+
const { policiesConsentInnerComponent, onboardingOnlyJwt, internalSetShowAuthFlow, setCallback, } = useInternalDynamicContext();
|
|
52
53
|
const { setView, view } = useViewContext();
|
|
53
54
|
const decodedJwt = decodeJwt(onboardingOnlyJwt);
|
|
54
55
|
const { updateUser } = useUserUpdateRequestInternal({
|
|
@@ -67,9 +68,9 @@ const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
|
67
68
|
setView(view);
|
|
68
69
|
return;
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
+
internalSetShowAuthFlow(false);
|
|
71
72
|
setCallback('authSuccess');
|
|
72
|
-
}), [setCallback,
|
|
73
|
+
}), [setCallback, internalSetShowAuthFlow, setView, updateUser]);
|
|
73
74
|
const { fetch: loading, formikInitialValues, formikValidationSchema, enforcePolicies, onFormSubmit, } = useUserDataForm({
|
|
74
75
|
fields: (decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields) || [],
|
|
75
76
|
onSubmit,
|
|
@@ -52,6 +52,7 @@ require('../../../components/Popper/Popper/Popper.cjs');
|
|
|
52
52
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
53
53
|
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
54
54
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
55
|
+
require('../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
55
56
|
|
|
56
57
|
const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, touched, }) => (jsxRuntime.jsx("div", Object.assign({ className: 'user-data-fields__fields-column' }, { children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
|
|
57
58
|
const { label, type } = index.getValueByKey(fieldsConfig.fieldsConfig, name);
|
|
@@ -48,6 +48,7 @@ import '../../../components/Popper/Popper/Popper.js';
|
|
|
48
48
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
49
49
|
import '../../../components/InlineWidget/InlineWidget.js';
|
|
50
50
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
51
|
+
import '../../../components/OverlayCard/OverlayCard.context.js';
|
|
51
52
|
|
|
52
53
|
const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, touched, }) => (jsx("div", Object.assign({ className: 'user-data-fields__fields-column' }, { children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
|
|
53
54
|
const { label, type } = getValueByKey(fieldsConfig, name);
|
package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs
CHANGED
|
@@ -48,6 +48,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
48
48
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
49
49
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
50
50
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
51
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
51
52
|
var OnboardingUserDataForm = require('../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs');
|
|
52
53
|
|
|
53
54
|
const CollectUserDataViewLoginWithEmail = () => {
|
package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js
CHANGED
|
@@ -44,6 +44,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
44
44
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
45
45
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
46
46
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
47
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
47
48
|
import { OnboardingUserDataForm } from '../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js';
|
|
48
49
|
|
|
49
50
|
const CollectUserDataViewLoginWithEmail = () => {
|
|
@@ -51,6 +51,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
51
51
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
52
52
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
53
53
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
54
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
54
55
|
|
|
55
56
|
const EmailConfirmationWaitingView = () => {
|
|
56
57
|
const { setView } = ViewContext.useViewContext();
|