@dynamic-labs/sdk-react-core 0.19.0-alpha.10 → 0.19.0-alpha.12
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 +29 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/index.cjs +3 -0
- package/src/index.js +2 -0
- package/src/lib/Main.cjs +1 -0
- package/src/lib/Main.js +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +4 -3
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +5 -4
- package/src/lib/components/Divider/Divider.cjs +1 -0
- package/src/lib/components/Divider/Divider.js +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -0
- package/src/lib/components/Modal/Modal.cjs +1 -0
- package/src/lib/components/Modal/Modal.js +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +1 -0
- package/src/lib/components/OverlayCard/OverlayCard.cjs +1 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +1 -0
- package/src/lib/components/Portal/Portal.cjs +1 -0
- package/src/lib/components/Portal/Portal.js +1 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +1 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.js +1 -0
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.cjs +75 -0
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.d.ts +2 -0
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.js +71 -0
- package/src/lib/components/SyncPasskeyFlow/index.d.ts +1 -0
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
- package/src/lib/components/Tooltip/Tooltip.js +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -0
- package/src/lib/components/UserAddress/UserAddress.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -1
- package/src/lib/context/DynamicContext/DynamicContext.js +2 -1
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.d.ts +2 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +1 -0
- package/src/lib/context/MockContext/MockContext.cjs +1 -0
- package/src/lib/context/MockContext/MockContext.js +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -0
- package/src/lib/locale/en/translation.cjs +17 -8
- package/src/lib/locale/en/translation.js +17 -9
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +4 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +4 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.types.d.ts +9 -0
- package/src/lib/modals/SignMessageConfirmationModal/getProperErrorMessage.cjs +20 -0
- package/src/lib/modals/SignMessageConfirmationModal/getProperErrorMessage.d.ts +2 -0
- package/src/lib/modals/SignMessageConfirmationModal/getProperErrorMessage.js +16 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -0
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -0
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -0
- package/src/lib/shared/assets/android-touch-id.cjs +51 -0
- package/src/lib/shared/assets/android-touch-id.js +27 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/isPasskeyEnabled/isPasskeyEnabled.cjs +10 -2
- package/src/lib/utils/functions/isPasskeyEnabled/isPasskeyEnabled.js +10 -2
- package/src/lib/utils/functions/walletListBuilder/utils/filterConnectedWallets/filterConnectedWallets.cjs +15 -0
- package/src/lib/utils/functions/walletListBuilder/utils/filterConnectedWallets/filterConnectedWallets.d.ts +10 -0
- package/src/lib/utils/functions/walletListBuilder/utils/filterConnectedWallets/filterConnectedWallets.js +11 -0
- package/src/lib/utils/functions/walletListBuilder/utils/filterConnectedWallets/index.d.ts +1 -0
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +13 -5
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.d.ts +5 -2
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +13 -5
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +6 -2
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +6 -2
- package/src/lib/utils/hooks/usePromise/usePromise.cjs +5 -8
- package/src/lib/utils/hooks/usePromise/usePromise.js +5 -8
- package/src/lib/utils/hooks/useSetWalletConnectorVerifiedCredentials/useSetWalletConnectorVerifiedCredentials.cjs +10 -12
- package/src/lib/utils/hooks/useSetWalletConnectorVerifiedCredentials/useSetWalletConnectorVerifiedCredentials.js +10 -12
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +1 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.js +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +2 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +2 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +1 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +1 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +3 -2
- package/src/lib/views/EmailVerification/EmailVerification.js +3 -2
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +4 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +4 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -0
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -0
- package/src/lib/views/NoAccess/NoAccess.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -0
- package/src/lib/views/PasskeyIntroView/PasskeyIntroView.cjs +24 -8
- package/src/lib/views/PasskeyIntroView/PasskeyIntroView.js +26 -10
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
- package/src/lib/views/QrCodeView/QRCode.cjs +1 -0
- package/src/lib/views/QrCodeView/QRCode.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +1 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -0
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -0
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -0
- package/src/lib/views/WalletList/WalletList.cjs +5 -3
- package/src/lib/views/WalletList/WalletList.js +6 -4
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
- package/src/lib/views/WalletList/data.cjs +8 -1
- package/src/lib/views/WalletList/data.d.ts +1 -1
- package/src/lib/views/WalletList/data.js +8 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +3 -3
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +42 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +42 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.d.ts +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -0
|
@@ -28,6 +28,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
28
28
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
29
29
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
30
30
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
31
|
+
import 'react-i18next';
|
|
31
32
|
import '../../components/IconButton/IconButton.js';
|
|
32
33
|
import '../../components/Alert/Alert.js';
|
|
33
34
|
import 'formik';
|
|
@@ -31,6 +31,7 @@ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetu
|
|
|
31
31
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
32
32
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
33
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
34
|
+
require('react-i18next');
|
|
34
35
|
require('../../components/IconButton/IconButton.cjs');
|
|
35
36
|
require('../../components/Alert/Alert.cjs');
|
|
36
37
|
require('formik');
|
|
@@ -27,6 +27,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
27
27
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
28
28
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
29
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
30
|
+
import 'react-i18next';
|
|
30
31
|
import '../../components/IconButton/IconButton.js';
|
|
31
32
|
import '../../components/Alert/Alert.js';
|
|
32
33
|
import 'formik';
|
|
@@ -10,19 +10,20 @@ var utils = require('@dynamic-labs/utils');
|
|
|
10
10
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
11
11
|
var Typography = require('../../components/Typography/Typography.cjs');
|
|
12
12
|
require('@dynamic-labs/sdk-api');
|
|
13
|
-
require('../../shared/logger.cjs');
|
|
13
|
+
var logger = require('../../shared/logger.cjs');
|
|
14
14
|
require('@dynamic-labs/iconic');
|
|
15
15
|
require('@dynamic-labs/wallet-connector-core');
|
|
16
16
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
17
|
-
var close = require('../../shared/assets/close.cjs');
|
|
18
17
|
var footerInfoIcon = require('../../shared/assets/footer-info-icon.cjs');
|
|
19
18
|
var passkeyIntroIcon = require('../../shared/assets/passkey-intro-icon.cjs');
|
|
20
19
|
var androidFaceId = require('../../shared/assets/android-face-id.cjs');
|
|
20
|
+
var androidTouchId = require('../../shared/assets/android-touch-id.cjs');
|
|
21
21
|
var iphoneFaceId = require('../../shared/assets/iphone-face-id.cjs');
|
|
22
22
|
var iphoneTouchId = require('../../shared/assets/iphone-touch-id.cjs');
|
|
23
23
|
require('@dynamic-labs/wallet-book');
|
|
24
|
+
var localStorage$1 = require('../../utils/constants/localStorage.cjs');
|
|
24
25
|
require('../../utils/constants/colors.cjs');
|
|
25
|
-
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
26
|
+
var localStorage = require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
26
27
|
require('viem');
|
|
27
28
|
require('../../shared/consts/index.cjs');
|
|
28
29
|
var index$1 = require('../../utils/functions/storeAuthToken/index.cjs');
|
|
@@ -58,6 +59,7 @@ var useMutation = require('../../utils/hooks/useMutation/useMutation.cjs');
|
|
|
58
59
|
require('@dynamic-labs/types');
|
|
59
60
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
60
61
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
62
|
+
var TextButton = require('../../components/TextButton/TextButton.cjs');
|
|
61
63
|
var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
|
|
62
64
|
require('../../components/Popper/Popper/Popper.cjs');
|
|
63
65
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
@@ -70,11 +72,14 @@ var createEmbeddedWalletWithPasskey = require('./utils/createEmbeddedWalletWithP
|
|
|
70
72
|
var findPasskeyEmailWalletConnector = require('./utils/findPasskeyEmailWalletConnector/findPasskeyEmailWalletConnector.cjs');
|
|
71
73
|
|
|
72
74
|
const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletWithPasskey.createEmbeddedWalletWithPasskey, }) => {
|
|
73
|
-
const {
|
|
75
|
+
const { user, wallets, setPrimaryWalletId, setUser, authToken, environmentId, handleLogOut, internalEvents, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
74
76
|
const { setView } = ViewContext.useViewContext();
|
|
75
77
|
const { setIsFooterExpanded } = index.useFooterAnimationContext();
|
|
76
78
|
const { t } = reactI18next.useTranslation();
|
|
77
79
|
const { data: passkeyEnabled } = usePromise.usePromise(isPasskeyEnabled.isPasskeyEnabled);
|
|
80
|
+
// if passkey is not yet setup, but user logged in with email in a passkey env
|
|
81
|
+
// it should be null to force user to setup passkey even after the a refresh
|
|
82
|
+
React.useEffect(() => localStorage.LocalStorage.removeFromLS(localStorage$1.LAST_USED_WALLET), []);
|
|
78
83
|
const { mutate: createEmbeddedWalletWithPasskeyMutation, isLoading, error, } = useMutation.useMutation(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
79
84
|
const { embeddedWalletVerifiedCredentialId, jwt, decodedJwt } = yield createEmbeddedWalletMutation({
|
|
80
85
|
authToken,
|
|
@@ -82,11 +87,17 @@ const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletW
|
|
|
82
87
|
user,
|
|
83
88
|
walletConnector: findPasskeyEmailWalletConnector.findPasskeyEmailWalletConnector(wallets),
|
|
84
89
|
});
|
|
90
|
+
internalEvents.current.emit('embeddedWalletCreated', embeddedWalletVerifiedCredentialId);
|
|
85
91
|
setPrimaryWalletId(embeddedWalletVerifiedCredentialId);
|
|
86
92
|
index$1.storeAuthToken(jwt);
|
|
87
93
|
setUser(createUserProfile.createUserProfile(decodedJwt));
|
|
88
94
|
setView('passkey-success');
|
|
89
|
-
})
|
|
95
|
+
}), {
|
|
96
|
+
onFailure: (err) => {
|
|
97
|
+
logger.logger.error('Failed to create embedded wallet', err);
|
|
98
|
+
internalEvents.current.emit('embeddedWalletFailed', err);
|
|
99
|
+
},
|
|
100
|
+
});
|
|
90
101
|
const errorText = React.useMemo(() => {
|
|
91
102
|
if (!error) {
|
|
92
103
|
return undefined;
|
|
@@ -96,7 +107,6 @@ const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletW
|
|
|
96
107
|
}
|
|
97
108
|
return 'Something went wrong.';
|
|
98
109
|
}, [error]);
|
|
99
|
-
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', "data-testid": 'close-button', onClick: () => setShowAuthFlow(false), children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
100
110
|
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(footerInfoIcon.ReactComponent, {}) }) }, 'info-button'));
|
|
101
111
|
const renderIcon = () => {
|
|
102
112
|
let IdIcon;
|
|
@@ -109,14 +119,20 @@ const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletW
|
|
|
109
119
|
}
|
|
110
120
|
}
|
|
111
121
|
if (utils.isAndroid()) {
|
|
112
|
-
|
|
122
|
+
const androidVersion = utils.getAndroidVersion();
|
|
123
|
+
if (androidVersion && androidVersion >= 9) {
|
|
124
|
+
IdIcon = jsxRuntime.jsx(androidTouchId.ReactComponent, { "data-testid": 'android-9-icon' });
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
IdIcon = jsxRuntime.jsx(androidFaceId.ReactComponent, { "data-testid": 'android-icon' });
|
|
128
|
+
}
|
|
113
129
|
}
|
|
114
130
|
if (!IdIcon) {
|
|
115
131
|
return;
|
|
116
132
|
}
|
|
117
133
|
return jsxRuntime.jsx(Icon.Icon, { size: 'small', children: IdIcon });
|
|
118
134
|
};
|
|
119
|
-
return (jsxRuntime.jsxs("div", { className: 'passkey-intro-modal-wrapper', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: infoIconButton,
|
|
135
|
+
return (jsxRuntime.jsxs("div", { className: 'passkey-intro-modal-wrapper', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: infoIconButton, children: jsxRuntime.jsx("div", { className: 'passkey-intro-view__header', children: jsxRuntime.jsx(passkeyIntroIcon.ReactComponent, {}) }) }), jsxRuntime.jsx("div", { className: 'passkey-intro-view', children: jsxRuntime.jsxs("div", { className: 'passkey-intro-view__content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'passkey-intro-view__title', children: t('dyn_passkey_intro.title') }), 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, { buttonPadding: 'large', onClick: () => createEmbeddedWalletWithPasskeyMutation(), dataTestId: 'setup-passkey-button', loading: isLoading, disabled: isLoading || !passkeyEnabled, children: jsxRuntime.jsxs("div", { className: 'passkey-intro-view__inline-button', children: [renderIcon(), 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') })] })] }) })] }));
|
|
120
136
|
};
|
|
121
137
|
|
|
122
138
|
exports.PasskeyIntroView = PasskeyIntroView;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { useMemo } from 'react';
|
|
3
|
+
import { useEffect, useMemo } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { DynamicError, isIPhone, isIPhone8OrEarlier, isAndroid } from '@dynamic-labs/utils';
|
|
5
|
+
import { DynamicError, isIPhone, isIPhone8OrEarlier, isAndroid, getAndroidVersion } from '@dynamic-labs/utils';
|
|
6
6
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
7
7
|
import { Typography } from '../../components/Typography/Typography.js';
|
|
8
8
|
import '@dynamic-labs/sdk-api';
|
|
9
|
-
import '../../shared/logger.js';
|
|
9
|
+
import { logger } from '../../shared/logger.js';
|
|
10
10
|
import '@dynamic-labs/iconic';
|
|
11
11
|
import '@dynamic-labs/wallet-connector-core';
|
|
12
12
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
13
|
-
import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
|
|
14
13
|
import { ReactComponent as SvgFooterInfoIcon } from '../../shared/assets/footer-info-icon.js';
|
|
15
14
|
import { ReactComponent as SvgPasskeyIntroIcon } from '../../shared/assets/passkey-intro-icon.js';
|
|
16
15
|
import { ReactComponent as SvgAndroidFaceId } from '../../shared/assets/android-face-id.js';
|
|
16
|
+
import { ReactComponent as SvgAndroidTouchId } from '../../shared/assets/android-touch-id.js';
|
|
17
17
|
import { ReactComponent as SvgIphoneFaceId } from '../../shared/assets/iphone-face-id.js';
|
|
18
18
|
import { ReactComponent as SvgIphoneTouchId } from '../../shared/assets/iphone-touch-id.js';
|
|
19
19
|
import '@dynamic-labs/wallet-book';
|
|
20
|
+
import { LAST_USED_WALLET } from '../../utils/constants/localStorage.js';
|
|
20
21
|
import '../../utils/constants/colors.js';
|
|
21
|
-
import '../../shared/utils/classes/storage/localStorage.js';
|
|
22
|
+
import { LocalStorage } from '../../shared/utils/classes/storage/localStorage.js';
|
|
22
23
|
import 'viem';
|
|
23
24
|
import '../../shared/consts/index.js';
|
|
24
25
|
import { storeAuthToken } from '../../utils/functions/storeAuthToken/index.js';
|
|
@@ -54,6 +55,7 @@ import { useMutation } from '../../utils/hooks/useMutation/useMutation.js';
|
|
|
54
55
|
import '@dynamic-labs/types';
|
|
55
56
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
56
57
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
58
|
+
import { TextButton } from '../../components/TextButton/TextButton.js';
|
|
57
59
|
import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
|
|
58
60
|
import '../../components/Popper/Popper/Popper.js';
|
|
59
61
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
@@ -66,11 +68,14 @@ import { createEmbeddedWalletWithPasskey } from './utils/createEmbeddedWalletWit
|
|
|
66
68
|
import { findPasskeyEmailWalletConnector } from './utils/findPasskeyEmailWalletConnector/findPasskeyEmailWalletConnector.js';
|
|
67
69
|
|
|
68
70
|
const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletWithPasskey, }) => {
|
|
69
|
-
const {
|
|
71
|
+
const { user, wallets, setPrimaryWalletId, setUser, authToken, environmentId, handleLogOut, internalEvents, } = useInternalDynamicContext();
|
|
70
72
|
const { setView } = useViewContext();
|
|
71
73
|
const { setIsFooterExpanded } = useFooterAnimationContext();
|
|
72
74
|
const { t } = useTranslation();
|
|
73
75
|
const { data: passkeyEnabled } = usePromise(isPasskeyEnabled);
|
|
76
|
+
// if passkey is not yet setup, but user logged in with email in a passkey env
|
|
77
|
+
// it should be null to force user to setup passkey even after the a refresh
|
|
78
|
+
useEffect(() => LocalStorage.removeFromLS(LAST_USED_WALLET), []);
|
|
74
79
|
const { mutate: createEmbeddedWalletWithPasskeyMutation, isLoading, error, } = useMutation(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
80
|
const { embeddedWalletVerifiedCredentialId, jwt, decodedJwt } = yield createEmbeddedWalletMutation({
|
|
76
81
|
authToken,
|
|
@@ -78,11 +83,17 @@ const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletW
|
|
|
78
83
|
user,
|
|
79
84
|
walletConnector: findPasskeyEmailWalletConnector(wallets),
|
|
80
85
|
});
|
|
86
|
+
internalEvents.current.emit('embeddedWalletCreated', embeddedWalletVerifiedCredentialId);
|
|
81
87
|
setPrimaryWalletId(embeddedWalletVerifiedCredentialId);
|
|
82
88
|
storeAuthToken(jwt);
|
|
83
89
|
setUser(createUserProfile(decodedJwt));
|
|
84
90
|
setView('passkey-success');
|
|
85
|
-
})
|
|
91
|
+
}), {
|
|
92
|
+
onFailure: (err) => {
|
|
93
|
+
logger.error('Failed to create embedded wallet', err);
|
|
94
|
+
internalEvents.current.emit('embeddedWalletFailed', err);
|
|
95
|
+
},
|
|
96
|
+
});
|
|
86
97
|
const errorText = useMemo(() => {
|
|
87
98
|
if (!error) {
|
|
88
99
|
return undefined;
|
|
@@ -92,7 +103,6 @@ const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletW
|
|
|
92
103
|
}
|
|
93
104
|
return 'Something went wrong.';
|
|
94
105
|
}, [error]);
|
|
95
|
-
const closeButton = (jsx(IconButton, { type: 'button', "data-testid": 'close-button', onClick: () => setShowAuthFlow(false), children: jsx(SvgClose, {}) }));
|
|
96
106
|
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(SvgFooterInfoIcon, {}) }) }, 'info-button'));
|
|
97
107
|
const renderIcon = () => {
|
|
98
108
|
let IdIcon;
|
|
@@ -105,14 +115,20 @@ const PasskeyIntroView = ({ createEmbeddedWalletMutation = createEmbeddedWalletW
|
|
|
105
115
|
}
|
|
106
116
|
}
|
|
107
117
|
if (isAndroid()) {
|
|
108
|
-
|
|
118
|
+
const androidVersion = getAndroidVersion();
|
|
119
|
+
if (androidVersion && androidVersion >= 9) {
|
|
120
|
+
IdIcon = jsx(SvgAndroidTouchId, { "data-testid": 'android-9-icon' });
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
IdIcon = jsx(SvgAndroidFaceId, { "data-testid": 'android-icon' });
|
|
124
|
+
}
|
|
109
125
|
}
|
|
110
126
|
if (!IdIcon) {
|
|
111
127
|
return;
|
|
112
128
|
}
|
|
113
129
|
return jsx(Icon, { size: 'small', children: IdIcon });
|
|
114
130
|
};
|
|
115
|
-
return (jsxs("div", { className: 'passkey-intro-modal-wrapper', children: [jsx(ModalHeader, { leading: infoIconButton,
|
|
131
|
+
return (jsxs("div", { className: 'passkey-intro-modal-wrapper', children: [jsx(ModalHeader, { leading: infoIconButton, children: jsx("div", { className: 'passkey-intro-view__header', children: jsx(SvgPasskeyIntroIcon, {}) }) }), jsx("div", { className: 'passkey-intro-view', children: jsxs("div", { className: 'passkey-intro-view__content', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'passkey-intro-view__title', children: t('dyn_passkey_intro.title') }), 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, { buttonPadding: 'large', onClick: () => createEmbeddedWalletWithPasskeyMutation(), dataTestId: 'setup-passkey-button', loading: isLoading, disabled: isLoading || !passkeyEnabled, children: jsxs("div", { className: 'passkey-intro-view__inline-button', children: [renderIcon(), 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') })] })] }) })] }));
|
|
116
132
|
};
|
|
117
133
|
|
|
118
134
|
export { PasskeyIntroView };
|
|
@@ -32,6 +32,7 @@ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetu
|
|
|
32
32
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
33
33
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
34
34
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
35
|
+
require('react-i18next');
|
|
35
36
|
require('../../components/IconButton/IconButton.cjs');
|
|
36
37
|
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
37
38
|
var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
@@ -28,6 +28,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
28
28
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
29
29
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
30
30
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
31
|
+
import 'react-i18next';
|
|
31
32
|
import '../../components/IconButton/IconButton.js';
|
|
32
33
|
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
33
34
|
import { IconWithSpinner, iconRatio } from '../../components/IconWithSpinner/IconWithSpinner.js';
|
|
@@ -35,6 +35,7 @@ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetu
|
|
|
35
35
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
36
36
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
37
37
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
38
|
+
require('react-i18next');
|
|
38
39
|
require('../../components/IconButton/IconButton.cjs');
|
|
39
40
|
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
40
41
|
var Button = require('../../components/Button/Button.cjs');
|
|
@@ -31,6 +31,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
31
31
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
32
32
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
33
33
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
34
|
+
import 'react-i18next';
|
|
34
35
|
import '../../components/IconButton/IconButton.js';
|
|
35
36
|
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
36
37
|
import { Button } from '../../components/Button/Button.js';
|
|
@@ -27,6 +27,7 @@ require('../../context/ErrorContext/ErrorContext.cjs');
|
|
|
27
27
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
28
28
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
29
29
|
require('react-dom');
|
|
30
|
+
require('react-i18next');
|
|
30
31
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
31
32
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
32
33
|
require('react-focus-lock');
|
|
@@ -23,6 +23,7 @@ import '../../context/ErrorContext/ErrorContext.js';
|
|
|
23
23
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
24
24
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
25
25
|
import 'react-dom';
|
|
26
|
+
import 'react-i18next';
|
|
26
27
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
27
28
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
28
29
|
import 'react-focus-lock';
|
|
@@ -36,6 +36,7 @@ require('../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsS
|
|
|
36
36
|
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
37
37
|
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
38
38
|
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
39
|
+
require('react-i18next');
|
|
39
40
|
require('../../../components/IconButton/IconButton.cjs');
|
|
40
41
|
require('../../../components/Alert/Alert.cjs');
|
|
41
42
|
require('formik');
|
|
@@ -32,6 +32,7 @@ import '../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSe
|
|
|
32
32
|
import '../../../context/ErrorContext/ErrorContext.js';
|
|
33
33
|
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
34
34
|
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
35
|
+
import 'react-i18next';
|
|
35
36
|
import '../../../components/IconButton/IconButton.js';
|
|
36
37
|
import '../../../components/Alert/Alert.js';
|
|
37
38
|
import 'formik';
|
|
@@ -31,6 +31,7 @@ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetu
|
|
|
31
31
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
32
32
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
33
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
34
|
+
require('react-i18next');
|
|
34
35
|
require('../../components/IconButton/IconButton.cjs');
|
|
35
36
|
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
36
37
|
require('../../components/Alert/Alert.cjs');
|
|
@@ -27,6 +27,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
27
27
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
28
28
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
29
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
30
|
+
import 'react-i18next';
|
|
30
31
|
import '../../components/IconButton/IconButton.js';
|
|
31
32
|
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
32
33
|
import '../../components/Alert/Alert.js';
|
|
@@ -27,6 +27,7 @@ require('../../context/ErrorContext/ErrorContext.cjs');
|
|
|
27
27
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
28
28
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
29
29
|
require('react-dom');
|
|
30
|
+
require('react-i18next');
|
|
30
31
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
31
32
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
32
33
|
var Icon = require('../../components/Icon/Icon.cjs');
|
|
@@ -23,6 +23,7 @@ import '../../context/ErrorContext/ErrorContext.js';
|
|
|
23
23
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
24
24
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
25
25
|
import 'react-dom';
|
|
26
|
+
import 'react-i18next';
|
|
26
27
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
27
28
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
28
29
|
import { Icon } from '../../components/Icon/Icon.js';
|
|
@@ -27,6 +27,7 @@ require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
|
27
27
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
28
28
|
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
29
29
|
require('react-dom');
|
|
30
|
+
require('react-i18next');
|
|
30
31
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
31
32
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
32
33
|
require('react-focus-lock');
|
|
@@ -23,6 +23,7 @@ import '../../../../context/ErrorContext/ErrorContext.js';
|
|
|
23
23
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
24
24
|
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
25
25
|
import 'react-dom';
|
|
26
|
+
import 'react-i18next';
|
|
26
27
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
27
28
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
28
29
|
import 'react-focus-lock';
|
|
@@ -32,6 +32,7 @@ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetu
|
|
|
32
32
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
33
33
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
34
34
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
35
|
+
require('react-i18next');
|
|
35
36
|
require('../../components/IconButton/IconButton.cjs');
|
|
36
37
|
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
37
38
|
var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
@@ -28,6 +28,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
28
28
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
29
29
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
30
30
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
31
|
+
import 'react-i18next';
|
|
31
32
|
import '../../components/IconButton/IconButton.js';
|
|
32
33
|
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
33
34
|
import { IconWithSpinner } from '../../components/IconWithSpinner/IconWithSpinner.js';
|
|
@@ -32,6 +32,7 @@ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetu
|
|
|
32
32
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
33
33
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
34
34
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
35
|
+
require('react-i18next');
|
|
35
36
|
require('../../components/IconButton/IconButton.cjs');
|
|
36
37
|
var Button = require('../../components/Button/Button.cjs');
|
|
37
38
|
var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
@@ -28,6 +28,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
28
28
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
29
29
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
30
30
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
31
|
+
import 'react-i18next';
|
|
31
32
|
import '../../components/IconButton/IconButton.js';
|
|
32
33
|
import { Button } from '../../components/Button/Button.js';
|
|
33
34
|
import { IconWithSpinner } from '../../components/IconWithSpinner/IconWithSpinner.js';
|
|
@@ -29,6 +29,7 @@ require('../../context/ErrorContext/ErrorContext.cjs');
|
|
|
29
29
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
30
30
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
31
31
|
require('react-dom');
|
|
32
|
+
require('react-i18next');
|
|
32
33
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
33
34
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
34
35
|
var Icon = require('../../components/Icon/Icon.cjs');
|
|
@@ -25,6 +25,7 @@ import '../../context/ErrorContext/ErrorContext.js';
|
|
|
25
25
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
26
26
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
27
27
|
import 'react-dom';
|
|
28
|
+
import 'react-i18next';
|
|
28
29
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
29
30
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
30
31
|
import { Icon } from '../../components/Icon/Icon.js';
|
package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs
CHANGED
|
@@ -25,6 +25,7 @@ require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
|
25
25
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
26
26
|
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
27
27
|
require('react-dom');
|
|
28
|
+
require('react-i18next');
|
|
28
29
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
29
30
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
30
31
|
require('react-focus-lock');
|
package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js
CHANGED
|
@@ -21,6 +21,7 @@ import '../../../../context/ErrorContext/ErrorContext.js';
|
|
|
21
21
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
22
22
|
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
23
23
|
import 'react-dom';
|
|
24
|
+
import 'react-i18next';
|
|
24
25
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
25
26
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
26
27
|
import 'react-focus-lock';
|
|
@@ -33,6 +33,7 @@ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetu
|
|
|
33
33
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
34
34
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
35
35
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
36
|
+
require('react-i18next');
|
|
36
37
|
var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
|
|
37
38
|
var IconButton = require('../../components/IconButton/IconButton.cjs');
|
|
38
39
|
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
@@ -29,6 +29,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
29
29
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
30
30
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
31
31
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
32
|
+
import 'react-i18next';
|
|
32
33
|
import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
|
|
33
34
|
import { IconButton } from '../../components/IconButton/IconButton.js';
|
|
34
35
|
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
@@ -32,6 +32,7 @@ require('../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsS
|
|
|
32
32
|
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
33
33
|
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
34
34
|
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
35
|
+
require('react-i18next');
|
|
35
36
|
require('../../../components/IconButton/IconButton.cjs');
|
|
36
37
|
require('../../../components/Alert/Alert.cjs');
|
|
37
38
|
require('formik');
|
|
@@ -28,6 +28,7 @@ import '../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSe
|
|
|
28
28
|
import '../../../context/ErrorContext/ErrorContext.js';
|
|
29
29
|
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
30
30
|
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
31
|
+
import 'react-i18next';
|
|
31
32
|
import '../../../components/IconButton/IconButton.js';
|
|
32
33
|
import '../../../components/Alert/Alert.js';
|
|
33
34
|
import 'formik';
|
|
@@ -33,22 +33,24 @@ var WalletListItem = require('./WalletListItem/WalletListItem.cjs');
|
|
|
33
33
|
localStorage.LocalStorage.setToLS(localStorage$1.WALLET_PICKER_SEARCH_KEY, '');
|
|
34
34
|
const WalletList = ({ isWalletConnectList = false, }) => {
|
|
35
35
|
var _a;
|
|
36
|
-
const { walletsFilter, signWithEmailWalletName, user, wallets, projectSettings, defaultNumberOfWalletsToShow, walletsToConnectByChain, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
36
|
+
const { walletsFilter, signWithEmailWalletName, user, wallets, projectSettings, defaultNumberOfWalletsToShow, walletsToConnectByChain, connectedWallets, authMode, multiWallet, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
37
37
|
const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
|
|
38
38
|
const { error } = ErrorContext.useErrorContext();
|
|
39
39
|
const { view } = ViewContext.useViewContext();
|
|
40
40
|
const { mockedSDK } = MockContext.useMockContext();
|
|
41
|
-
const isUsingMultiWallet = Boolean(localStorage.LocalStorage.getFromLS(localStorage$1.AUTH_USER));
|
|
42
41
|
const [filterValue, setFilterValue] = React.useState((_a = localStorage.LocalStorage.getFromLS(localStorage$1.WALLET_PICKER_SEARCH_KEY)) !== null && _a !== void 0 ? _a : '');
|
|
43
42
|
const [footerIsVisible, setFooterIsVisibile] = React.useState(false);
|
|
44
43
|
const getFilteredWalletsByChain = (walletsToConnectByChain === null || walletsToConnectByChain === void 0 ? void 0 : walletsToConnectByChain.length) &&
|
|
45
44
|
index.FilterWalletsByChainName(walletsToConnectByChain[0].chain);
|
|
46
45
|
const filteredWalletsByChain = getFilteredWalletsByChain && getFilteredWalletsByChain(wallets);
|
|
47
46
|
const { numberOfWallets, walletsList } = walletListBuilder.walletListBuilder({
|
|
47
|
+
authMode,
|
|
48
|
+
connectedWallets,
|
|
48
49
|
groupWallets: true,
|
|
49
50
|
inputList: filteredWalletsByChain || wallets,
|
|
50
51
|
isWalletConnectList,
|
|
51
52
|
lastUsedWalletName: localStorage.LocalStorage.getFromLS(localStorage$1.LAST_USED_WALLET),
|
|
53
|
+
multiWallet,
|
|
52
54
|
numberOfWalletsToShow: defaultNumberOfWalletsToShow,
|
|
53
55
|
searchFilter: filterValue,
|
|
54
56
|
signWithEmailWalletName,
|
|
@@ -78,7 +80,7 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
78
80
|
};
|
|
79
81
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'wallet-list__container', children: [error && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: error }), !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'wallet-list__search-skeleton' })) : (isSearchEnabled && (jsxRuntime.jsx(Search.Search, { label: `Search through ${numberOfWallets} wallets...`, value: filterValue, onChange: ({ target: { value } }) => handleFilterValueChange(value), onClickClear: () => handleFilterValueChange('') }))), jsxRuntime.jsxs("div", { className: classNames.classNames('wallet-list__scroll-container', {
|
|
80
82
|
'wallet-list__scroll-container--full-height': isSearchEnabled,
|
|
81
|
-
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [wallets.length === 0 && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: "Oops, no login methods have been configured." })), wallets.length && walletsList.length === 0 ? (jsxRuntime.jsx(SearchNotFoundMessage.SearchNotFoundMessage, { title: 'No wallet found.', subtitle: 'Try searching for a different wallet', image: jsxRuntime.jsx(noWalletFound.ReactComponent, {}) })) : (walletsList.map((wallet) => (jsxRuntime.jsx(WalletListItem.WalletListItem, { wallet: wallet, usingMultiWallet:
|
|
83
|
+
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [wallets.length === 0 && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: "Oops, no login methods have been configured." })), wallets.length && walletsList.length === 0 ? (jsxRuntime.jsx(SearchNotFoundMessage.SearchNotFoundMessage, { title: 'No wallet found.', subtitle: 'Try searching for a different wallet', image: jsxRuntime.jsx(noWalletFound.ReactComponent, {}) })) : (walletsList.map((wallet) => (jsxRuntime.jsx(WalletListItem.WalletListItem, { wallet: wallet, usingMultiWallet: multiWallet, onResetSearchValue: () => handleFilterValueChange('') }, wallet.key))))] })), isSearchEnabled && !filterValue && projectSettings && (jsxRuntime.jsx(SearchNotFoundMessage.SearchNotFoundMessage, {}))] })] }), noDefaultFooter && (jsxRuntime.jsx("div", { className: classNames.classNames('wallet-list__tiny-footer', {
|
|
82
84
|
'wallet-list__tiny-footer--hidden': footerIsVisible,
|
|
83
85
|
}), "data-testid": 'wallet-list-tiny-footer' }))] }));
|
|
84
86
|
};
|
|
@@ -5,7 +5,7 @@ import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.j
|
|
|
5
5
|
import { Search } from '../../components/Search/Search.js';
|
|
6
6
|
import { Skeleton } from '../../components/Skeleton/Skeleton.js';
|
|
7
7
|
import { useErrorContext } from '../../context/ErrorContext/ErrorContext.js';
|
|
8
|
-
import { WALLET_PICKER_SEARCH_KEY,
|
|
8
|
+
import { WALLET_PICKER_SEARCH_KEY, LAST_USED_WALLET } from '../../utils/constants/localStorage.js';
|
|
9
9
|
import '../../utils/constants/colors.js';
|
|
10
10
|
import { walletListBuilder } from '../../utils/functions/walletListBuilder/walletListBuilder.js';
|
|
11
11
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
@@ -29,22 +29,24 @@ import { WalletListItem } from './WalletListItem/WalletListItem.js';
|
|
|
29
29
|
LocalStorage.setToLS(WALLET_PICKER_SEARCH_KEY, '');
|
|
30
30
|
const WalletList = ({ isWalletConnectList = false, }) => {
|
|
31
31
|
var _a;
|
|
32
|
-
const { walletsFilter, signWithEmailWalletName, user, wallets, projectSettings, defaultNumberOfWalletsToShow, walletsToConnectByChain, } = useInternalDynamicContext();
|
|
32
|
+
const { walletsFilter, signWithEmailWalletName, user, wallets, projectSettings, defaultNumberOfWalletsToShow, walletsToConnectByChain, connectedWallets, authMode, multiWallet, } = useInternalDynamicContext();
|
|
33
33
|
const { walletBook } = useWalletBookContext();
|
|
34
34
|
const { error } = useErrorContext();
|
|
35
35
|
const { view } = useViewContext();
|
|
36
36
|
const { mockedSDK } = useMockContext();
|
|
37
|
-
const isUsingMultiWallet = Boolean(LocalStorage.getFromLS(AUTH_USER));
|
|
38
37
|
const [filterValue, setFilterValue] = useState((_a = LocalStorage.getFromLS(WALLET_PICKER_SEARCH_KEY)) !== null && _a !== void 0 ? _a : '');
|
|
39
38
|
const [footerIsVisible, setFooterIsVisibile] = useState(false);
|
|
40
39
|
const getFilteredWalletsByChain = (walletsToConnectByChain === null || walletsToConnectByChain === void 0 ? void 0 : walletsToConnectByChain.length) &&
|
|
41
40
|
FilterWalletsByChainName(walletsToConnectByChain[0].chain);
|
|
42
41
|
const filteredWalletsByChain = getFilteredWalletsByChain && getFilteredWalletsByChain(wallets);
|
|
43
42
|
const { numberOfWallets, walletsList } = walletListBuilder({
|
|
43
|
+
authMode,
|
|
44
|
+
connectedWallets,
|
|
44
45
|
groupWallets: true,
|
|
45
46
|
inputList: filteredWalletsByChain || wallets,
|
|
46
47
|
isWalletConnectList,
|
|
47
48
|
lastUsedWalletName: LocalStorage.getFromLS(LAST_USED_WALLET),
|
|
49
|
+
multiWallet,
|
|
48
50
|
numberOfWalletsToShow: defaultNumberOfWalletsToShow,
|
|
49
51
|
searchFilter: filterValue,
|
|
50
52
|
signWithEmailWalletName,
|
|
@@ -74,7 +76,7 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
74
76
|
};
|
|
75
77
|
return (jsxs(Fragment, { children: [jsxs("div", { className: 'wallet-list__container', children: [error && jsx(ErrorContainer, { children: error }), !projectSettings ? (jsx(Skeleton, { className: 'wallet-list__search-skeleton' })) : (isSearchEnabled && (jsx(Search, { label: `Search through ${numberOfWallets} wallets...`, value: filterValue, onChange: ({ target: { value } }) => handleFilterValueChange(value), onClickClear: () => handleFilterValueChange('') }))), jsxs("div", { className: classNames('wallet-list__scroll-container', {
|
|
76
78
|
'wallet-list__scroll-container--full-height': isSearchEnabled,
|
|
77
|
-
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsx(Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxs(Fragment, { children: [wallets.length === 0 && (jsx(ErrorContainer, { children: "Oops, no login methods have been configured." })), wallets.length && walletsList.length === 0 ? (jsx(SearchNotFoundMessage, { title: 'No wallet found.', subtitle: 'Try searching for a different wallet', image: jsx(SvgNoWalletFound, {}) })) : (walletsList.map((wallet) => (jsx(WalletListItem, { wallet: wallet, usingMultiWallet:
|
|
79
|
+
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsx(Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxs(Fragment, { children: [wallets.length === 0 && (jsx(ErrorContainer, { children: "Oops, no login methods have been configured." })), wallets.length && walletsList.length === 0 ? (jsx(SearchNotFoundMessage, { title: 'No wallet found.', subtitle: 'Try searching for a different wallet', image: jsx(SvgNoWalletFound, {}) })) : (walletsList.map((wallet) => (jsx(WalletListItem, { wallet: wallet, usingMultiWallet: multiWallet, onResetSearchValue: () => handleFilterValueChange('') }, wallet.key))))] })), isSearchEnabled && !filterValue && projectSettings && (jsx(SearchNotFoundMessage, {}))] })] }), noDefaultFooter && (jsx("div", { className: classNames('wallet-list__tiny-footer', {
|
|
78
80
|
'wallet-list__tiny-footer--hidden': footerIsVisible,
|
|
79
81
|
}), "data-testid": 'wallet-list-tiny-footer' }))] }));
|
|
80
82
|
};
|
|
@@ -36,6 +36,7 @@ require('../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsS
|
|
|
36
36
|
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
37
37
|
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
38
38
|
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
39
|
+
require('react-i18next');
|
|
39
40
|
require('../../../components/IconButton/IconButton.cjs');
|
|
40
41
|
require('../../../components/Alert/Alert.cjs');
|
|
41
42
|
require('formik');
|
|
@@ -32,6 +32,7 @@ import '../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSe
|
|
|
32
32
|
import '../../../context/ErrorContext/ErrorContext.js';
|
|
33
33
|
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
34
34
|
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
35
|
+
import 'react-i18next';
|
|
35
36
|
import '../../../components/IconButton/IconButton.js';
|
|
36
37
|
import '../../../components/Alert/Alert.js';
|
|
37
38
|
import 'formik';
|