@dynamic-labs/sdk-react-core 1.0.0-alpha.0 → 1.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +11 -10
- package/src/index.cjs +117 -109
- package/src/index.d.ts +2 -1
- package/src/index.js +66 -61
- package/src/lib/Main.cjs +20 -14
- package/src/lib/Main.js +20 -14
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +9 -7
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +9 -7
- package/src/lib/components/Alert/Alert.cjs +1 -1
- package/src/lib/components/Alert/Alert.js +1 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +9 -7
- package/src/lib/components/AnimatePresence/AnimatePresence.js +9 -7
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +12 -9
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +13 -10
- package/src/lib/components/Button/Button.cjs +4 -2
- package/src/lib/components/Button/Button.d.ts +1 -0
- package/src/lib/components/Button/Button.js +4 -2
- package/src/lib/components/Checkbox/Checkbox.cjs +1 -1
- package/src/lib/components/Checkbox/Checkbox.js +1 -1
- package/src/lib/components/Divider/Divider.cjs +17 -15
- package/src/lib/components/Divider/Divider.js +17 -15
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +3 -3
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +3 -3
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +1 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +1 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.cjs +1 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.js +1 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +1 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +1 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +1 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.js +1 -1
- package/src/lib/components/IsBrowser/IsBrowser.d.ts +2 -6
- package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -1
- package/src/lib/components/LogoutButton/LogoutButton.js +1 -1
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +8 -6
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +8 -6
- package/src/lib/components/Modal/Modal.cjs +9 -7
- package/src/lib/components/Modal/Modal.js +9 -7
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +22 -0
- package/src/lib/components/NeedHelpSection/NeedHelpSection.d.ts +2 -0
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +18 -0
- package/src/lib/components/NeedHelpSection/index.d.ts +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +9 -7
- package/src/lib/components/NetworkPicker/NetworkPicker.js +9 -7
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +17 -15
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +17 -15
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +18 -16
- package/src/lib/components/NetworkPicker/components/Network/Network.js +18 -16
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +18 -16
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +18 -16
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +20 -18
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +20 -18
- package/src/lib/components/OverlayCard/OverlayCard.cjs +9 -7
- package/src/lib/components/OverlayCard/OverlayCard.js +9 -7
- package/src/lib/components/Portal/Portal.cjs +9 -7
- package/src/lib/components/Portal/Portal.js +9 -7
- package/src/lib/components/Select/Select.cjs +1 -1
- package/src/lib/components/Select/Select.js +1 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +1 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +2 -2
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +2 -2
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +1 -1
- package/src/lib/components/ShadowDOM/utils.cjs +1 -1
- package/src/lib/components/ShadowDOM/utils.js +1 -1
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.cjs +1 -1
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.js +1 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +18 -12
- package/src/lib/components/SocialSignIn/SocialSignIn.d.ts +1 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.js +18 -12
- package/src/lib/components/Spinner/spinner.cjs +1 -1
- package/src/lib/components/Spinner/spinner.js +1 -1
- package/src/lib/components/Step/Step.cjs +1 -1
- package/src/lib/components/Step/Step.js +1 -1
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.cjs +16 -9
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.js +16 -9
- package/src/lib/components/Textarea/Textarea.d.ts +2 -0
- package/src/lib/components/Textarea/Textarea.types.d.ts +14 -0
- package/src/lib/components/Textarea/index.d.ts +1 -0
- package/src/lib/components/Toolkit/Toolkit.cjs +1 -1
- package/src/lib/components/Toolkit/Toolkit.js +1 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +1 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +1 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +11 -9
- package/src/lib/components/Tooltip/Tooltip.js +11 -9
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +4 -4
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +4 -4
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +10 -8
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +10 -8
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +9 -7
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +9 -7
- package/src/lib/components/UserAddress/UserAddress.cjs +10 -8
- package/src/lib/components/UserAddress/UserAddress.js +10 -8
- package/src/lib/components/UserProfile/UserProfile.cjs +2 -2
- package/src/lib/components/UserProfile/UserProfile.js +2 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +16 -14
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +16 -14
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +16 -14
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +16 -14
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +16 -15
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +16 -15
- package/src/lib/components/UserProfileForm/UserProfileForm.cjs +1 -1
- package/src/lib/components/UserProfileForm/UserProfileForm.js +1 -1
- package/src/lib/components/WalletInformationCard/WalletInformationCard.cjs +1 -1
- package/src/lib/components/WalletInformationCard/WalletInformationCard.js +1 -1
- package/src/lib/components/index.d.ts +40 -38
- package/src/lib/context/CaptchaContext/CaptchaContext.cjs +27 -1
- package/src/lib/context/CaptchaContext/CaptchaContext.d.ts +14 -0
- package/src/lib/context/CaptchaContext/CaptchaContext.js +28 -3
- package/src/lib/context/DynamicContext/DynamicContext.cjs +67 -64
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +4 -3
- package/src/lib/context/DynamicContext/DynamicContext.js +67 -64
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.cjs +5 -4
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.d.ts +3 -3
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.js +5 -4
- package/src/lib/context/DynamicContext/helpers.cjs +1 -1
- package/src/lib/context/DynamicContext/helpers.js +1 -1
- package/src/lib/context/DynamicContext/hooks/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useSelectedWalletConnector/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useSelectedWalletConnector/useSelectedWalletConnector.cjs +20 -0
- package/src/lib/context/DynamicContext/hooks/useSelectedWalletConnector/useSelectedWalletConnector.d.ts +10 -0
- package/src/lib/context/DynamicContext/hooks/useSelectedWalletConnector/useSelectedWalletConnector.js +16 -0
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.js +1 -1
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.d.ts +2 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +10 -8
- package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +7 -7
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +9 -7
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +9 -7
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +21 -11
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +21 -11
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +3 -3
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +3 -3
- package/src/lib/context/DynamicContext/validators.cjs +1 -1
- package/src/lib/context/DynamicContext/validators.js +1 -1
- package/src/lib/context/FundingContext/FundingContext.cjs +1 -1
- package/src/lib/context/FundingContext/FundingContext.js +1 -1
- package/src/lib/context/MockContext/MockContext.cjs +11 -11
- package/src/lib/context/MockContext/MockContext.js +11 -11
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +9 -7
- package/src/lib/context/QrCodeContext/QrCodeContext.js +9 -7
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +9 -7
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +9 -7
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +15 -11
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +15 -11
- package/src/lib/context/ThemeContext/themesData.cjs +1 -1
- package/src/lib/context/ThemeContext/themesData.js +1 -1
- package/src/lib/context/UseNetworkValidation/UseNetworkValidation.cjs +12 -0
- package/src/lib/context/UseNetworkValidation/UseNetworkValidation.d.ts +1 -0
- package/src/lib/context/UseNetworkValidation/UseNetworkValidation.js +8 -0
- package/src/lib/context/UseNetworkValidation/index.d.ts +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +10 -8
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +10 -8
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +3 -3
- package/src/lib/context/WalletContext/WalletContext.js +3 -3
- package/src/lib/data/api.cjs +43 -3
- package/src/lib/data/api.d.ts +25 -3
- package/src/lib/data/api.js +42 -5
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +18 -16
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +18 -16
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +16 -14
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +16 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +16 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +16 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +17 -15
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +17 -15
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +16 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +16 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +15 -13
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +15 -13
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +15 -13
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +15 -13
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +17 -15
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +17 -15
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +16 -14
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +16 -14
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +18 -16
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +18 -16
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +14 -8
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +14 -8
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +16 -14
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +16 -14
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +16 -14
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +16 -14
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +17 -15
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +17 -15
- package/src/lib/locale/en/translation.cjs +878 -376
- package/src/lib/locale/en/translation.d.ts +877 -0
- package/src/lib/locale/en/translation.js +878 -352
- package/src/lib/locale/helpers/deepMerge.cjs +56 -0
- package/src/lib/locale/helpers/deepMerge.d.ts +1 -0
- package/src/lib/locale/helpers/deepMerge.js +52 -0
- package/src/lib/locale/helpers/index.d.ts +1 -0
- package/src/lib/locale/index.d.ts +2 -0
- package/src/lib/locale/locale.cjs +4 -15
- package/src/lib/locale/locale.d.ts +2 -6
- package/src/lib/locale/locale.js +5 -16
- package/src/lib/locale/type.d.ts +16 -0
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +17 -15
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +17 -15
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +15 -13
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +15 -13
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +18 -15
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +18 -15
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.types.d.ts +2 -7
- package/src/lib/modals/SignMessageConfirmationModal/getProperErrorMessage.cjs +17 -8
- package/src/lib/modals/SignMessageConfirmationModal/getProperErrorMessage.d.ts +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/getProperErrorMessage.js +17 -8
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +19 -16
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +19 -16
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +14 -12
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +14 -12
- package/src/lib/shared/assets/arrow-right-background.cjs +59 -0
- package/src/lib/shared/assets/arrow-right-background.js +35 -0
- package/src/lib/shared/assets/{arrow-right-circle.cjs → circle-locker.cjs} +7 -7
- package/src/lib/shared/assets/{arrow-right-circle.js → circle-locker.js} +7 -7
- package/src/lib/shared/assets/index.d.ts +44 -42
- package/src/lib/shared/assets/turnkey.cjs +79 -0
- package/src/lib/shared/assets/turnkey.js +55 -0
- package/src/lib/shared/types/index.d.ts +14 -3
- package/src/lib/shared/utils/functions/detectBrowser/detectBrowser.cjs +5 -5
- package/src/lib/shared/utils/functions/detectBrowser/detectBrowser.d.ts +1 -1
- package/src/lib/shared/utils/functions/detectBrowser/detectBrowser.js +5 -5
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.cjs +0 -8
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.d.ts +1 -1
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.js +0 -8
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.cjs +1 -1
- package/src/lib/utils/functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.js +1 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.cjs +1 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.js +1 -1
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.cjs +1 -1
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.js +1 -1
- package/src/lib/utils/functions/getUserWalletsFromVerifiedCredentials/getUserWalletsFromVerifiedCredentials.cjs +1 -1
- package/src/lib/utils/functions/getUserWalletsFromVerifiedCredentials/getUserWalletsFromVerifiedCredentials.js +1 -1
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -1
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +2 -2
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +2 -2
- package/src/lib/utils/functions/index.d.ts +37 -36
- package/src/lib/utils/functions/removeElementById/index.d.ts +1 -0
- package/src/lib/utils/functions/removeElementById/removeElementById.cjs +16 -0
- package/src/lib/utils/functions/removeElementById/removeElementById.d.ts +1 -0
- package/src/lib/utils/functions/removeElementById/removeElementById.js +12 -0
- package/src/lib/utils/functions/storeAuthToken/index.cjs +1 -1
- package/src/lib/utils/functions/storeAuthToken/index.js +1 -1
- package/src/lib/utils/functions/walletFilters/index.cjs +2 -2
- package/src/lib/utils/functions/walletFilters/index.d.ts +1 -1
- package/src/lib/utils/functions/walletFilters/index.js +2 -2
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +56 -37
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +56 -37
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +17 -9
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +17 -9
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +9 -6
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +9 -6
- package/src/lib/utils/hooks/index.d.ts +0 -1
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +1 -1
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +1 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +5 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +5 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +2 -2
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +2 -2
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +5 -2
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +5 -2
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +3 -3
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +3 -3
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +1 -1
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +1 -1
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.cjs +1 -1
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.js +1 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +9 -9
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +9 -9
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +1 -1
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +1 -1
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +19 -10
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +19 -10
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +3 -3
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +3 -3
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +9 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +9 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +42 -7
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.d.ts +1 -2
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +43 -8
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +53 -24
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +53 -24
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs +10 -1
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +10 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +44 -3
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.d.ts +4 -0
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +44 -5
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs +1 -1
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +1 -1
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +1 -1
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +1 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +5 -5
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +5 -5
- package/src/lib/utils/hooks/useIsFirstRender/useIsFirstRender.cjs +6 -4
- package/src/lib/utils/hooks/useIsFirstRender/useIsFirstRender.js +7 -5
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +1 -1
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +1 -1
- package/src/lib/utils/hooks/usePasskeyRecovery/index.d.ts +1 -0
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +67 -0
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.d.ts +4 -0
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +63 -0
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +1 -1
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +1 -1
- package/src/lib/utils/hooks/usePromise/usePromise.cjs +1 -1
- package/src/lib/utils/hooks/usePromise/usePromise.js +1 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +1 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +1 -1
- package/src/lib/utils/hooks/useSetWalletConnectorVerifiedCredentials/useSetWalletConnectorVerifiedCredentials.cjs +1 -1
- package/src/lib/utils/hooks/useSetWalletConnectorVerifiedCredentials/useSetWalletConnectorVerifiedCredentials.js +1 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +2 -2
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +2 -2
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +8 -7
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.d.ts +5 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +8 -7
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +7 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +7 -3
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +4 -2
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +4 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +12 -10
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +12 -10
- package/src/lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.cjs +0 -1
- package/src/lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.js +0 -1
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +16 -5
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +16 -5
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.cjs +9 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.d.ts +3 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.js +5 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.cjs +36 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.d.ts +10 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.js +29 -0
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +10 -6
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +3 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +10 -6
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +9 -8
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +9 -8
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +16 -14
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +16 -14
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +0 -1
- package/src/lib/utils/hooks/useWallets/useWallets.js +0 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +14 -2
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +15 -3
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +16 -14
- package/src/lib/views/AccountExistsView/AccountExistsView.js +16 -14
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +3 -3
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +3 -3
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +4 -4
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +4 -4
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +6 -6
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +6 -6
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +22 -52
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.d.ts +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +22 -52
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +18 -16
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +18 -16
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +16 -14
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +16 -14
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +19 -17
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +19 -17
- package/src/lib/views/CollectUserDataView/useFields.cjs +1 -1
- package/src/lib/views/CollectUserDataView/useFields.js +1 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +17 -15
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +17 -15
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +17 -15
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +17 -15
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +16 -14
- package/src/lib/views/EmailUpdate/EmailUpdate.js +16 -14
- package/src/lib/views/EmailVerification/EmailVerification.cjs +19 -17
- package/src/lib/views/EmailVerification/EmailVerification.js +19 -17
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +8 -6
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +8 -6
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +72 -50
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +73 -51
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +36 -17
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +36 -17
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +31 -14
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +31 -14
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +4 -3
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +4 -3
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +17 -15
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +17 -15
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +16 -14
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +16 -14
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -1
- package/src/lib/views/LoginView/useLoginView.cjs +11 -4
- package/src/lib/views/LoginView/useLoginView.js +11 -4
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +17 -15
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +17 -15
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +19 -22
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +19 -22
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +19 -22
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +19 -22
- package/src/lib/views/NoAccess/NoAccess.cjs +16 -14
- package/src/lib/views/NoAccess/NoAccess.js +16 -14
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +17 -15
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +17 -15
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +16 -14
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +16 -14
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +90 -0
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.d.ts +2 -0
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +86 -0
- package/src/lib/views/Passkey/PasskeyDeviceIcon/index.d.ts +1 -0
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +145 -0
- package/src/lib/views/{PasskeyIntroView → Passkey/PasskeyIntroView}/PasskeyIntroView.d.ts +1 -1
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +141 -0
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +136 -0
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.d.ts +2 -0
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +132 -0
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/index.d.ts +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +108 -0
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.d.ts +2 -0
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +104 -0
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/index.d.ts +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +115 -0
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.d.ts +2 -0
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +111 -0
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/index.d.ts +1 -0
- package/src/lib/views/Passkey/PasskeyRecovery/constants.cjs +9 -0
- package/src/lib/views/Passkey/PasskeyRecovery/constants.d.ts +2 -0
- package/src/lib/views/Passkey/PasskeyRecovery/constants.js +4 -0
- package/src/lib/views/Passkey/PasskeyRecovery/index.d.ts +3 -0
- package/src/lib/views/Passkey/index.d.ts +2 -0
- package/src/lib/views/Passkey/passkey.types.d.ts +8 -0
- package/src/lib/views/{PasskeyIntroView → Passkey}/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs +2 -3
- package/src/lib/views/{PasskeyIntroView → Passkey}/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.d.ts +1 -1
- package/src/lib/views/{PasskeyIntroView → Passkey}/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js +2 -3
- package/src/lib/views/Passkey/utils/passkeyRecovery/index.d.ts +1 -0
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +141 -0
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.d.ts +26 -0
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +134 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +16 -14
- package/src/lib/views/PendingConnectView/PendingConnectView.js +16 -14
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +19 -17
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +19 -17
- package/src/lib/views/QrCodeView/QRCode.cjs +10 -8
- package/src/lib/views/QrCodeView/QRCode.js +10 -8
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +19 -17
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +19 -17
- package/src/lib/views/QrCodeView/QrCodeView.cjs +9 -7
- package/src/lib/views/QrCodeView/QrCodeView.js +9 -7
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +10 -8
- package/src/lib/views/SendBalanceView/SendBalanceView.js +10 -8
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +9 -7
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +9 -7
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +17 -15
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +17 -15
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +17 -15
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +17 -15
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +58 -25
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +60 -27
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs +4 -1
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.d.ts +1 -1
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.js +4 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs +9 -7
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +9 -7
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.cjs +5 -2
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.d.ts +2 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.js +5 -2
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +17 -15
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +17 -15
- package/src/lib/views/UserFieldEditorView/UserFieldsToIcon/UserFieldsToIcon.cjs +4 -4
- package/src/lib/views/UserFieldEditorView/UserFieldsToIcon/UserFieldsToIcon.js +4 -4
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +16 -14
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +16 -14
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +3 -4
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +3 -4
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +17 -15
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +17 -15
- package/src/lib/views/WalletList/WalletList.cjs +6 -6
- package/src/lib/views/WalletList/WalletList.js +7 -7
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +21 -20
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +21 -20
- package/src/lib/views/WalletList/data.cjs +1 -1
- package/src/lib/views/WalletList/data.js +1 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +17 -15
- package/src/lib/views/WalletLockedView/WalletLockedView.js +17 -15
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +19 -17
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +19 -17
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +27 -23
- package/src/lib/views/WalletUsedView/WalletUsedView.js +27 -23
- package/src/lib/views/viewToComponentMap.cjs +7 -1
- package/src/lib/views/viewToComponentMap.js +7 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +17 -15
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +17 -15
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +14 -12
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +14 -12
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +17 -15
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +17 -15
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +15 -13
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +15 -13
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +17 -16
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +17 -16
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs +0 -2
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js +0 -2
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +17 -15
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +17 -15
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +3 -3
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +3 -3
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +18 -15
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.d.ts +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +18 -15
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +16 -15
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.d.ts +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +16 -15
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +16 -14
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +16 -14
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +17 -15
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +17 -15
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +26 -17
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +26 -17
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +15 -14
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +15 -14
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +16 -14
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +16 -14
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +17 -15
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +17 -15
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +13 -11
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +13 -11
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +14 -14
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +14 -14
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +14 -13
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +14 -13
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +18 -16
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +18 -16
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.cjs +13 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js +13 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/DynamicWidgetVariants.cjs +10 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/DynamicWidgetVariants.js +10 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +9 -7
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +9 -7
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +13 -11
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +13 -11
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +17 -15
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +17 -15
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +16 -14
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +16 -14
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +15 -13
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +15 -13
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +17 -15
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +17 -15
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +14 -13
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +14 -13
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +19 -17
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +19 -17
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +16 -14
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +16 -14
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +11 -11
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +2 -13
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +11 -11
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +9 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +17 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +4 -0
- package/src/lib/widgets/DynamicWidget/helpers/getPasskeyProviderFromUserAgent.cjs +33 -0
- package/src/lib/widgets/DynamicWidget/helpers/getPasskeyProviderFromUserAgent.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/helpers/getPasskeyProviderFromUserAgent.js +29 -0
- package/src/lib/widgets/DynamicWidget/helpers/getTimeSince.cjs +64 -0
- package/src/lib/widgets/DynamicWidget/helpers/getTimeSince.d.ts +4 -0
- package/src/lib/widgets/DynamicWidget/helpers/getTimeSince.js +60 -0
- package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.d.ts +2 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +2 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +17 -15
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +17 -15
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +15 -13
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +15 -13
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +17 -15
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +17 -15
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +16 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +16 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +20 -18
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +20 -18
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +15 -13
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +15 -13
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +15 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +15 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +15 -13
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +15 -13
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +16 -14
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +16 -14
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +20 -18
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +20 -18
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +15 -13
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +15 -13
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +18 -18
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +18 -18
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +96 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +92 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +98 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.d.ts +7 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +94 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +17 -15
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +17 -15
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +19 -19
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +19 -19
- package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +15 -13
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +15 -13
- package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.cjs +0 -29
- package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.d.ts +0 -5
- package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.js +0 -25
- package/src/lib/utils/hooks/useMultiWalletFlag/index.d.ts +0 -1
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs +0 -36
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.d.ts +0 -2
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js +0 -31
- package/src/lib/views/PasskeyIntroView/PasskeyIntroView.cjs +0 -156
- package/src/lib/views/PasskeyIntroView/PasskeyIntroView.js +0 -152
- /package/src/lib/views/{PasskeyIntroView → Passkey/PasskeyIntroView}/index.d.ts +0 -0
- /package/src/lib/views/{PasskeyIntroView → Passkey}/utils/createEmbeddedWalletWithPasskey/index.d.ts +0 -0
- /package/src/lib/views/{PasskeyIntroView → Passkey}/utils/findPasskeyEmailWalletConnector/findPasskeyEmailWalletConnector.cjs +0 -0
- /package/src/lib/views/{PasskeyIntroView → Passkey}/utils/findPasskeyEmailWalletConnector/findPasskeyEmailWalletConnector.d.ts +0 -0
- /package/src/lib/views/{PasskeyIntroView → Passkey}/utils/findPasskeyEmailWalletConnector/findPasskeyEmailWalletConnector.js +0 -0
- /package/src/lib/views/{PasskeyIntroView → Passkey}/utils/findPasskeyEmailWalletConnector/index.d.ts +0 -0
- /package/src/lib/views/{PasskeyIntroView → Passkey}/utils/index.d.ts +0 -0
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
import
|
|
3
|
+
import '@dynamic-labs/utils';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
|
+
import '../../config/ApiEndpoint.js';
|
|
5
6
|
import '../../shared/logger.js';
|
|
6
7
|
import '@dynamic-labs/iconic';
|
|
7
8
|
import '@dynamic-labs/wallet-connector-core';
|
|
8
9
|
import '../../context/ViewContext/ViewContext.js';
|
|
9
10
|
import '@dynamic-labs/wallet-book';
|
|
10
|
-
import '@dynamic-labs/utils';
|
|
11
11
|
import '../../utils/constants/colors.js';
|
|
12
12
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
13
13
|
import 'viem';
|
|
14
14
|
import '../../shared/consts/index.js';
|
|
15
|
-
import '../../context/DynamicContext/DynamicContext.js';
|
|
16
15
|
import '@dynamic-labs/multi-wallet';
|
|
17
|
-
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
18
|
-
import '../../context/ThemeContext/ThemeContext.js';
|
|
19
|
-
import 'react-dom';
|
|
20
|
-
import 'react-focus-lock';
|
|
21
|
-
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
22
|
-
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
23
|
-
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
24
|
-
import '../../config/ApiEndpoint.js';
|
|
25
16
|
import '@dynamic-labs/rpc-providers';
|
|
26
17
|
import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
27
|
-
import '../../context/ErrorContext/ErrorContext.js';
|
|
28
18
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
19
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
20
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
21
|
+
import '../../context/ErrorContext/ErrorContext.js';
|
|
22
|
+
import 'react-dom';
|
|
30
23
|
import 'react-i18next';
|
|
24
|
+
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
25
|
+
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
26
|
+
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
27
|
+
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
31
28
|
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
32
29
|
import '../../context/FooterAnimationContext/index.js';
|
|
33
30
|
import '../../context/MockContext/MockContext.js';
|
|
34
31
|
import '../../context/QrCodeContext/QrCodeContext.js';
|
|
32
|
+
import { Typography } from '../../components/Typography/Typography.js';
|
|
35
33
|
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
36
34
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
35
|
+
import '../../context/ThemeContext/ThemeContext.js';
|
|
37
36
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
38
37
|
import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
39
38
|
import 'qrcode';
|
|
40
39
|
import '../../context/LoadingContext/LoadingContext.js';
|
|
40
|
+
import 'i18next';
|
|
41
41
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
42
42
|
import 'yup';
|
|
43
43
|
import '../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
@@ -47,10 +47,12 @@ import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
|
47
47
|
import 'formik';
|
|
48
48
|
import '../../components/IconButton/IconButton.js';
|
|
49
49
|
import '../../components/Alert/Alert.js';
|
|
50
|
-
import '../../
|
|
51
|
-
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
50
|
+
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
52
51
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
53
52
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
53
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
54
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
55
|
+
import 'react-focus-lock';
|
|
54
56
|
|
|
55
57
|
const capitalize = (value) => value[0].toUpperCase() + value.slice(1);
|
|
56
58
|
const WalletHelpLink = ({ name, link, Icon }) => (jsx("div", { className: 'wallet-help-link', children: jsxs("a", { className: 'wallet-help-link__anchor', href: link, target: '_blank', rel: 'noreferrer', children: [jsx(Icon, { style: {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var utils = require('@dynamic-labs/utils');
|
|
7
|
+
require('react');
|
|
8
|
+
require('@dynamic-labs/sdk-api');
|
|
9
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
10
|
+
require('../../../shared/logger.cjs');
|
|
11
|
+
require('@dynamic-labs/iconic');
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
var androidFaceId = require('../../../shared/assets/android-face-id.cjs');
|
|
15
|
+
var androidTouchId = require('../../../shared/assets/android-touch-id.cjs');
|
|
16
|
+
var iphoneFaceId = require('../../../shared/assets/iphone-face-id.cjs');
|
|
17
|
+
var iphoneTouchId = require('../../../shared/assets/iphone-touch-id.cjs');
|
|
18
|
+
require('@dynamic-labs/wallet-book');
|
|
19
|
+
require('../../../utils/constants/colors.cjs');
|
|
20
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
21
|
+
require('viem');
|
|
22
|
+
require('../../../shared/consts/index.cjs');
|
|
23
|
+
require('@dynamic-labs/multi-wallet');
|
|
24
|
+
require('@dynamic-labs/rpc-providers');
|
|
25
|
+
require('../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
26
|
+
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
27
|
+
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
28
|
+
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
29
|
+
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
30
|
+
require('react-dom');
|
|
31
|
+
require('react-i18next');
|
|
32
|
+
require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
33
|
+
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
34
|
+
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
35
|
+
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
36
|
+
require('../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
37
|
+
require('../../../context/FooterAnimationContext/index.cjs');
|
|
38
|
+
require('../../../context/MockContext/MockContext.cjs');
|
|
39
|
+
require('../../../context/QrCodeContext/QrCodeContext.cjs');
|
|
40
|
+
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
41
|
+
require('../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
42
|
+
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
43
|
+
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
44
|
+
require('../../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
45
|
+
require('qrcode');
|
|
46
|
+
require('../../../context/LoadingContext/LoadingContext.cjs');
|
|
47
|
+
var Icon = require('../../../components/Icon/Icon.cjs');
|
|
48
|
+
require('i18next');
|
|
49
|
+
require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
50
|
+
require('yup');
|
|
51
|
+
require('../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
52
|
+
require('@dynamic-labs/types');
|
|
53
|
+
require('../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
54
|
+
require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
55
|
+
require('formik');
|
|
56
|
+
require('../../../components/IconButton/IconButton.cjs');
|
|
57
|
+
require('../../../components/Alert/Alert.cjs');
|
|
58
|
+
require('../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
59
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
60
|
+
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
61
|
+
require('../../../components/Popper/Popper/Popper.cjs');
|
|
62
|
+
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
63
|
+
require('react-focus-lock');
|
|
64
|
+
|
|
65
|
+
const PasskeyDeviceIcon = () => {
|
|
66
|
+
let IdIcon;
|
|
67
|
+
if (utils.isIPhone()) {
|
|
68
|
+
if (utils.isIPhone8OrEarlier()) {
|
|
69
|
+
IdIcon = jsxRuntime.jsx(iphoneTouchId.ReactComponent, { "data-testid": 'iphone-8-icon' });
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
IdIcon = jsxRuntime.jsx(iphoneFaceId.ReactComponent, { "data-testid": 'iphone-icon' });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (utils.isAndroid()) {
|
|
76
|
+
const androidVersion = utils.getAndroidVersion();
|
|
77
|
+
if (androidVersion && androidVersion >= 9) {
|
|
78
|
+
IdIcon = jsxRuntime.jsx(androidTouchId.ReactComponent, { "data-testid": 'android-9-icon' });
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
IdIcon = jsxRuntime.jsx(androidFaceId.ReactComponent, { "data-testid": 'android-icon' });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (!IdIcon) {
|
|
85
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
86
|
+
}
|
|
87
|
+
return jsxRuntime.jsx(Icon.Icon, { size: 'small', children: IdIcon });
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
exports.PasskeyDeviceIcon = PasskeyDeviceIcon;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { isIPhone, isIPhone8OrEarlier, isAndroid, getAndroidVersion } from '@dynamic-labs/utils';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@dynamic-labs/sdk-api';
|
|
5
|
+
import '../../../config/ApiEndpoint.js';
|
|
6
|
+
import '../../../shared/logger.js';
|
|
7
|
+
import '@dynamic-labs/iconic';
|
|
8
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
9
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import { ReactComponent as SvgAndroidFaceId } from '../../../shared/assets/android-face-id.js';
|
|
11
|
+
import { ReactComponent as SvgAndroidTouchId } from '../../../shared/assets/android-touch-id.js';
|
|
12
|
+
import { ReactComponent as SvgIphoneFaceId } from '../../../shared/assets/iphone-face-id.js';
|
|
13
|
+
import { ReactComponent as SvgIphoneTouchId } from '../../../shared/assets/iphone-touch-id.js';
|
|
14
|
+
import '@dynamic-labs/wallet-book';
|
|
15
|
+
import '../../../utils/constants/colors.js';
|
|
16
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
17
|
+
import 'viem';
|
|
18
|
+
import '../../../shared/consts/index.js';
|
|
19
|
+
import '@dynamic-labs/multi-wallet';
|
|
20
|
+
import '@dynamic-labs/rpc-providers';
|
|
21
|
+
import '../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
22
|
+
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
23
|
+
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
24
|
+
import '../../../context/DynamicContext/DynamicContext.js';
|
|
25
|
+
import '../../../context/ErrorContext/ErrorContext.js';
|
|
26
|
+
import 'react-dom';
|
|
27
|
+
import 'react-i18next';
|
|
28
|
+
import '../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
29
|
+
import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
30
|
+
import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
31
|
+
import '../../../components/ShadowDOM/ShadowDOM.js';
|
|
32
|
+
import '../../../components/OverlayCard/OverlayCard.context.js';
|
|
33
|
+
import '../../../context/FooterAnimationContext/index.js';
|
|
34
|
+
import '../../../context/MockContext/MockContext.js';
|
|
35
|
+
import '../../../context/QrCodeContext/QrCodeContext.js';
|
|
36
|
+
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
37
|
+
import '../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
38
|
+
import '../../../context/ThemeContext/ThemeContext.js';
|
|
39
|
+
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
40
|
+
import '../../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
41
|
+
import 'qrcode';
|
|
42
|
+
import '../../../context/LoadingContext/LoadingContext.js';
|
|
43
|
+
import { Icon } from '../../../components/Icon/Icon.js';
|
|
44
|
+
import 'i18next';
|
|
45
|
+
import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
46
|
+
import 'yup';
|
|
47
|
+
import '../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
48
|
+
import '@dynamic-labs/types';
|
|
49
|
+
import '../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
50
|
+
import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
51
|
+
import 'formik';
|
|
52
|
+
import '../../../components/IconButton/IconButton.js';
|
|
53
|
+
import '../../../components/Alert/Alert.js';
|
|
54
|
+
import '../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
55
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
56
|
+
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
57
|
+
import '../../../components/Popper/Popper/Popper.js';
|
|
58
|
+
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
59
|
+
import 'react-focus-lock';
|
|
60
|
+
|
|
61
|
+
const PasskeyDeviceIcon = () => {
|
|
62
|
+
let IdIcon;
|
|
63
|
+
if (isIPhone()) {
|
|
64
|
+
if (isIPhone8OrEarlier()) {
|
|
65
|
+
IdIcon = jsx(SvgIphoneTouchId, { "data-testid": 'iphone-8-icon' });
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
IdIcon = jsx(SvgIphoneFaceId, { "data-testid": 'iphone-icon' });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (isAndroid()) {
|
|
72
|
+
const androidVersion = getAndroidVersion();
|
|
73
|
+
if (androidVersion && androidVersion >= 9) {
|
|
74
|
+
IdIcon = jsx(SvgAndroidTouchId, { "data-testid": 'android-9-icon' });
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
IdIcon = jsx(SvgAndroidFaceId, { "data-testid": 'android-icon' });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (!IdIcon) {
|
|
81
|
+
return jsx(Fragment, {});
|
|
82
|
+
}
|
|
83
|
+
return jsx(Icon, { size: 'small', children: IdIcon });
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export { PasskeyDeviceIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PasskeyDeviceIcon } from './PasskeyDeviceIcon';
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var reactI18next = require('react-i18next');
|
|
9
|
+
var utils = require('@dynamic-labs/utils');
|
|
10
|
+
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
11
|
+
require('@dynamic-labs/sdk-api');
|
|
12
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
13
|
+
var logger = require('../../../shared/logger.cjs');
|
|
14
|
+
require('@dynamic-labs/iconic');
|
|
15
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
16
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
17
|
+
var passkeyIntroIcon = require('../../../shared/assets/passkey-intro-icon.cjs');
|
|
18
|
+
var questionMark = require('../../../shared/assets/question-mark.cjs');
|
|
19
|
+
require('@dynamic-labs/wallet-book');
|
|
20
|
+
var localStorage$1 = require('../../../utils/constants/localStorage.cjs');
|
|
21
|
+
require('../../../utils/constants/colors.cjs');
|
|
22
|
+
var localStorage = require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
23
|
+
require('viem');
|
|
24
|
+
require('../../../shared/consts/index.cjs');
|
|
25
|
+
require('@dynamic-labs/multi-wallet');
|
|
26
|
+
require('@dynamic-labs/rpc-providers');
|
|
27
|
+
require('../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
28
|
+
var createUserProfile = require('../../../utils/functions/createUserProfile/createUserProfile.cjs');
|
|
29
|
+
var index$1 = require('../../../utils/functions/storeAuthToken/index.cjs');
|
|
30
|
+
var smartWallet = require('../../../utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.cjs');
|
|
31
|
+
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
32
|
+
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
33
|
+
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
34
|
+
require('react-dom');
|
|
35
|
+
require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
36
|
+
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
37
|
+
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
38
|
+
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
39
|
+
require('../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
40
|
+
var index = require('../../../context/FooterAnimationContext/index.cjs');
|
|
41
|
+
require('../../../context/MockContext/MockContext.cjs');
|
|
42
|
+
require('../../../context/QrCodeContext/QrCodeContext.cjs');
|
|
43
|
+
var Typography = require('../../../components/Typography/Typography.cjs');
|
|
44
|
+
var Tooltip = require('../../../components/Tooltip/Tooltip.cjs');
|
|
45
|
+
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
46
|
+
require('../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
47
|
+
var usePromise = require('../../../utils/hooks/usePromise/usePromise.cjs');
|
|
48
|
+
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
49
|
+
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
50
|
+
require('../../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
51
|
+
require('qrcode');
|
|
52
|
+
require('../../../context/LoadingContext/LoadingContext.cjs');
|
|
53
|
+
require('i18next');
|
|
54
|
+
require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
55
|
+
require('yup');
|
|
56
|
+
var ErrorContainer = require('../../../components/ErrorContainer/ErrorContainer.cjs');
|
|
57
|
+
require('../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
58
|
+
require('@dynamic-labs/types');
|
|
59
|
+
require('../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
60
|
+
require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
61
|
+
require('formik');
|
|
62
|
+
var Button = require('../../../components/Button/Button.cjs');
|
|
63
|
+
var ModalHeader = require('../../../components/ModalHeader/ModalHeader.cjs');
|
|
64
|
+
var IconButton = require('../../../components/IconButton/IconButton.cjs');
|
|
65
|
+
require('../../../components/Alert/Alert.cjs');
|
|
66
|
+
require('../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
67
|
+
var getProperErrorMessage = require('../../../modals/SignMessageConfirmationModal/getProperErrorMessage.cjs');
|
|
68
|
+
var useMutation = require('../../../utils/hooks/useMutation/useMutation.cjs');
|
|
69
|
+
var TextButton = require('../../../components/TextButton/TextButton.cjs');
|
|
70
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
71
|
+
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
72
|
+
require('../../../components/Popper/Popper/Popper.cjs');
|
|
73
|
+
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
74
|
+
require('react-focus-lock');
|
|
75
|
+
var isPasskeyEnabled = require('../../../utils/functions/isPasskeyEnabled/isPasskeyEnabled.cjs');
|
|
76
|
+
var createEmbeddedWalletWithPasskey = require('../utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs');
|
|
77
|
+
var findPasskeyEmailWalletConnector = require('../utils/findPasskeyEmailWalletConnector/findPasskeyEmailWalletConnector.cjs');
|
|
78
|
+
var PasskeyDeviceIcon = require('../PasskeyDeviceIcon/PasskeyDeviceIcon.cjs');
|
|
79
|
+
|
|
80
|
+
const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletWithPasskey.createEmbeddedWalletWithPasskey, }) => {
|
|
81
|
+
const { user, wallets, setPrimaryWalletId, setUser, authToken, environmentId, handleLogOut, internalEvents, setShowAuthFlow, setCallback, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
82
|
+
const { setIsFooterExpanded } = index.useFooterAnimationContext();
|
|
83
|
+
const { t } = reactI18next.useTranslation();
|
|
84
|
+
const { data: passkeyEnabled } = usePromise.usePromise(isPasskeyEnabled.isPasskeyEnabled);
|
|
85
|
+
// if passkey is not yet setup, but user logged in with email in a passkey env
|
|
86
|
+
// it should be null to force user to setup passkey even after the a refresh
|
|
87
|
+
React.useEffect(() => localStorage.LocalStorage.removeFromLS(localStorage$1.LAST_USED_WALLET), []);
|
|
88
|
+
const { mutate: createEmbeddedWalletWithPasskeyMutation, isLoading, error, } = useMutation.useMutation(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
89
|
+
var _a;
|
|
90
|
+
const { embeddedWalletVerifiedCredential, jwt, decodedJwt, walletConnector, } = yield createEmbeddedWalletMutation({
|
|
91
|
+
authToken,
|
|
92
|
+
environmentId,
|
|
93
|
+
user,
|
|
94
|
+
walletConnector: findPasskeyEmailWalletConnector.findPasskeyEmailWalletConnector(wallets),
|
|
95
|
+
});
|
|
96
|
+
const passkeyWallet = {
|
|
97
|
+
address: (yield walletConnector.fetchPublicAddress()) || '',
|
|
98
|
+
chain: walletConnector.connectedChain || '',
|
|
99
|
+
connected: true,
|
|
100
|
+
connector: walletConnector,
|
|
101
|
+
id: embeddedWalletVerifiedCredential.id,
|
|
102
|
+
};
|
|
103
|
+
internalEvents.current.emit('embeddedWalletCreated', passkeyWallet);
|
|
104
|
+
const smartWallet$1 = smartWallet.findSmartWallet(embeddedWalletVerifiedCredential, decodedJwt.verifiedCredentials);
|
|
105
|
+
if (smartWallet$1) {
|
|
106
|
+
setPrimaryWalletId(smartWallet$1.id);
|
|
107
|
+
smartWallet.initializeSmartWallet({
|
|
108
|
+
account: smartWallet$1,
|
|
109
|
+
verifiedCredentials: decodedJwt.verifiedCredentials,
|
|
110
|
+
walletOptions: wallets,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
setPrimaryWalletId(embeddedWalletVerifiedCredential.id);
|
|
115
|
+
}
|
|
116
|
+
index$1.storeAuthToken(jwt);
|
|
117
|
+
setUser(createUserProfile.createUserProfile(decodedJwt));
|
|
118
|
+
setShowAuthFlow(false);
|
|
119
|
+
const turnkeyVerifiedCredentials = (_a = decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.find(({ walletName }) => walletName === 'turnkey');
|
|
120
|
+
setCallback('embeddedWalletCreated', {
|
|
121
|
+
email: (turnkeyVerifiedCredentials === null || turnkeyVerifiedCredentials === void 0 ? void 0 : turnkeyVerifiedCredentials.email) || '',
|
|
122
|
+
verifiedCredential: turnkeyVerifiedCredentials,
|
|
123
|
+
});
|
|
124
|
+
}), {
|
|
125
|
+
onFailure: (err) => {
|
|
126
|
+
logger.logger.error('Failed to create embedded wallet', err);
|
|
127
|
+
internalEvents.current.emit('embeddedWalletFailed', err);
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
const errorText = React.useMemo(() => {
|
|
131
|
+
if (!error) {
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
if (error instanceof utils.DynamicError) {
|
|
135
|
+
return error.message;
|
|
136
|
+
}
|
|
137
|
+
return getProperErrorMessage.getProperErrorMessage(error);
|
|
138
|
+
}, [error]);
|
|
139
|
+
const infoIconButton = (jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_passkey_intro.helper.tooltip'), className: 'header__tooltip', children: jsxRuntime.jsx(IconButton.IconButton, { type: 'button', "data-testid": 'info-button', onClick: () => setIsFooterExpanded((prev) => !prev), className: 'header__icon', children: jsxRuntime.jsx(questionMark.ReactComponent, {}) }) }, 'info-button'));
|
|
140
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: infoIconButton, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t('dyn_passkey_intro.title') }) }), jsxRuntime.jsxs("div", { className: 'passkey-intro-view', children: [jsxRuntime.jsx("div", { className: 'passkey-intro-view__header', children: jsxRuntime.jsx(passkeyIntroIcon.ReactComponent, {}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-intro-view__subtitle', children: t('dyn_passkey_intro.subtitle') }), passkeyEnabled === false && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: t('dyn_passkey_intro.disabled') })), errorText && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: errorText }), jsxRuntime.jsxs("div", { className: 'passkey-intro-view__actions', children: [jsxRuntime.jsx(Button.Button, { buttonVariant: 'brand-primary', buttonPadding: 'large', onClick: () => createEmbeddedWalletWithPasskeyMutation(), dataTestId: 'setup-passkey-button', loading: isLoading, disabled: isLoading || !passkeyEnabled, typographyProps: {
|
|
141
|
+
color: 'inherit',
|
|
142
|
+
}, children: jsxRuntime.jsxs("div", { className: 'passkey-intro-view__inline-button', children: [jsxRuntime.jsx(PasskeyDeviceIcon.PasskeyDeviceIcon, {}), jsxRuntime.jsx(Typography.Typography, { children: t('dyn_passkey_intro.button') })] }) }), jsxRuntime.jsx(TextButton.TextButton, { "data-testid": 'setup-passkey-logout-button', className: 'passkey-intro-view__log-out', onClick: handleLogOut, children: t('dyn_passkey_intro.button_logout') })] })] })] }));
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
exports.PasskeyIntroView = PasskeyIntroView;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useEffect, useMemo } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { DynamicError } from '@dynamic-labs/utils';
|
|
6
|
+
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
7
|
+
import '@dynamic-labs/sdk-api';
|
|
8
|
+
import '../../../config/ApiEndpoint.js';
|
|
9
|
+
import { logger } from '../../../shared/logger.js';
|
|
10
|
+
import '@dynamic-labs/iconic';
|
|
11
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
12
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
13
|
+
import { ReactComponent as SvgPasskeyIntroIcon } from '../../../shared/assets/passkey-intro-icon.js';
|
|
14
|
+
import { ReactComponent as SvgQuestionMark } from '../../../shared/assets/question-mark.js';
|
|
15
|
+
import '@dynamic-labs/wallet-book';
|
|
16
|
+
import { LAST_USED_WALLET } from '../../../utils/constants/localStorage.js';
|
|
17
|
+
import '../../../utils/constants/colors.js';
|
|
18
|
+
import { LocalStorage } from '../../../shared/utils/classes/storage/localStorage.js';
|
|
19
|
+
import 'viem';
|
|
20
|
+
import '../../../shared/consts/index.js';
|
|
21
|
+
import '@dynamic-labs/multi-wallet';
|
|
22
|
+
import '@dynamic-labs/rpc-providers';
|
|
23
|
+
import '../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
24
|
+
import { createUserProfile } from '../../../utils/functions/createUserProfile/createUserProfile.js';
|
|
25
|
+
import { storeAuthToken } from '../../../utils/functions/storeAuthToken/index.js';
|
|
26
|
+
import { findSmartWallet, initializeSmartWallet } from '../../../utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.js';
|
|
27
|
+
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
28
|
+
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
29
|
+
import '../../../context/ErrorContext/ErrorContext.js';
|
|
30
|
+
import 'react-dom';
|
|
31
|
+
import '../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
32
|
+
import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
33
|
+
import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
34
|
+
import '../../../components/ShadowDOM/ShadowDOM.js';
|
|
35
|
+
import '../../../components/OverlayCard/OverlayCard.context.js';
|
|
36
|
+
import { useFooterAnimationContext } from '../../../context/FooterAnimationContext/index.js';
|
|
37
|
+
import '../../../context/MockContext/MockContext.js';
|
|
38
|
+
import '../../../context/QrCodeContext/QrCodeContext.js';
|
|
39
|
+
import { Typography } from '../../../components/Typography/Typography.js';
|
|
40
|
+
import { Tooltip } from '../../../components/Tooltip/Tooltip.js';
|
|
41
|
+
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
42
|
+
import '../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
43
|
+
import { usePromise } from '../../../utils/hooks/usePromise/usePromise.js';
|
|
44
|
+
import '../../../context/ThemeContext/ThemeContext.js';
|
|
45
|
+
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
46
|
+
import '../../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
47
|
+
import 'qrcode';
|
|
48
|
+
import '../../../context/LoadingContext/LoadingContext.js';
|
|
49
|
+
import 'i18next';
|
|
50
|
+
import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
51
|
+
import 'yup';
|
|
52
|
+
import { ErrorContainer } from '../../../components/ErrorContainer/ErrorContainer.js';
|
|
53
|
+
import '../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
54
|
+
import '@dynamic-labs/types';
|
|
55
|
+
import '../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
56
|
+
import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
57
|
+
import 'formik';
|
|
58
|
+
import { Button } from '../../../components/Button/Button.js';
|
|
59
|
+
import { ModalHeader } from '../../../components/ModalHeader/ModalHeader.js';
|
|
60
|
+
import { IconButton } from '../../../components/IconButton/IconButton.js';
|
|
61
|
+
import '../../../components/Alert/Alert.js';
|
|
62
|
+
import '../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
63
|
+
import { getProperErrorMessage } from '../../../modals/SignMessageConfirmationModal/getProperErrorMessage.js';
|
|
64
|
+
import { useMutation } from '../../../utils/hooks/useMutation/useMutation.js';
|
|
65
|
+
import { TextButton } from '../../../components/TextButton/TextButton.js';
|
|
66
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
67
|
+
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
68
|
+
import '../../../components/Popper/Popper/Popper.js';
|
|
69
|
+
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
70
|
+
import 'react-focus-lock';
|
|
71
|
+
import { isPasskeyEnabled } from '../../../utils/functions/isPasskeyEnabled/isPasskeyEnabled.js';
|
|
72
|
+
import { createEmbeddedWalletWithPasskey } from '../utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js';
|
|
73
|
+
import { findPasskeyEmailWalletConnector } from '../utils/findPasskeyEmailWalletConnector/findPasskeyEmailWalletConnector.js';
|
|
74
|
+
import { PasskeyDeviceIcon } from '../PasskeyDeviceIcon/PasskeyDeviceIcon.js';
|
|
75
|
+
|
|
76
|
+
const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletWithPasskey, }) => {
|
|
77
|
+
const { user, wallets, setPrimaryWalletId, setUser, authToken, environmentId, handleLogOut, internalEvents, setShowAuthFlow, setCallback, } = useInternalDynamicContext();
|
|
78
|
+
const { setIsFooterExpanded } = useFooterAnimationContext();
|
|
79
|
+
const { t } = useTranslation();
|
|
80
|
+
const { data: passkeyEnabled } = usePromise(isPasskeyEnabled);
|
|
81
|
+
// if passkey is not yet setup, but user logged in with email in a passkey env
|
|
82
|
+
// it should be null to force user to setup passkey even after the a refresh
|
|
83
|
+
useEffect(() => LocalStorage.removeFromLS(LAST_USED_WALLET), []);
|
|
84
|
+
const { mutate: createEmbeddedWalletWithPasskeyMutation, isLoading, error, } = useMutation(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
85
|
+
var _a;
|
|
86
|
+
const { embeddedWalletVerifiedCredential, jwt, decodedJwt, walletConnector, } = yield createEmbeddedWalletMutation({
|
|
87
|
+
authToken,
|
|
88
|
+
environmentId,
|
|
89
|
+
user,
|
|
90
|
+
walletConnector: findPasskeyEmailWalletConnector(wallets),
|
|
91
|
+
});
|
|
92
|
+
const passkeyWallet = {
|
|
93
|
+
address: (yield walletConnector.fetchPublicAddress()) || '',
|
|
94
|
+
chain: walletConnector.connectedChain || '',
|
|
95
|
+
connected: true,
|
|
96
|
+
connector: walletConnector,
|
|
97
|
+
id: embeddedWalletVerifiedCredential.id,
|
|
98
|
+
};
|
|
99
|
+
internalEvents.current.emit('embeddedWalletCreated', passkeyWallet);
|
|
100
|
+
const smartWallet = findSmartWallet(embeddedWalletVerifiedCredential, decodedJwt.verifiedCredentials);
|
|
101
|
+
if (smartWallet) {
|
|
102
|
+
setPrimaryWalletId(smartWallet.id);
|
|
103
|
+
initializeSmartWallet({
|
|
104
|
+
account: smartWallet,
|
|
105
|
+
verifiedCredentials: decodedJwt.verifiedCredentials,
|
|
106
|
+
walletOptions: wallets,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
setPrimaryWalletId(embeddedWalletVerifiedCredential.id);
|
|
111
|
+
}
|
|
112
|
+
storeAuthToken(jwt);
|
|
113
|
+
setUser(createUserProfile(decodedJwt));
|
|
114
|
+
setShowAuthFlow(false);
|
|
115
|
+
const turnkeyVerifiedCredentials = (_a = decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.find(({ walletName }) => walletName === 'turnkey');
|
|
116
|
+
setCallback('embeddedWalletCreated', {
|
|
117
|
+
email: (turnkeyVerifiedCredentials === null || turnkeyVerifiedCredentials === void 0 ? void 0 : turnkeyVerifiedCredentials.email) || '',
|
|
118
|
+
verifiedCredential: turnkeyVerifiedCredentials,
|
|
119
|
+
});
|
|
120
|
+
}), {
|
|
121
|
+
onFailure: (err) => {
|
|
122
|
+
logger.error('Failed to create embedded wallet', err);
|
|
123
|
+
internalEvents.current.emit('embeddedWalletFailed', err);
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
const errorText = useMemo(() => {
|
|
127
|
+
if (!error) {
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
if (error instanceof DynamicError) {
|
|
131
|
+
return error.message;
|
|
132
|
+
}
|
|
133
|
+
return getProperErrorMessage(error);
|
|
134
|
+
}, [error]);
|
|
135
|
+
const infoIconButton = (jsx(Tooltip, { content: t('dyn_passkey_intro.helper.tooltip'), className: 'header__tooltip', children: jsx(IconButton, { type: 'button', "data-testid": 'info-button', onClick: () => setIsFooterExpanded((prev) => !prev), className: 'header__icon', children: jsx(SvgQuestionMark, {}) }) }, 'info-button'));
|
|
136
|
+
return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: infoIconButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t('dyn_passkey_intro.title') }) }), jsxs("div", { className: 'passkey-intro-view', children: [jsx("div", { className: 'passkey-intro-view__header', children: jsx(SvgPasskeyIntroIcon, {}) }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-intro-view__subtitle', children: t('dyn_passkey_intro.subtitle') }), passkeyEnabled === false && (jsx(ErrorContainer, { children: t('dyn_passkey_intro.disabled') })), errorText && jsx(ErrorContainer, { children: errorText }), jsxs("div", { className: 'passkey-intro-view__actions', children: [jsx(Button, { buttonVariant: 'brand-primary', buttonPadding: 'large', onClick: () => createEmbeddedWalletWithPasskeyMutation(), dataTestId: 'setup-passkey-button', loading: isLoading, disabled: isLoading || !passkeyEnabled, typographyProps: {
|
|
137
|
+
color: 'inherit',
|
|
138
|
+
}, children: jsxs("div", { className: 'passkey-intro-view__inline-button', children: [jsx(PasskeyDeviceIcon, {}), jsx(Typography, { children: t('dyn_passkey_intro.button') })] }) }), jsx(TextButton, { "data-testid": 'setup-passkey-logout-button', className: 'passkey-intro-view__log-out', onClick: handleLogOut, children: t('dyn_passkey_intro.button_logout') })] })] })] }));
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export { PasskeyIntroView };
|