@dynamic-labs/sdk-react-core 0.19.0-alpha.6 → 0.19.0-alpha.8
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 +47 -0
- package/package.cjs +8 -6
- package/package.js +8 -6
- package/package.json +15 -13
- package/src/index.cjs +3 -0
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -0
- package/src/lib/Main.cjs +2 -0
- package/src/lib/Main.js +2 -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 +3 -2
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +3 -2
- 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/IconWithStatus/IconWithStatus.cjs +3 -3
- package/src/lib/components/IconWithStatus/IconWithStatus.d.ts +2 -2
- package/src/lib/components/IconWithStatus/IconWithStatus.js +3 -3
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -0
- package/src/lib/components/MockedQrCode/MockedQrCode.cjs +1 -1
- package/src/lib/components/MockedQrCode/MockedQrCode.js +1 -1
- 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/SendBalancePageLayout/SendBalancePageLayout.cjs +2 -2
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +2 -2
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +98 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.d.ts +12 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.js +94 -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/TransactionOriginDestination/TransactionOriginDestination.d.ts +1 -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 +4 -1
- package/src/lib/components/UserProfile/UserProfile.js +4 -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 +16 -13
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +16 -13
- 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 +42 -3
- package/src/lib/context/DynamicContext/helpers.d.ts +7 -1
- package/src/lib/context/DynamicContext/helpers.js +38 -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 +5 -1
- package/src/lib/context/ErrorContext/ErrorContext.js +5 -1
- 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 +8 -4
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +5 -5
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +8 -4
- 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 +49 -10
- package/src/lib/data/api.d.ts +1 -0
- package/src/lib/data/api.js +50 -12
- 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 +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +2 -1
- 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 +90 -0
- package/src/lib/locale/en/translation.js +77 -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/shared/types/index.d.ts +4 -0
- package/src/lib/shared/utils/functions/wallet/createWallet.cjs +1 -1
- package/src/lib/shared/utils/functions/wallet/createWallet.js +1 -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 +5 -1
- package/src/lib/utils/constants/localStorage.d.ts +2 -0
- package/src/lib/utils/constants/localStorage.js +4 -2
- package/src/lib/utils/functions/getActiveOauthCredential/getActiveOauthCredential.cjs +11 -0
- package/src/lib/utils/functions/getActiveOauthCredential/getActiveOauthCredential.d.ts +2 -0
- package/src/lib/utils/functions/getActiveOauthCredential/getActiveOauthCredential.js +7 -0
- package/src/lib/utils/functions/getActiveOauthCredential/index.d.ts +1 -0
- package/src/lib/utils/functions/getEnabledSocialSignInProvidersAsProviderEnum/getEnabledSocialSignInProvidersAsProviderEnum.d.ts +2 -0
- package/src/lib/utils/functions/getEnabledSocialSignInProvidersAsProviderEnum/index.d.ts +1 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.cjs +19 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.d.ts +2 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.js +15 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/index.d.ts +1 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.cjs +19 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.d.ts +2 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.js +15 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/index.d.ts +1 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/getSocialSignInProviderFromString.cjs +19 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/getSocialSignInProviderFromString.d.ts +2 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/getSocialSignInProviderFromString.js +15 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/index.d.ts +1 -0
- package/src/lib/utils/functions/index.d.ts +5 -0
- 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 +9 -4
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +1 -19
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +9 -4
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +4 -3
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +4 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +11 -15
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +12 -16
- 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/useFetchProjectSettings/useFetchProjectSettings.cjs +10 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +10 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +10 -164
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +2 -2
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +12 -166
- package/src/lib/utils/hooks/useSocialAuth/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +278 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.d.ts +20 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +274 -0
- 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 +13 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +13 -3
- 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 +6 -3
- package/src/lib/views/AccountExistsView/AccountExistsView.js +6 -3
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -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/LoginWidget.d.ts +10 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +77 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.d.ts +3 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +73 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +65 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.d.ts +3 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +61 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +49 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.d.ts +7 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +45 -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} +9 -3
- 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} +9 -3
- 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 +11 -8
- package/src/lib/views/LoginView/useLoginView.js +11 -8
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +2 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +2 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +2 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +2 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -0
- package/src/lib/views/NoAccess/NoAccess.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +3 -2
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +3 -2
- 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 +2 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -1
- package/src/lib/views/QrCodeView/QRCode.cjs +4 -3
- package/src/lib/views/QrCodeView/QRCode.d.ts +2 -2
- package/src/lib/views/QrCodeView/QRCode.js +4 -3
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +3 -2
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +2 -1
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +3 -2
- package/src/lib/views/QrCodeView/QrCodeView.cjs +3 -2
- package/src/lib/views/QrCodeView/QrCodeView.js +3 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +2 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +2 -1
- 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 +5 -6
- package/src/lib/views/SocialRedirectView/SocialRedirectView.d.ts +1 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +5 -6
- 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 +2 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +2 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +1 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.js +1 -1
- 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 +3 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +3 -2
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +2 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +2 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +3 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +3 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -1
- 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 +3 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +3 -2
- 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 +2 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +2 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -1
- 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 +19 -3
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +19 -3
- 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 +10 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +10 -1
- 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/WalletIconWithStatus/WalletIconWithStatus.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +2 -2
- 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 +4 -3
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +4 -3
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -1
- 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 +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +7 -5
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +7 -5
- 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/LoginWidget.d.ts +0 -5
- 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/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
|
@@ -38,6 +38,7 @@ require('formik');
|
|
|
38
38
|
require('yup');
|
|
39
39
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
40
40
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
41
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
41
42
|
require('../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
42
43
|
require('../MockContext/MockContext.cjs');
|
|
43
44
|
var ErrorContext = require('../ErrorContext/ErrorContext.cjs');
|
|
@@ -49,7 +50,7 @@ require('../UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
|
49
50
|
|
|
50
51
|
const SocialRedirectContext = React.createContext(undefined);
|
|
51
52
|
const SocialRedirectContextProvider = ({ children, }) => {
|
|
52
|
-
var _a, _b;
|
|
53
|
+
var _a, _b, _c, _d;
|
|
53
54
|
const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, setShowDynamicUserProfile, isAuthenticated, setPrimaryWalletId, secondaryWallets, sdkHasLoaded, authToken, connectWallet, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
54
55
|
const { setErrorMessage } = ErrorContext.useErrorContext();
|
|
55
56
|
const { setView } = ViewContext.useViewContext();
|
|
@@ -60,10 +61,11 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
60
61
|
projectSettings,
|
|
61
62
|
setIsSingleWalletAccount,
|
|
62
63
|
});
|
|
63
|
-
const
|
|
64
|
-
const
|
|
64
|
+
const signInProvider = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.socialSignIn) === null || _a === void 0 ? void 0 : _a.signInProvider;
|
|
65
|
+
const enabledSocialProvidersInDb = (_c = (_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.socialSignIn) === null || _b === void 0 ? void 0 : _b.providers) !== null && _c !== void 0 ? _c : [];
|
|
66
|
+
const enabledSocialProviders = (_d = enabledSocialProvidersInDb
|
|
65
67
|
.filter((provider) => provider.enabled)
|
|
66
|
-
.map((provider) => provider.provider);
|
|
68
|
+
.map((provider) => provider.provider)) !== null && _d !== void 0 ? _d : [];
|
|
67
69
|
const socialWalletConnector = wallets
|
|
68
70
|
.map(({ walletConnector }) => walletConnector)
|
|
69
71
|
.find(walletConnectorCore.isSocialWalletConnector);
|
|
@@ -186,11 +188,13 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
186
188
|
walletUiUtils,
|
|
187
189
|
wallet,
|
|
188
190
|
handleError,
|
|
191
|
+
connectWallet,
|
|
189
192
|
]);
|
|
190
193
|
return (jsxRuntime.jsx(SocialRedirectContext.Provider, Object.assign({ value: {
|
|
191
194
|
enabledSocialProviders,
|
|
192
195
|
redirectStatus,
|
|
193
196
|
setSocialProvider,
|
|
197
|
+
signInProvider,
|
|
194
198
|
socialAccount,
|
|
195
199
|
socialProvider,
|
|
196
200
|
socialWalletConnector,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { JwtVerifiedCredential } from '@dynamic-labs/sdk-api';
|
|
2
|
+
import { JwtVerifiedCredential, SignInProviderEnum, SocialSignInProviderEnum } from '@dynamic-labs/sdk-api';
|
|
4
3
|
import { WalletConnector } from '../../..';
|
|
5
4
|
type SocialRedirectStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
6
5
|
export type SocialContextReturnType = {
|
|
7
|
-
enabledSocialProviders:
|
|
6
|
+
enabledSocialProviders: SocialSignInProviderEnum[];
|
|
8
7
|
redirectStatus: SocialRedirectStatus;
|
|
9
|
-
setSocialProvider: (val
|
|
8
|
+
setSocialProvider: (val?: SocialSignInProviderEnum) => void;
|
|
10
9
|
socialAccount: JwtVerifiedCredential | undefined;
|
|
11
|
-
socialProvider:
|
|
10
|
+
socialProvider: SocialSignInProviderEnum | undefined;
|
|
12
11
|
socialWalletConnector: WalletConnector | undefined;
|
|
12
|
+
signInProvider: SignInProviderEnum | undefined;
|
|
13
13
|
};
|
|
14
14
|
export declare const SocialRedirectContext: import("react").Context<SocialContextReturnType | undefined>;
|
|
15
15
|
export declare const SocialRedirectContextProvider: ({ children, }: {
|
|
@@ -34,6 +34,7 @@ import 'formik';
|
|
|
34
34
|
import 'yup';
|
|
35
35
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
36
36
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
37
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
37
38
|
import '../../views/CollectUserDataView/fieldsConfig.js';
|
|
38
39
|
import '../MockContext/MockContext.js';
|
|
39
40
|
import { useErrorContext } from '../ErrorContext/ErrorContext.js';
|
|
@@ -45,7 +46,7 @@ import '../UserFieldEditorContext/UserFieldEditorContext.js';
|
|
|
45
46
|
|
|
46
47
|
const SocialRedirectContext = createContext(undefined);
|
|
47
48
|
const SocialRedirectContextProvider = ({ children, }) => {
|
|
48
|
-
var _a, _b;
|
|
49
|
+
var _a, _b, _c, _d;
|
|
49
50
|
const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, setShowDynamicUserProfile, isAuthenticated, setPrimaryWalletId, secondaryWallets, sdkHasLoaded, authToken, connectWallet, } = useInternalDynamicContext();
|
|
50
51
|
const { setErrorMessage } = useErrorContext();
|
|
51
52
|
const { setView } = useViewContext();
|
|
@@ -56,10 +57,11 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
56
57
|
projectSettings,
|
|
57
58
|
setIsSingleWalletAccount,
|
|
58
59
|
});
|
|
59
|
-
const
|
|
60
|
-
const
|
|
60
|
+
const signInProvider = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.socialSignIn) === null || _a === void 0 ? void 0 : _a.signInProvider;
|
|
61
|
+
const enabledSocialProvidersInDb = (_c = (_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.socialSignIn) === null || _b === void 0 ? void 0 : _b.providers) !== null && _c !== void 0 ? _c : [];
|
|
62
|
+
const enabledSocialProviders = (_d = enabledSocialProvidersInDb
|
|
61
63
|
.filter((provider) => provider.enabled)
|
|
62
|
-
.map((provider) => provider.provider);
|
|
64
|
+
.map((provider) => provider.provider)) !== null && _d !== void 0 ? _d : [];
|
|
63
65
|
const socialWalletConnector = wallets
|
|
64
66
|
.map(({ walletConnector }) => walletConnector)
|
|
65
67
|
.find(isSocialWalletConnector);
|
|
@@ -182,11 +184,13 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
182
184
|
walletUiUtils,
|
|
183
185
|
wallet,
|
|
184
186
|
handleError,
|
|
187
|
+
connectWallet,
|
|
185
188
|
]);
|
|
186
189
|
return (jsx(SocialRedirectContext.Provider, Object.assign({ value: {
|
|
187
190
|
enabledSocialProviders,
|
|
188
191
|
redirectStatus,
|
|
189
192
|
setSocialProvider,
|
|
193
|
+
signInProvider,
|
|
190
194
|
socialAccount,
|
|
191
195
|
socialProvider,
|
|
192
196
|
socialWalletConnector,
|
|
@@ -41,6 +41,7 @@ require('formik');
|
|
|
41
41
|
require('yup');
|
|
42
42
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
43
43
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
44
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
44
45
|
require('../MockContext/MockContext.cjs');
|
|
45
46
|
require('../CaptchaContext/CaptchaContext.cjs');
|
|
46
47
|
require('../EmailVerificationContext/EmailVerificationContext.cjs');
|
|
@@ -37,6 +37,7 @@ import 'formik';
|
|
|
37
37
|
import 'yup';
|
|
38
38
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
39
39
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
40
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
40
41
|
import '../MockContext/MockContext.js';
|
|
41
42
|
import '../CaptchaContext/CaptchaContext.js';
|
|
42
43
|
import '../EmailVerificationContext/EmailVerificationContext.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SetStateAction, Dispatch, PropsWithChildren, FC } from 'react';
|
|
2
|
-
export type ViewType = 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-with-email' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-wallet-only' | 'login-with-email-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'update-email' | 'verify-email' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'wallet-sign' | 'wallet-used' | 'wallet-group' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'wallet-locked-view' | 'social-wrong-account' | 'gate-blocked-wallet' | 'bridge-welcome' | 'bridge-summary' | 'bridge-next-wallet-connection' | 'account-exists' | 'merge-user-accounts' | 'wallet-cannot-be-transferred';
|
|
2
|
+
export type ViewType = 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-with-email' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-wallet-only' | 'login-with-email-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'update-email' | 'verify-email' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'multi-wallet-wallet-list' | 'wallet-sign' | 'wallet-used' | 'wallet-group' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'wallet-locked-view' | 'social-wrong-account' | 'gate-blocked-wallet' | 'bridge-welcome' | 'bridge-summary' | 'bridge-next-wallet-connection' | 'account-exists' | 'merge-user-accounts' | 'wallet-cannot-be-transferred';
|
|
3
3
|
export type ViewContextProps = {
|
|
4
4
|
setView: Dispatch<SetStateAction<ViewType>>;
|
|
5
5
|
view: ViewType;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
|
|
7
|
+
require('../DynamicContext/DynamicContext.cjs');
|
|
8
8
|
require('@dynamic-labs/sdk-api');
|
|
9
9
|
require('../../shared/logger.cjs');
|
|
10
10
|
require('@dynamic-labs/iconic');
|
|
@@ -27,21 +27,7 @@ var useSyncPrimaryWallet = require('../../utils/hooks/multiWallet/useSyncPrimary
|
|
|
27
27
|
|
|
28
28
|
const WalletContext = React.createContext(undefined);
|
|
29
29
|
const WalletContextProvider = ({ children, canSync, }) => {
|
|
30
|
-
|
|
31
|
-
useSyncPrimaryWallet.useSyncPrimaryWallet({
|
|
32
|
-
authMode,
|
|
33
|
-
canSync,
|
|
34
|
-
computeConnectedStateForWallets,
|
|
35
|
-
connectWallet,
|
|
36
|
-
handleLogOut,
|
|
37
|
-
multiWalletWidgetState,
|
|
38
|
-
primaryWallet,
|
|
39
|
-
secondaryWallets,
|
|
40
|
-
setMultiWalletWidgetState,
|
|
41
|
-
setPrimaryWallet,
|
|
42
|
-
setShowWidgetStatePopup,
|
|
43
|
-
showWidgetStatePopup,
|
|
44
|
-
});
|
|
30
|
+
useSyncPrimaryWallet.useSyncPrimaryWallet(canSync);
|
|
45
31
|
const value = undefined;
|
|
46
32
|
return (jsxRuntime.jsx(WalletContext.Provider, Object.assign({ value: value }, { children: children })));
|
|
47
33
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { createContext } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import '../DynamicContext/DynamicContext.js';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import '../../shared/logger.js';
|
|
6
6
|
import '@dynamic-labs/iconic';
|
|
@@ -23,21 +23,7 @@ import { useSyncPrimaryWallet } from '../../utils/hooks/multiWallet/useSyncPrima
|
|
|
23
23
|
|
|
24
24
|
const WalletContext = createContext(undefined);
|
|
25
25
|
const WalletContextProvider = ({ children, canSync, }) => {
|
|
26
|
-
|
|
27
|
-
useSyncPrimaryWallet({
|
|
28
|
-
authMode,
|
|
29
|
-
canSync,
|
|
30
|
-
computeConnectedStateForWallets,
|
|
31
|
-
connectWallet,
|
|
32
|
-
handleLogOut,
|
|
33
|
-
multiWalletWidgetState,
|
|
34
|
-
primaryWallet,
|
|
35
|
-
secondaryWallets,
|
|
36
|
-
setMultiWalletWidgetState,
|
|
37
|
-
setPrimaryWallet,
|
|
38
|
-
setShowWidgetStatePopup,
|
|
39
|
-
showWidgetStatePopup,
|
|
40
|
-
});
|
|
26
|
+
useSyncPrimaryWallet(canSync);
|
|
41
27
|
const value = undefined;
|
|
42
28
|
return (jsx(WalletContext.Provider, Object.assign({ value: value }, { children: children })));
|
|
43
29
|
};
|
package/src/lib/data/api.cjs
CHANGED
|
@@ -18,6 +18,7 @@ require('../utils/constants/colors.cjs');
|
|
|
18
18
|
require('../shared/utils/classes/storage/localStorage.cjs');
|
|
19
19
|
require('ethers');
|
|
20
20
|
require('../shared/consts/index.cjs');
|
|
21
|
+
var helpers = require('../context/DynamicContext/helpers.cjs');
|
|
21
22
|
|
|
22
23
|
const sdkApi = (jwt) => {
|
|
23
24
|
const settings = {
|
|
@@ -368,6 +369,10 @@ const verifyOAuth = (environmentId, providerType, { code, codeVerifier, state },
|
|
|
368
369
|
}
|
|
369
370
|
catch (e) {
|
|
370
371
|
logger.logger.error(e);
|
|
372
|
+
const data = yield e.json();
|
|
373
|
+
if (data.code === 'social_account_already_exists') {
|
|
374
|
+
throw new utils.SocialAccountAlreadyExistsError();
|
|
375
|
+
}
|
|
371
376
|
return undefined;
|
|
372
377
|
}
|
|
373
378
|
});
|
|
@@ -385,6 +390,34 @@ const unlinkOAuth = ({ environmentId, verifiedCrentialId, }, userJwt) => _tslib.
|
|
|
385
390
|
return undefined;
|
|
386
391
|
}
|
|
387
392
|
});
|
|
393
|
+
const signInOAuth = (environmentId, providerType, { code, codeVerifier, state }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
394
|
+
const oauthRequest = {
|
|
395
|
+
code,
|
|
396
|
+
codeVerifier,
|
|
397
|
+
state,
|
|
398
|
+
};
|
|
399
|
+
try {
|
|
400
|
+
const { jwt } = yield sdkApi().oauthSignIn({
|
|
401
|
+
environmentId,
|
|
402
|
+
oauthRequest,
|
|
403
|
+
providerType,
|
|
404
|
+
});
|
|
405
|
+
return jwt;
|
|
406
|
+
}
|
|
407
|
+
catch (e) {
|
|
408
|
+
logger.logger.error(e);
|
|
409
|
+
const data = yield e.json();
|
|
410
|
+
if (data.error.code === 'gate_blocked') {
|
|
411
|
+
throw new utils.GateBlockedError(data.payload.walletPublicKey);
|
|
412
|
+
}
|
|
413
|
+
if (data.error.code === 'missing_from_list') {
|
|
414
|
+
throw new utils.NoAccessError({
|
|
415
|
+
walletPublicKey: data.payload.walletPublicKey,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
return undefined;
|
|
419
|
+
}
|
|
420
|
+
});
|
|
388
421
|
const getOnrampProviders = ({ chain, environmentId, networkId, token, walletAddress, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
389
422
|
const { onramps } = yield sdkApi().getSupportedOnramps({
|
|
390
423
|
chain,
|
|
@@ -401,19 +434,24 @@ const getOnrampProviders = ({ chain, environmentId, networkId, token, walletAddr
|
|
|
401
434
|
const sendDynamicProps = (environmentId, settingsToSend) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
402
435
|
try {
|
|
403
436
|
const { dynamicContextProps, dynamicWagmiSettings } = settingsToSend;
|
|
404
|
-
if (dynamicContextProps
|
|
405
|
-
yield
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
dynamicWagmiSettings,
|
|
410
|
-
},
|
|
411
|
-
});
|
|
437
|
+
if (dynamicContextProps) {
|
|
438
|
+
yield sendDynamicContextSettings(environmentId, { dynamicContextProps }, helpers.isDynamicContextSessionSettingExpired, helpers.setDynamicContextSessionSettings);
|
|
439
|
+
}
|
|
440
|
+
if (dynamicWagmiSettings) {
|
|
441
|
+
yield sendDynamicContextSettings(environmentId, { dynamicWagmiSettings }, helpers.isWagmiSessionSettingExpired, helpers.setWagmiSessionSettings);
|
|
412
442
|
}
|
|
413
443
|
}
|
|
414
|
-
catch (
|
|
415
|
-
logger.logger.error
|
|
444
|
+
catch (error) {
|
|
445
|
+
logger.logger.warn('Error caught when sending sdkSettings to api. Please notify Dynamic, and send the DynamicContextProvider settings you currently have configured', { error });
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
const sendDynamicContextSettings = (environmentId, sdkSettingsRequest, isSdkSettingExpired, setSDKSessionSettings) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
449
|
+
// sent once. no need to send again
|
|
450
|
+
if (!isSdkSettingExpired()) {
|
|
451
|
+
return;
|
|
416
452
|
}
|
|
453
|
+
yield sdkApi().logDynamicSdkSettings({ environmentId, sdkSettingsRequest });
|
|
454
|
+
setSDKSessionSettings();
|
|
417
455
|
});
|
|
418
456
|
const mergeUserAccounts = (userJwt, environmentId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
419
457
|
try {
|
|
@@ -444,6 +482,7 @@ exports.mergeUserAccounts = mergeUserAccounts;
|
|
|
444
482
|
exports.retryEmailVerification = retryEmailVerification;
|
|
445
483
|
exports.revokeSession = revokeSession;
|
|
446
484
|
exports.sendDynamicProps = sendDynamicProps;
|
|
485
|
+
exports.signInOAuth = signInOAuth;
|
|
447
486
|
exports.signInWithEmailVerification = signInWithEmailVerification;
|
|
448
487
|
exports.transferWallet = transferWallet;
|
|
449
488
|
exports.unlinkOAuth = unlinkOAuth;
|
package/src/lib/data/api.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export declare const unlinkOAuth: ({ environmentId, verifiedCrentialId, }: {
|
|
|
56
56
|
environmentId: string;
|
|
57
57
|
verifiedCrentialId: string;
|
|
58
58
|
}, userJwt: string) => Promise<string | undefined>;
|
|
59
|
+
export declare const signInOAuth: (environmentId: string, providerType: ProviderEnum, { code, codeVerifier, state }: OauthRequest) => Promise<string | undefined>;
|
|
59
60
|
export declare const getOnrampProviders: ({ chain, environmentId, networkId, token, walletAddress, }: {
|
|
60
61
|
chain: string;
|
|
61
62
|
environmentId: string;
|
package/src/lib/data/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
2
|
-
import { NoAccessError, AccountExistsError, EmailVerificationError, UserHasAccountWithEmailError, DynamicError, EmailAlreadyExistsError, UsernameAlreadyExistsError, EmailProviderError, WalletUsedError, WalletNotDeployedError, ChainalysisError, GateBlockedError } from '@dynamic-labs/utils';
|
|
2
|
+
import { NoAccessError, AccountExistsError, EmailVerificationError, UserHasAccountWithEmailError, DynamicError, EmailAlreadyExistsError, UsernameAlreadyExistsError, EmailProviderError, WalletUsedError, WalletNotDeployedError, ChainalysisError, GateBlockedError, SocialAccountAlreadyExistsError } from '@dynamic-labs/utils';
|
|
3
3
|
import { UnprocessableEntityErrorCode, SDKApi, Configuration, VerifyRequestFromJSON, ChainEnum, WalletProviderEnum, AuthModeEnum } from '@dynamic-labs/sdk-api';
|
|
4
4
|
import { VERSION, API_VERSION } from '../../version.js';
|
|
5
5
|
import ApiEndpoint from '../config/ApiEndpoint.js';
|
|
@@ -14,6 +14,7 @@ import '../utils/constants/colors.js';
|
|
|
14
14
|
import '../shared/utils/classes/storage/localStorage.js';
|
|
15
15
|
import 'ethers';
|
|
16
16
|
import '../shared/consts/index.js';
|
|
17
|
+
import { isDynamicContextSessionSettingExpired, setDynamicContextSessionSettings, isWagmiSessionSettingExpired, setWagmiSessionSettings } from '../context/DynamicContext/helpers.js';
|
|
17
18
|
|
|
18
19
|
const sdkApi = (jwt) => {
|
|
19
20
|
const settings = {
|
|
@@ -364,6 +365,10 @@ const verifyOAuth = (environmentId, providerType, { code, codeVerifier, state },
|
|
|
364
365
|
}
|
|
365
366
|
catch (e) {
|
|
366
367
|
logger.error(e);
|
|
368
|
+
const data = yield e.json();
|
|
369
|
+
if (data.code === 'social_account_already_exists') {
|
|
370
|
+
throw new SocialAccountAlreadyExistsError();
|
|
371
|
+
}
|
|
367
372
|
return undefined;
|
|
368
373
|
}
|
|
369
374
|
});
|
|
@@ -381,6 +386,34 @@ const unlinkOAuth = ({ environmentId, verifiedCrentialId, }, userJwt) => __await
|
|
|
381
386
|
return undefined;
|
|
382
387
|
}
|
|
383
388
|
});
|
|
389
|
+
const signInOAuth = (environmentId, providerType, { code, codeVerifier, state }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
390
|
+
const oauthRequest = {
|
|
391
|
+
code,
|
|
392
|
+
codeVerifier,
|
|
393
|
+
state,
|
|
394
|
+
};
|
|
395
|
+
try {
|
|
396
|
+
const { jwt } = yield sdkApi().oauthSignIn({
|
|
397
|
+
environmentId,
|
|
398
|
+
oauthRequest,
|
|
399
|
+
providerType,
|
|
400
|
+
});
|
|
401
|
+
return jwt;
|
|
402
|
+
}
|
|
403
|
+
catch (e) {
|
|
404
|
+
logger.error(e);
|
|
405
|
+
const data = yield e.json();
|
|
406
|
+
if (data.error.code === 'gate_blocked') {
|
|
407
|
+
throw new GateBlockedError(data.payload.walletPublicKey);
|
|
408
|
+
}
|
|
409
|
+
if (data.error.code === 'missing_from_list') {
|
|
410
|
+
throw new NoAccessError({
|
|
411
|
+
walletPublicKey: data.payload.walletPublicKey,
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
return undefined;
|
|
415
|
+
}
|
|
416
|
+
});
|
|
384
417
|
const getOnrampProviders = ({ chain, environmentId, networkId, token, walletAddress, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
385
418
|
const { onramps } = yield sdkApi().getSupportedOnramps({
|
|
386
419
|
chain,
|
|
@@ -397,19 +430,24 @@ const getOnrampProviders = ({ chain, environmentId, networkId, token, walletAddr
|
|
|
397
430
|
const sendDynamicProps = (environmentId, settingsToSend) => __awaiter(void 0, void 0, void 0, function* () {
|
|
398
431
|
try {
|
|
399
432
|
const { dynamicContextProps, dynamicWagmiSettings } = settingsToSend;
|
|
400
|
-
if (dynamicContextProps
|
|
401
|
-
yield
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
dynamicWagmiSettings,
|
|
406
|
-
},
|
|
407
|
-
});
|
|
433
|
+
if (dynamicContextProps) {
|
|
434
|
+
yield sendDynamicContextSettings(environmentId, { dynamicContextProps }, isDynamicContextSessionSettingExpired, setDynamicContextSessionSettings);
|
|
435
|
+
}
|
|
436
|
+
if (dynamicWagmiSettings) {
|
|
437
|
+
yield sendDynamicContextSettings(environmentId, { dynamicWagmiSettings }, isWagmiSessionSettingExpired, setWagmiSessionSettings);
|
|
408
438
|
}
|
|
409
439
|
}
|
|
410
|
-
catch (
|
|
411
|
-
logger.error
|
|
440
|
+
catch (error) {
|
|
441
|
+
logger.warn('Error caught when sending sdkSettings to api. Please notify Dynamic, and send the DynamicContextProvider settings you currently have configured', { error });
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
const sendDynamicContextSettings = (environmentId, sdkSettingsRequest, isSdkSettingExpired, setSDKSessionSettings) => __awaiter(void 0, void 0, void 0, function* () {
|
|
445
|
+
// sent once. no need to send again
|
|
446
|
+
if (!isSdkSettingExpired()) {
|
|
447
|
+
return;
|
|
412
448
|
}
|
|
449
|
+
yield sdkApi().logDynamicSdkSettings({ environmentId, sdkSettingsRequest });
|
|
450
|
+
setSDKSessionSettings();
|
|
413
451
|
});
|
|
414
452
|
const mergeUserAccounts = (userJwt, environmentId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
415
453
|
try {
|
|
@@ -424,4 +462,4 @@ const mergeUserAccounts = (userJwt, environmentId) => __awaiter(void 0, void 0,
|
|
|
424
462
|
}
|
|
425
463
|
});
|
|
426
464
|
|
|
427
|
-
export { createEmailVerification, createVisit, fetchNetworkSettings, fetchNonce, fetchProjectSettings, getEmailProvider, getOauthLoginUrl, getOnrampProviders, linkWallet, mapAuthModeTypeToEnum, mapChainToChainEnum, mapProviderToProviderEnum, mergeUserAccounts, retryEmailVerification, revokeSession, sendDynamicProps, signInWithEmailVerification, transferWallet, unlinkOAuth, unlinkWallet, updateUserProfileFields, verifyEmail, verifyOAuth, verifyWallet };
|
|
465
|
+
export { createEmailVerification, createVisit, fetchNetworkSettings, fetchNonce, fetchProjectSettings, getEmailProvider, getOauthLoginUrl, getOnrampProviders, linkWallet, mapAuthModeTypeToEnum, mapChainToChainEnum, mapProviderToProviderEnum, mergeUserAccounts, retryEmailVerification, revokeSession, sendDynamicProps, signInOAuth, signInWithEmailVerification, transferWallet, unlinkOAuth, unlinkWallet, updateUserProfileFields, verifyEmail, verifyOAuth, verifyWallet };
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var index = require('../../context/FooterAnimationContext/index.cjs');
|
|
7
7
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
8
|
-
var
|
|
8
|
+
var useDynamicLayoutData = require('../../utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs');
|
|
9
9
|
require('react');
|
|
10
10
|
require('@dynamic-labs/sdk-api');
|
|
11
11
|
require('../../shared/logger.cjs');
|
|
@@ -62,7 +62,7 @@ var WalletProgressStepper = require('./WalletProgressStepper/WalletProgressStepp
|
|
|
62
62
|
|
|
63
63
|
const DynamicAuthLayout = ({ children, onClose, transitionProps, projectSettings, walletConnector, }) => {
|
|
64
64
|
const { view } = ViewContext.useViewContext();
|
|
65
|
-
const { headerData, helpHeaderData } =
|
|
65
|
+
const { headerData, helpHeaderData } = useDynamicLayoutData.useDynamicLayoutData({
|
|
66
66
|
view,
|
|
67
67
|
});
|
|
68
68
|
const { isFooterExpanded } = index.useFooterAnimationContext();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useFooterAnimationContext } from '../../context/FooterAnimationContext/index.js';
|
|
3
3
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
4
|
-
import {
|
|
4
|
+
import { useDynamicLayoutData } from '../../utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@dynamic-labs/sdk-api';
|
|
7
7
|
import '../../shared/logger.js';
|
|
@@ -58,7 +58,7 @@ import { WalletProgressStepper } from './WalletProgressStepper/WalletProgressSte
|
|
|
58
58
|
|
|
59
59
|
const DynamicAuthLayout = ({ children, onClose, transitionProps, projectSettings, walletConnector, }) => {
|
|
60
60
|
const { view } = useViewContext();
|
|
61
|
-
const { headerData, helpHeaderData } =
|
|
61
|
+
const { headerData, helpHeaderData } = useDynamicLayoutData({
|
|
62
62
|
view,
|
|
63
63
|
});
|
|
64
64
|
const { isFooterExpanded } = useFooterAnimationContext();
|
|
@@ -53,6 +53,7 @@ require('../../../components/Popper/Popper/Popper.cjs');
|
|
|
53
53
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
54
54
|
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
55
55
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
56
|
+
require('../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
56
57
|
var QrCodeContext = require('../../../context/QrCodeContext/QrCodeContext.cjs');
|
|
57
58
|
var useAuthLayoutChecks = require('../../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs');
|
|
58
59
|
var index = require('../../../context/FooterAnimationContext/index.cjs');
|
|
@@ -49,6 +49,7 @@ import '../../../components/Popper/Popper/Popper.js';
|
|
|
49
49
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
50
50
|
import '../../../components/InlineWidget/InlineWidget.js';
|
|
51
51
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
52
|
+
import '../../../components/OverlayCard/OverlayCard.context.js';
|
|
52
53
|
import { useQrCodeContext } from '../../../context/QrCodeContext/QrCodeContext.js';
|
|
53
54
|
import { useAuthLayoutChecks } from '../../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js';
|
|
54
55
|
import { useFooterAnimationContext } from '../../../context/FooterAnimationContext/index.js';
|
|
@@ -48,13 +48,14 @@ 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 index = require('../../../../context/FooterAnimationContext/index.cjs');
|
|
52
|
-
var
|
|
53
|
+
var useDynamicLayoutData = require('../../../../utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs');
|
|
53
54
|
|
|
54
55
|
const HelpHeader = () => {
|
|
55
56
|
const { setIsFooterExpanded } = index.useFooterAnimationContext();
|
|
56
57
|
const { view } = ViewContext.useViewContext();
|
|
57
|
-
const { helpHeaderData } =
|
|
58
|
+
const { helpHeaderData } = useDynamicLayoutData.useDynamicLayoutData({ view });
|
|
58
59
|
const backButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: () => setIsFooterExpanded(false), "data-testid": 'back-button', className: 'header__icon' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'back-button ' }) })));
|
|
59
60
|
return (jsxRuntime.jsx("div", Object.assign({ className: 'help-header' }, { children: jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: backButton }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-help-heading', className: 'header__typography' }, { children: helpHeaderData === null || helpHeaderData === void 0 ? void 0 : helpHeaderData.heading })) })) })));
|
|
60
61
|
};
|
|
@@ -44,13 +44,14 @@ 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 { useFooterAnimationContext } from '../../../../context/FooterAnimationContext/index.js';
|
|
48
|
-
import {
|
|
49
|
+
import { useDynamicLayoutData } from '../../../../utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js';
|
|
49
50
|
|
|
50
51
|
const HelpHeader = () => {
|
|
51
52
|
const { setIsFooterExpanded } = useFooterAnimationContext();
|
|
52
53
|
const { view } = useViewContext();
|
|
53
|
-
const { helpHeaderData } =
|
|
54
|
+
const { helpHeaderData } = useDynamicLayoutData({ view });
|
|
54
55
|
const backButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: () => setIsFooterExpanded(false), "data-testid": 'back-button', className: 'header__icon' }, { children: jsx(SvgChevronLeft, { className: 'back-button ' }) })));
|
|
55
56
|
return (jsx("div", Object.assign({ className: 'help-header' }, { children: jsx(ModalHeader, Object.assign({ trailing: backButton }, { children: jsx(Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-help-heading', className: 'header__typography' }, { children: helpHeaderData === null || helpHeaderData === void 0 ? void 0 : helpHeaderData.heading })) })) })));
|
|
56
57
|
};
|
|
@@ -46,6 +46,7 @@ require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
|
46
46
|
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
47
47
|
require('../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
48
48
|
require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
49
|
+
require('../../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
49
50
|
|
|
50
51
|
const Item = ({ heading, StartIcon, EndIcon, message, url, }) => (jsxRuntime.jsxs("a", Object.assign({ className: 'footer-buttons-item', href: url, rel: 'noopener noreferrer', target: '_blank' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'footer-buttons-item__icon--left' }, { children: jsxRuntime.jsx(StartIcon, {}) })), jsxRuntime.jsxs("div", Object.assign({ className: 'footer-buttons-item__typography' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h2', weight: 'regular', color: 'primary', variant: 'body_normal' }, { children: heading })), message && (jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'p', weight: 'regular', color: 'secondary' }, { children: message })))] })), EndIcon && jsxRuntime.jsx(EndIcon, { style: { height: '1.5rem', width: '1.5rem' } })] })));
|
|
51
52
|
|
|
@@ -42,6 +42,7 @@ import '../../../../../components/Popper/Popper/Popper.js';
|
|
|
42
42
|
import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
43
43
|
import '../../../../../components/InlineWidget/InlineWidget.js';
|
|
44
44
|
import '../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
45
|
+
import '../../../../../components/OverlayCard/OverlayCard.context.js';
|
|
45
46
|
|
|
46
47
|
const Item = ({ heading, StartIcon, EndIcon, message, url, }) => (jsxs("a", Object.assign({ className: 'footer-buttons-item', href: url, rel: 'noopener noreferrer', target: '_blank' }, { children: [jsx("div", Object.assign({ className: 'footer-buttons-item__icon--left' }, { children: jsx(StartIcon, {}) })), jsxs("div", Object.assign({ className: 'footer-buttons-item__typography' }, { children: [jsx(Typography, Object.assign({ as: 'h2', weight: 'regular', color: 'primary', variant: 'body_normal' }, { children: heading })), message && (jsx(Typography, Object.assign({ as: 'p', weight: 'regular', color: 'secondary' }, { children: message })))] })), EndIcon && jsx(EndIcon, { style: { height: '1.5rem', width: '1.5rem' } })] })));
|
|
47
48
|
|
|
@@ -47,6 +47,7 @@ require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
|
47
47
|
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
48
48
|
require('../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
49
49
|
require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
50
|
+
require('../../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
50
51
|
var NewToWeb3WalletItem = require('../NewToWeb3WalletItem/NewToWeb3WalletItem.cjs');
|
|
51
52
|
|
|
52
53
|
const WalletExtensionOrAppContinueButton = ({ wallet, selectedUrl, }) => {
|
|
@@ -43,6 +43,7 @@ import '../../../../../components/Popper/Popper/Popper.js';
|
|
|
43
43
|
import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
44
44
|
import '../../../../../components/InlineWidget/InlineWidget.js';
|
|
45
45
|
import '../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
46
|
+
import '../../../../../components/OverlayCard/OverlayCard.context.js';
|
|
46
47
|
import { NewToWeb3WalletItem } from '../NewToWeb3WalletItem/NewToWeb3WalletItem.js';
|
|
47
48
|
|
|
48
49
|
const WalletExtensionOrAppContinueButton = ({ wallet, selectedUrl, }) => {
|
package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs
CHANGED
|
@@ -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
|
var NewToWeb3WalletItem = require('./NewToWeb3WalletItem/NewToWeb3WalletItem.cjs');
|
|
56
57
|
var Item = require('./Item/Item.cjs');
|
|
57
58
|
var WalletExtensionOrAppContinueButton = require('./WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs');
|
|
@@ -90,7 +91,7 @@ const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
|
|
|
90
91
|
if (!Object.keys((_b = walletBook$1 === null || walletBook$1 === void 0 ? void 0 : walletBook$1.wallets) !== null && _b !== void 0 ? _b : {}).length) {
|
|
91
92
|
return jsxRuntime.jsx(Skeleton.Skeleton, { className: 'walletlist-footer-content__container' });
|
|
92
93
|
}
|
|
93
|
-
return (jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__container' }, { children: jsxRuntime.jsxs(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__icon' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, {
|
|
94
|
+
return (jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__container' }, { children: jsxRuntime.jsxs(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__icon' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletName, style: { height: pixelToRem.pixelToRem(56), width: pixelToRem.pixelToRem(56) } }) })), jsxRuntime.jsxs("div", Object.assign({ className: 'walletlist-help-content__typography-wrapper' }, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ as: 'p', variant: 'title', weight: 'medium' }, { children: ["We recommend installing", ' ', walletBook.getWalletBookWallet(walletBook$1, walletName).name] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label' }, { children: "Select your preferred option below:" }))] })), jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__buttons-wrapper' }, { children: walletLinksElements.map((element, i) => element.isEnabled ? (jsxRuntime.jsx("button", Object.assign({ onClick: () => setSelectedUrl(element.url) }, { children: jsxRuntime.jsx(Item.Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }), i)) : undefined) })), isCustodialServiceWallet && (jsxRuntime.jsxs("div", Object.assign({ className: 'walletlist-help-content__custodial-wallet-area' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular' }, { children: "If you don't want to install a wallet, then use:" })), jsxRuntime.jsx(NewToWeb3WalletItem.NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] }))), jsxRuntime.jsx(WalletExtensionOrAppContinueButton.WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] })) })));
|
|
94
95
|
};
|
|
95
96
|
|
|
96
97
|
exports.WalletListHelpContent = WalletListHelpContent;
|
package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js
CHANGED
|
@@ -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
|
import { NewToWeb3WalletItem } from './NewToWeb3WalletItem/NewToWeb3WalletItem.js';
|
|
52
53
|
import { Item } from './Item/Item.js';
|
|
53
54
|
import { WalletExtensionOrAppContinueButton } from './WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js';
|
|
@@ -86,7 +87,7 @@ const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
|
|
|
86
87
|
if (!Object.keys((_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _b !== void 0 ? _b : {}).length) {
|
|
87
88
|
return jsx(Skeleton, { className: 'walletlist-footer-content__container' });
|
|
88
89
|
}
|
|
89
|
-
return (jsx("div", Object.assign({ className: 'walletlist-help-content__container' }, { children: jsxs(EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsx("div", Object.assign({ className: 'walletlist-help-content__icon' }, { children: jsx(WalletIcon, {
|
|
90
|
+
return (jsx("div", Object.assign({ className: 'walletlist-help-content__container' }, { children: jsxs(EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsx("div", Object.assign({ className: 'walletlist-help-content__icon' }, { children: jsx(WalletIcon, { walletKey: walletName, style: { height: pixelToRem(56), width: pixelToRem(56) } }) })), jsxs("div", Object.assign({ className: 'walletlist-help-content__typography-wrapper' }, { children: [jsxs(Typography, Object.assign({ as: 'p', variant: 'title', weight: 'medium' }, { children: ["We recommend installing", ' ', getWalletBookWallet(walletBook, walletName).name] })), jsx(Typography, Object.assign({ as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label' }, { children: "Select your preferred option below:" }))] })), jsx("div", Object.assign({ className: 'walletlist-help-content__buttons-wrapper' }, { children: walletLinksElements.map((element, i) => element.isEnabled ? (jsx("button", Object.assign({ onClick: () => setSelectedUrl(element.url) }, { children: jsx(Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }), i)) : undefined) })), isCustodialServiceWallet && (jsxs("div", Object.assign({ className: 'walletlist-help-content__custodial-wallet-area' }, { children: [jsx(Typography, Object.assign({ className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular' }, { children: "If you don't want to install a wallet, then use:" })), jsx(NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] }))), jsx(WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] })) })));
|
|
90
91
|
};
|
|
91
92
|
|
|
92
93
|
export { WalletListHelpContent };
|