@dynamic-labs/sdk-react-core 0.18.0-RC.10 → 0.18.0-RC.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.d.ts +1 -0
- package/src/index.js +2 -0
- package/src/lib/Main.cjs +3 -2
- package/src/lib/Main.js +3 -2
- package/src/lib/assets/index.d.ts +1 -0
- package/src/lib/assets/no-wallet-found.cjs +75 -0
- package/src/lib/assets/no-wallet-found.js +51 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -0
- package/src/lib/components/Divider/Divider.cjs +1 -0
- package/src/lib/components/Divider/Divider.js +1 -0
- package/src/lib/components/InlineWidget/InlineWidget.cjs +12 -0
- package/src/lib/components/InlineWidget/InlineWidget.d.ts +7 -0
- package/src/lib/components/InlineWidget/InlineWidget.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.cjs +12 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.d.ts +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/components/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/index.d.ts +2 -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/ActionList/ActionList.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.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/Step/Step.cjs +23 -2
- package/src/lib/components/Step/Step.d.ts +2 -3
- package/src/lib/components/Step/Step.js +24 -3
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
- package/src/lib/components/Tooltip/Tooltip.js +1 -0
- package/src/lib/components/TosAndPp/TosAndPp.cjs +18 -3
- package/src/lib/components/TosAndPp/TosAndPp.d.ts +1 -6
- package/src/lib/components/TosAndPp/TosAndPp.js +19 -4
- 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/WalletInformationCard/WalletInformationCard.cjs +33 -0
- package/src/lib/components/WalletInformationCard/WalletInformationCard.d.ts +11 -0
- package/src/lib/components/WalletInformationCard/WalletInformationCard.js +29 -0
- package/src/lib/components/WalletInformationCard/index.d.ts +1 -0
- package/src/lib/components/index.d.ts +2 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +10 -9
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +5 -1
- package/src/lib/context/DynamicContext/DynamicContext.js +10 -9
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.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/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +4 -2
- package/src/lib/context/WalletContext/WalletContext.d.ts +3 -1
- package/src/lib/context/WalletContext/WalletContext.js +4 -2
- package/src/lib/data/api.cjs +3 -0
- package/src/lib/data/api.js +4 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -0
- 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 +5 -3
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +5 -3
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +5 -4
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +5 -4
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.cjs +18 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.d.ts +3 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.js +14 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/utils/index.d.ts +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 +3 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +3 -2
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.cjs +12 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.d.ts +3 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.js +8 -0
- package/src/lib/utils/functions/index.d.ts +1 -0
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +8 -8
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +8 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -2
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -16
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -16
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +13 -3
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +5 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +13 -3
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +8 -4
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +8 -4
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +14 -27
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +15 -28
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +4 -3
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +4 -3
- package/src/lib/utils/hooks/useDynamicScopes/index.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +40 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.d.ts +6 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +36 -0
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +4 -3
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +4 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +6 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +7 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +20 -3
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +3 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +20 -3
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +17 -12
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +17 -12
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +2 -2
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +2 -2
- 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 +2 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +2 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -0
- 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 +2 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +2 -1
- 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 +5 -4
- package/src/lib/views/EmailVerification/EmailVerification.js +5 -4
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +4 -3
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +4 -3
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +6 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +6 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +12 -20
- package/src/lib/views/NoAccess/NoAccess.js +12 -20
- package/src/lib/views/NoAccess/useNoAccessText.cjs +93 -0
- package/src/lib/views/NoAccess/useNoAccessText.d.ts +31 -0
- package/src/lib/views/NoAccess/useNoAccessText.js +88 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
- package/src/lib/views/QrCodeView/QRCode.cjs +1 -0
- package/src/lib/views/QrCodeView/QRCode.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
- package/src/lib/views/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/useTransactionData/useTransactionData.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +1 -0
- package/src/lib/views/WalletList/{SearchInstead/SearchInstead.cjs → SearchNotFoundMessage/SearchNotFoundMessage.cjs} +3 -2
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.d.ts +8 -0
- package/src/lib/views/WalletList/{SearchInstead/SearchInstead.js → SearchNotFoundMessage/SearchNotFoundMessage.js} +3 -2
- package/src/lib/views/WalletList/SearchNotFoundMessage/index.d.ts +1 -0
- package/src/lib/views/WalletList/WalletList.cjs +3 -2
- package/src/lib/views/WalletList/WalletList.js +3 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +2 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +2 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
- package/src/lib/views/viewToComponentMap.cjs +1 -0
- package/src/lib/views/viewToComponentMap.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +16 -7
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +2 -4
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +17 -8
- 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 +28 -8
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +29 -9
- 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 +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -0
- 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 +2 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -0
- 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 +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +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
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.d.ts +0 -2
- package/src/lib/views/WalletList/SearchInstead/index.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs +0 -17
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.d.ts +0 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js +0 -9
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.cjs +0 -57
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.d.ts +0 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.js +0 -53
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/index.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.cjs +0 -58
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.d.ts +0 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.js +0 -54
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/index.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { isSocialWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
-
import { DynamicError, WalletUsedError, ChainalysisError, NoAccessError } from '@dynamic-labs/utils';
|
|
3
|
+
import { DynamicError, WalletUsedError, ChainalysisError, GateBlockedError, NoAccessError } from '@dynamic-labs/utils';
|
|
4
4
|
import { verifyWallet, linkWallet } from '../../../data/api.js';
|
|
5
5
|
import { storeAuthToken } from '../../functions/storeAuthToken/index.js';
|
|
6
6
|
import '@dynamic-labs/multi-wallet';
|
|
@@ -99,9 +99,15 @@ const useVerifyWallet = ({ consumeNonce, displayTermsOfService, environmentId, p
|
|
|
99
99
|
}
|
|
100
100
|
walletConnector.endSession();
|
|
101
101
|
if (e instanceof ChainalysisError) {
|
|
102
|
+
setDeniedAddress(address);
|
|
102
103
|
setView('chainalysis-blocked-wallet');
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
106
|
+
if (e instanceof GateBlockedError) {
|
|
107
|
+
setDeniedAddress(address);
|
|
108
|
+
setView('gate-blocked-wallet');
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
105
111
|
if (e instanceof NoAccessError) {
|
|
106
112
|
setDeniedAddress(address);
|
|
107
113
|
// we need to set this value if it's magic in order to set proper icon
|
|
@@ -18,7 +18,7 @@ require('ethers');
|
|
|
18
18
|
require('../../../shared/consts/index.cjs');
|
|
19
19
|
|
|
20
20
|
const orderedSecondaryWalletAddresses = (wallets) => wallets.map((wallet) => wallet.address).sort();
|
|
21
|
-
const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnector, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, connectWalletByAddressAndChain, }) => {
|
|
21
|
+
const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnector, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, connectWalletByAddressAndChain, authMode, }) => {
|
|
22
22
|
const [loadingNetwork, setLoadingNetwork] = React.useState(true);
|
|
23
23
|
const [network, setNetwork] = React.useState(undefined);
|
|
24
24
|
React.useEffect(() => {
|
|
@@ -95,6 +95,10 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
95
95
|
onAccountChange: (accounts) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
96
96
|
const [newAddress] = accounts;
|
|
97
97
|
const newWallet = secondaryWallets.find((wallet) => walletConnectorCore.isSameAddress(wallet.address, newAddress, wallet.chain));
|
|
98
|
+
if (authMode === 'connect-only') {
|
|
99
|
+
connectWalletByAddressAndChain(primaryWallet.connector.name, newAddress, primaryWallet.chain);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
98
102
|
if (walletConnectorCore.isSameAddress(newAddress, primaryWallet.address, primaryWallet.chain)) {
|
|
99
103
|
setMultiWalletWidgetState('idle');
|
|
100
104
|
}
|
|
@@ -124,11 +128,17 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
124
128
|
yield computeConnectedStateForWallets();
|
|
125
129
|
}),
|
|
126
130
|
onChainChange: (chain) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
127
|
-
|
|
131
|
+
if (primaryWallet.chain === 'starknet') {
|
|
132
|
+
setNetwork(chain);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
setNetwork(parseInt(chain));
|
|
136
|
+
}
|
|
128
137
|
}),
|
|
129
138
|
onDisconnect: handleLogOut,
|
|
130
139
|
});
|
|
131
140
|
}, [
|
|
141
|
+
authMode,
|
|
132
142
|
primaryWallet,
|
|
133
143
|
setMultiWalletWidgetState,
|
|
134
144
|
multiWallet,
|
|
@@ -144,7 +154,12 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
144
154
|
]);
|
|
145
155
|
const addSecondaryWalletEventListeners = React.useCallback((seen) => {
|
|
146
156
|
const secondaryListeners = {
|
|
147
|
-
onAccountChange: () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
157
|
+
onAccountChange: (accounts) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
158
|
+
if (authMode === 'connect-only' && secondaryWallets.length) {
|
|
159
|
+
const [newAddress] = accounts;
|
|
160
|
+
connectWalletByAddressAndChain(secondaryWallets[0].connector.name, newAddress, secondaryWallets[0].chain);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
148
163
|
if (multiWalletWidgetState === 'awaiting_account_switch') {
|
|
149
164
|
handleAccountChangeWhenAwaitingAccountSwitch(false, (selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet.address) || '');
|
|
150
165
|
}
|
|
@@ -166,7 +181,9 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
166
181
|
wallet.connector.setupEventListeners(secondaryListeners);
|
|
167
182
|
}
|
|
168
183
|
}, [
|
|
184
|
+
authMode,
|
|
169
185
|
computeConnectedStateForWallets,
|
|
186
|
+
connectWalletByAddressAndChain,
|
|
170
187
|
selectedWalletConnector,
|
|
171
188
|
selectedWalletWithAction,
|
|
172
189
|
handleAccountChangeWhenAwaitingAccountSwitch,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Chain, WalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
-
import { MultiWalletWidgetState, UserProfile, Wallet, WalletWithAction } from '../../../shared';
|
|
3
|
+
import { AuthModeType, MultiWalletWidgetState, UserProfile, Wallet, WalletWithAction } from '../../../shared';
|
|
4
4
|
import { MultiWalletWidgetStateSetter } from '../multiWallet';
|
|
5
5
|
export type UseWalletEventListenersArgs = {
|
|
6
6
|
computeConnectedStateForWallets(): Promise<void>;
|
|
@@ -17,8 +17,9 @@ export type UseWalletEventListenersArgs = {
|
|
|
17
17
|
setSelectedWalletConnector(connector: WalletConnector | null): void;
|
|
18
18
|
setSelectedWalletWithAction(walletWithAction: WalletWithAction | null): void;
|
|
19
19
|
user: UserProfile | undefined;
|
|
20
|
+
authMode: AuthModeType;
|
|
20
21
|
};
|
|
21
|
-
export declare const useWalletEventListeners: ({ computeConnectedStateForWallets, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnector, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, connectWalletByAddressAndChain, }: UseWalletEventListenersArgs) => {
|
|
22
|
+
export declare const useWalletEventListeners: ({ computeConnectedStateForWallets, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnector, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, connectWalletByAddressAndChain, authMode, }: UseWalletEventListenersArgs) => {
|
|
22
23
|
loadingNetwork: boolean;
|
|
23
24
|
network: string | number | undefined;
|
|
24
25
|
setNetwork: import("react").Dispatch<import("react").SetStateAction<string | number | undefined>>;
|
|
@@ -14,7 +14,7 @@ import 'ethers';
|
|
|
14
14
|
import '../../../shared/consts/index.js';
|
|
15
15
|
|
|
16
16
|
const orderedSecondaryWalletAddresses = (wallets) => wallets.map((wallet) => wallet.address).sort();
|
|
17
|
-
const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnector, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, connectWalletByAddressAndChain, }) => {
|
|
17
|
+
const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnector, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, connectWalletByAddressAndChain, authMode, }) => {
|
|
18
18
|
const [loadingNetwork, setLoadingNetwork] = useState(true);
|
|
19
19
|
const [network, setNetwork] = useState(undefined);
|
|
20
20
|
useEffect(() => {
|
|
@@ -91,6 +91,10 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
91
91
|
onAccountChange: (accounts) => __awaiter(void 0, void 0, void 0, function* () {
|
|
92
92
|
const [newAddress] = accounts;
|
|
93
93
|
const newWallet = secondaryWallets.find((wallet) => isSameAddress(wallet.address, newAddress, wallet.chain));
|
|
94
|
+
if (authMode === 'connect-only') {
|
|
95
|
+
connectWalletByAddressAndChain(primaryWallet.connector.name, newAddress, primaryWallet.chain);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
94
98
|
if (isSameAddress(newAddress, primaryWallet.address, primaryWallet.chain)) {
|
|
95
99
|
setMultiWalletWidgetState('idle');
|
|
96
100
|
}
|
|
@@ -120,11 +124,17 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
120
124
|
yield computeConnectedStateForWallets();
|
|
121
125
|
}),
|
|
122
126
|
onChainChange: (chain) => __awaiter(void 0, void 0, void 0, function* () {
|
|
123
|
-
|
|
127
|
+
if (primaryWallet.chain === 'starknet') {
|
|
128
|
+
setNetwork(chain);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
setNetwork(parseInt(chain));
|
|
132
|
+
}
|
|
124
133
|
}),
|
|
125
134
|
onDisconnect: handleLogOut,
|
|
126
135
|
});
|
|
127
136
|
}, [
|
|
137
|
+
authMode,
|
|
128
138
|
primaryWallet,
|
|
129
139
|
setMultiWalletWidgetState,
|
|
130
140
|
multiWallet,
|
|
@@ -140,7 +150,12 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
140
150
|
]);
|
|
141
151
|
const addSecondaryWalletEventListeners = useCallback((seen) => {
|
|
142
152
|
const secondaryListeners = {
|
|
143
|
-
onAccountChange: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
153
|
+
onAccountChange: (accounts) => __awaiter(void 0, void 0, void 0, function* () {
|
|
154
|
+
if (authMode === 'connect-only' && secondaryWallets.length) {
|
|
155
|
+
const [newAddress] = accounts;
|
|
156
|
+
connectWalletByAddressAndChain(secondaryWallets[0].connector.name, newAddress, secondaryWallets[0].chain);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
144
159
|
if (multiWalletWidgetState === 'awaiting_account_switch') {
|
|
145
160
|
handleAccountChangeWhenAwaitingAccountSwitch(false, (selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet.address) || '');
|
|
146
161
|
}
|
|
@@ -162,7 +177,9 @@ const useWalletEventListeners = ({ computeConnectedStateForWallets, handleLogOut
|
|
|
162
177
|
wallet.connector.setupEventListeners(secondaryListeners);
|
|
163
178
|
}
|
|
164
179
|
}, [
|
|
180
|
+
authMode,
|
|
165
181
|
computeConnectedStateForWallets,
|
|
182
|
+
connectWalletByAddressAndChain,
|
|
166
183
|
selectedWalletConnector,
|
|
167
184
|
selectedWalletWithAction,
|
|
168
185
|
handleAccountChangeWhenAwaitingAccountSwitch,
|
|
@@ -42,6 +42,7 @@ require('../../../components/Popper/Popper/Popper.cjs');
|
|
|
42
42
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('formik');
|
|
44
44
|
require('yup');
|
|
45
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
45
46
|
|
|
46
47
|
const useWalletUiUtils = ({ appLogoUrl, appName, getAppOrigin, }) => {
|
|
47
48
|
const confirmationStateRef = React.useRef('enabled');
|
|
@@ -38,6 +38,7 @@ import '../../../components/Popper/Popper/Popper.js';
|
|
|
38
38
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'formik';
|
|
40
40
|
import 'yup';
|
|
41
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
41
42
|
|
|
42
43
|
const useWalletUiUtils = ({ appLogoUrl, appName, getAppOrigin, }) => {
|
|
43
44
|
const confirmationStateRef = useRef('enabled');
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
6
7
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
7
8
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
9
|
+
var ConnectedWalletsListLayout = require('../../layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs');
|
|
8
10
|
require('@dynamic-labs/sdk-api');
|
|
9
11
|
require('../../shared/logger.cjs');
|
|
10
12
|
var getChainIcon = require('../../shared/utils/functions/chain/getChainIcon.cjs');
|
|
@@ -13,27 +15,30 @@ require('@dynamic-labs/utils');
|
|
|
13
15
|
require('../../utils/constants/colors.cjs');
|
|
14
16
|
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
15
17
|
require('ethers');
|
|
16
|
-
require('react');
|
|
17
18
|
require('@dynamic-labs/iconic');
|
|
18
19
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
19
20
|
require('../../shared/consts/index.cjs');
|
|
20
|
-
var ConnectedWalletsListLayout = require('../../layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs');
|
|
21
21
|
var DynamicBridgeWalletCard = require('../../widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs');
|
|
22
22
|
var DynamicBridgeWalletCardBody = require('../../widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs');
|
|
23
|
-
var Balance = require('../../widgets/DynamicWidget/components/Balance/Balance.cjs');
|
|
24
23
|
var SecondaryWallets = require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
24
|
+
var Balance = require('../../widgets/DynamicWidget/components/Balance/Balance.cjs');
|
|
25
25
|
|
|
26
26
|
const BridgeSummaryView = () => {
|
|
27
|
-
const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
28
|
-
if (!primaryWallet) {
|
|
29
|
-
throw new Error('primaryWallet should be defined');
|
|
30
|
-
}
|
|
31
|
-
const PrimaryWalletChainIcon = getChainIcon.getChainIcon(primaryWallet.chain);
|
|
32
|
-
const primaryWalletChainInfo = walletConnectorCore.getChainInfo(primaryWallet.chain);
|
|
27
|
+
const { primaryWallet, setShowAuthFlow, appName, walletsByChain = [], } = useInternalDynamicContext.useInternalDynamicContext();
|
|
33
28
|
const onClickClose = () => setShowAuthFlow(false);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
const body = React.useMemo(() => {
|
|
30
|
+
const blockchainNames = walletsByChain.map(({ chain }) => { var _a; return (_a = walletConnectorCore.getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
31
|
+
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
32
|
+
return `Congratulations on connecting both your ${firstBlockchainName} and ${secondBlockchainName} wallets`;
|
|
33
|
+
}, [walletsByChain]);
|
|
34
|
+
const createPrimaryWalletCard = (wallet) => {
|
|
35
|
+
const PrimaryWalletChainIcon = getChainIcon.getChainIcon(wallet.chain);
|
|
36
|
+
const primaryWalletChainInfo = walletConnectorCore.getChainInfo(wallet.chain);
|
|
37
|
+
return (jsxRuntime.jsx(DynamicBridgeWalletCard.DynamicBridgeWalletCard, Object.assign({ networkIcon: jsxRuntime.jsx(PrimaryWalletChainIcon, {}), networkName: primaryWalletChainInfo === null || primaryWalletChainInfo === void 0 ? void 0 : primaryWalletChainInfo.displayName }, { children: jsxRuntime.jsx(DynamicBridgeWalletCardBody.DynamicBridgeWalletCardBody, { walletName: wallet.connector.name, walletAddress: wallet.address, walletBalance:
|
|
38
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
39
|
+
jsxRuntime.jsx(Balance.Balance, { address: wallet.address, connector: wallet.connector, network: wallet.chain }) }) })));
|
|
40
|
+
};
|
|
41
|
+
return (jsxRuntime.jsxs(ConnectedWalletsListLayout.ConnectedWalletsListLayout, Object.assign({ onClickClose: onClickClose, onClickAction: onClickClose, title: `Welcome to ${appName}`, body: body }, { children: [primaryWallet && createPrimaryWalletCard(primaryWallet), jsxRuntime.jsx(SecondaryWallets.MemoSecondaryWallets, { hideUnlinkAction: true })] })));
|
|
37
42
|
};
|
|
38
43
|
|
|
39
44
|
exports.BridgeSummaryView = BridgeSummaryView;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { getChainInfo } from '@dynamic-labs/wallet-connector-core';
|
|
3
4
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
5
|
+
import { ConnectedWalletsListLayout } from '../../layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js';
|
|
4
6
|
import '@dynamic-labs/sdk-api';
|
|
5
7
|
import '../../shared/logger.js';
|
|
6
8
|
import { getChainIcon } from '../../shared/utils/functions/chain/getChainIcon.js';
|
|
@@ -9,27 +11,30 @@ import '@dynamic-labs/utils';
|
|
|
9
11
|
import '../../utils/constants/colors.js';
|
|
10
12
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
11
13
|
import 'ethers';
|
|
12
|
-
import 'react';
|
|
13
14
|
import '@dynamic-labs/iconic';
|
|
14
15
|
import '../../context/ViewContext/ViewContext.js';
|
|
15
16
|
import '../../shared/consts/index.js';
|
|
16
|
-
import { ConnectedWalletsListLayout } from '../../layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js';
|
|
17
17
|
import { DynamicBridgeWalletCard } from '../../widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js';
|
|
18
18
|
import { DynamicBridgeWalletCardBody } from '../../widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js';
|
|
19
|
-
import { Balance } from '../../widgets/DynamicWidget/components/Balance/Balance.js';
|
|
20
19
|
import { MemoSecondaryWallets } from '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
20
|
+
import { Balance } from '../../widgets/DynamicWidget/components/Balance/Balance.js';
|
|
21
21
|
|
|
22
22
|
const BridgeSummaryView = () => {
|
|
23
|
-
const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext();
|
|
24
|
-
if (!primaryWallet) {
|
|
25
|
-
throw new Error('primaryWallet should be defined');
|
|
26
|
-
}
|
|
27
|
-
const PrimaryWalletChainIcon = getChainIcon(primaryWallet.chain);
|
|
28
|
-
const primaryWalletChainInfo = getChainInfo(primaryWallet.chain);
|
|
23
|
+
const { primaryWallet, setShowAuthFlow, appName, walletsByChain = [], } = useInternalDynamicContext();
|
|
29
24
|
const onClickClose = () => setShowAuthFlow(false);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
const body = useMemo(() => {
|
|
26
|
+
const blockchainNames = walletsByChain.map(({ chain }) => { var _a; return (_a = getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
27
|
+
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
28
|
+
return `Congratulations on connecting both your ${firstBlockchainName} and ${secondBlockchainName} wallets`;
|
|
29
|
+
}, [walletsByChain]);
|
|
30
|
+
const createPrimaryWalletCard = (wallet) => {
|
|
31
|
+
const PrimaryWalletChainIcon = getChainIcon(wallet.chain);
|
|
32
|
+
const primaryWalletChainInfo = getChainInfo(wallet.chain);
|
|
33
|
+
return (jsx(DynamicBridgeWalletCard, Object.assign({ networkIcon: jsx(PrimaryWalletChainIcon, {}), networkName: primaryWalletChainInfo === null || primaryWalletChainInfo === void 0 ? void 0 : primaryWalletChainInfo.displayName }, { children: jsx(DynamicBridgeWalletCardBody, { walletName: wallet.connector.name, walletAddress: wallet.address, walletBalance:
|
|
34
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
35
|
+
jsx(Balance, { address: wallet.address, connector: wallet.connector, network: wallet.chain }) }) })));
|
|
36
|
+
};
|
|
37
|
+
return (jsxs(ConnectedWalletsListLayout, Object.assign({ onClickClose: onClickClose, onClickAction: onClickClose, title: `Welcome to ${appName}`, body: body }, { children: [primaryWallet && createPrimaryWalletCard(primaryWallet), jsx(MemoSecondaryWallets, { hideUnlinkAction: true })] })));
|
|
33
38
|
};
|
|
34
39
|
|
|
35
40
|
export { BridgeSummaryView };
|
|
@@ -26,7 +26,7 @@ const BridgeWelcomeView = () => {
|
|
|
26
26
|
const body = React.useMemo(() => {
|
|
27
27
|
const blockchainNames = walletsByChain.map(({ chain }) => { var _a; return (_a = walletConnectorCore.getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
28
28
|
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
29
|
-
return `You’ll need to connect both
|
|
29
|
+
return `You’ll need to connect both your ${firstBlockchainName} and ${secondBlockchainName} wallets to get started`;
|
|
30
30
|
}, [walletsByChain]);
|
|
31
31
|
const chains = React.useMemo(() => walletsByChain
|
|
32
32
|
.map(({ chain }, index) => {
|
|
@@ -42,7 +42,7 @@ const BridgeWelcomeView = () => {
|
|
|
42
42
|
return undefined;
|
|
43
43
|
})
|
|
44
44
|
.filter(isChainInfoDefined), [walletsByChain]);
|
|
45
|
-
return (jsxRuntime.jsx(BridgeWelcomeLayout.BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: `
|
|
45
|
+
return (jsxRuntime.jsx(BridgeWelcomeLayout.BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: `Connect to ${appName}`, body: body, chains: chains, actionButtonText: 'Get started', onClickAction: () => setView('wallet-list') }));
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
exports.BridgeWelcomeView = BridgeWelcomeView;
|
|
@@ -22,7 +22,7 @@ const BridgeWelcomeView = () => {
|
|
|
22
22
|
const body = useMemo(() => {
|
|
23
23
|
const blockchainNames = walletsByChain.map(({ chain }) => { var _a; return (_a = getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
24
24
|
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
25
|
-
return `You’ll need to connect both
|
|
25
|
+
return `You’ll need to connect both your ${firstBlockchainName} and ${secondBlockchainName} wallets to get started`;
|
|
26
26
|
}, [walletsByChain]);
|
|
27
27
|
const chains = useMemo(() => walletsByChain
|
|
28
28
|
.map(({ chain }, index) => {
|
|
@@ -38,7 +38,7 @@ const BridgeWelcomeView = () => {
|
|
|
38
38
|
return undefined;
|
|
39
39
|
})
|
|
40
40
|
.filter(isChainInfoDefined), [walletsByChain]);
|
|
41
|
-
return (jsx(BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: `
|
|
41
|
+
return (jsx(BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: `Connect to ${appName}`, body: body, chains: chains, actionButtonText: 'Get started', onClickAction: () => setView('wallet-list') }));
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export { BridgeWelcomeView };
|
|
@@ -42,6 +42,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
42
42
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('formik');
|
|
44
44
|
require('yup');
|
|
45
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
45
46
|
var Captcha = require('../../components/Captcha/Captcha.cjs');
|
|
46
47
|
|
|
47
48
|
const CaptchaVerifyUser = () => {
|
|
@@ -38,6 +38,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
38
38
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'formik';
|
|
40
40
|
import 'yup';
|
|
41
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
41
42
|
import { Captcha } from '../../components/Captcha/Captcha.js';
|
|
42
43
|
|
|
43
44
|
const CaptchaVerifyUser = () => {
|
|
@@ -43,6 +43,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
43
43
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
44
44
|
require('formik');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
46
47
|
var NetworkPicker = require('../../components/NetworkPicker/NetworkPicker.cjs');
|
|
47
48
|
var UserAddress = require('../../components/UserAddress/UserAddress.cjs');
|
|
48
49
|
var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
|
|
@@ -61,7 +62,7 @@ const CollectUserDataView = () => {
|
|
|
61
62
|
const _isSupportedNetwork = !network || isSupportedNetwork.isSupportedNetwork({ network, walletConnector });
|
|
62
63
|
return (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxRuntime.jsxs(OnboardingUserDataForm.OnboardingUserDataForm, Object.assign({ disableSubmit: !_isSupportedNetwork, userProfile: userProfile }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data__img-container' }, { children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsxRuntime.jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { jwt: onboardingOnlyJwt })) })), jsxRuntime.jsx(UserAddress.UserAddress, { userProfile: userProfile }), jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data__network-container' }, { children: jsxRuntime.jsx(NetworkPicker.NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) })), !_isSupportedNetwork ? (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: "Update Network" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Your wallet is not connected to a supported network. Please update before continuing." }))] }))) : (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
63
64
|
`Welcome to ${appName}` })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
64
|
-
'We need a bit of information to get started' }))] })))] })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick:
|
|
65
|
+
'We need a bit of information to get started' }))] })))] })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick: handleLogOut }, { children: "Log out" }))] }))] })));
|
|
65
66
|
};
|
|
66
67
|
|
|
67
68
|
exports.CollectUserDataView = CollectUserDataView;
|
|
@@ -39,6 +39,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
39
39
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
40
40
|
import 'formik';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
42
43
|
import { NetworkPicker } from '../../components/NetworkPicker/NetworkPicker.js';
|
|
43
44
|
import { UserAddress } from '../../components/UserAddress/UserAddress.js';
|
|
44
45
|
import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
|
|
@@ -57,7 +58,7 @@ const CollectUserDataView = () => {
|
|
|
57
58
|
const _isSupportedNetwork = !network || isSupportedNetwork({ network, walletConnector });
|
|
58
59
|
return (jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxs(OnboardingUserDataForm, Object.assign({ disableSubmit: !_isSupportedNetwork, userProfile: userProfile }, { children: [jsx("div", Object.assign({ className: 'collect-user-data__img-container' }, { children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsx(AuthProviderIcon, { jwt: onboardingOnlyJwt })) })), jsx(UserAddress, { userProfile: userProfile }), jsx("div", Object.assign({ className: 'collect-user-data__network-container' }, { children: jsx(NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) })), !_isSupportedNetwork ? (jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: "Update Network" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Your wallet is not connected to a supported network. Please update before continuing." }))] }))) : (jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
59
60
|
`Welcome to ${appName}` })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
60
|
-
'We need a bit of information to get started' }))] })))] })), jsx(TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick:
|
|
61
|
+
'We need a bit of information to get started' }))] })))] })), jsx(TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick: handleLogOut }, { children: "Log out" }))] }))] })));
|
|
61
62
|
};
|
|
62
63
|
|
|
63
64
|
export { CollectUserDataView };
|
|
@@ -41,6 +41,7 @@ var useUserUpdateRequest = require('../../../utils/hooks/useUserUpdateRequest/us
|
|
|
41
41
|
require('../../../components/Popper/Popper/Popper.cjs');
|
|
42
42
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('yup');
|
|
44
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
44
45
|
var index = require('../UserDataFields/index.cjs');
|
|
45
46
|
var useUserDataForm = require('../../../utils/hooks/useUserDataForm/useUserDataForm.cjs');
|
|
46
47
|
|
|
@@ -37,6 +37,7 @@ import { useUserUpdateRequestInternal } from '../../../utils/hooks/useUserUpdate
|
|
|
37
37
|
import '../../../components/Popper/Popper/Popper.js';
|
|
38
38
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'yup';
|
|
40
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
40
41
|
import { UserDataFields } from '../UserDataFields/index.js';
|
|
41
42
|
import { useUserDataForm } from '../../../utils/hooks/useUserDataForm/useUserDataForm.js';
|
|
42
43
|
|
|
@@ -43,6 +43,7 @@ require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
|
43
43
|
require('../../../components/Popper/Popper/Popper.cjs');
|
|
44
44
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
46
47
|
var fieldsConfig = require('../fieldsConfig.cjs');
|
|
47
48
|
var getDisplayErrorMessage = require('./utils/getDisplayErrorMessage/getDisplayErrorMessage.cjs');
|
|
48
49
|
|
|
@@ -39,6 +39,7 @@ import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
39
39
|
import '../../../components/Popper/Popper/Popper.js';
|
|
40
40
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
42
43
|
import { fieldsConfig } from '../fieldsConfig.js';
|
|
43
44
|
import { getDisplayErrorMessage } from './utils/getDisplayErrorMessage/getDisplayErrorMessage.js';
|
|
44
45
|
|
package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs
CHANGED
|
@@ -41,6 +41,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
41
41
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
42
42
|
require('formik');
|
|
43
43
|
require('yup');
|
|
44
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
44
45
|
var OnboardingUserDataForm = require('../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs');
|
|
45
46
|
|
|
46
47
|
const CollectUserDataViewLoginWithEmail = () => {
|
|
@@ -51,7 +52,7 @@ const CollectUserDataViewLoginWithEmail = () => {
|
|
|
51
52
|
const userProfile = createUserProfile.createUserProfile(decodedOnboardingOnlyToken);
|
|
52
53
|
return (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email', "data-testid": 'collect-user-data-login-with-email' }, { children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data-login-with-email__main-img', src: onboardingImageUrl, alt: 'onboarding' })), jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data-login-with-email__icon-container' }, { children: jsxRuntime.jsx(iconic.UserProfileIcon, {}) })), jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email__form' }, { children: [jsxRuntime.jsx(OnboardingUserDataForm.OnboardingUserDataForm, Object.assign({ userProfile: userProfile }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data-login-with-email__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
53
54
|
`Welcome to ${appName}` })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
54
|
-
'We need a bit of information to get started' }))] })) })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data-login-with-email__log-out', onClick:
|
|
55
|
+
'We need a bit of information to get started' }))] })) })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data-login-with-email__log-out', onClick: handleLogOut }, { children: "Log out" }))] }))] })));
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
exports.CollectUserDataViewLoginWithEmail = CollectUserDataViewLoginWithEmail;
|
package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js
CHANGED
|
@@ -37,6 +37,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
37
37
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
38
38
|
import 'formik';
|
|
39
39
|
import 'yup';
|
|
40
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
40
41
|
import { OnboardingUserDataForm } from '../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js';
|
|
41
42
|
|
|
42
43
|
const CollectUserDataViewLoginWithEmail = () => {
|
|
@@ -47,7 +48,7 @@ const CollectUserDataViewLoginWithEmail = () => {
|
|
|
47
48
|
const userProfile = createUserProfile(decodedOnboardingOnlyToken);
|
|
48
49
|
return (jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email', "data-testid": 'collect-user-data-login-with-email' }, { children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data-login-with-email__main-img', src: onboardingImageUrl, alt: 'onboarding' })), jsx("div", Object.assign({ className: 'collect-user-data-login-with-email__icon-container' }, { children: jsx(UserProfileIcon, {}) })), jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email__form' }, { children: [jsx(OnboardingUserDataForm, Object.assign({ userProfile: userProfile }, { children: jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data-login-with-email__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
49
50
|
`Welcome to ${appName}` })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
50
|
-
'We need a bit of information to get started' }))] })) })), jsx(TextButton, Object.assign({ className: 'collect-user-data-login-with-email__log-out', onClick:
|
|
51
|
+
'We need a bit of information to get started' }))] })) })), jsx(TextButton, Object.assign({ className: 'collect-user-data-login-with-email__log-out', onClick: handleLogOut }, { children: "Log out" }))] }))] })));
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
export { CollectUserDataViewLoginWithEmail };
|
|
@@ -44,6 +44,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
44
44
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
45
45
|
require('formik');
|
|
46
46
|
require('yup');
|
|
47
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
47
48
|
|
|
48
49
|
const EmailConfirmationWaitingView = () => {
|
|
49
50
|
const { setView } = ViewContext.useViewContext();
|
|
@@ -40,6 +40,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
40
40
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
41
41
|
import 'formik';
|
|
42
42
|
import 'yup';
|
|
43
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
43
44
|
|
|
44
45
|
const EmailConfirmationWaitingView = () => {
|
|
45
46
|
const { setView } = useViewContext();
|
|
@@ -43,6 +43,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
43
43
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
44
44
|
require('formik');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
46
47
|
var EmailVerificationContext = require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
47
48
|
var LoadingContext = require('../../context/LoadingContext/LoadingContext.cjs');
|
|
48
49
|
|
|
@@ -39,6 +39,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
39
39
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
40
40
|
import 'formik';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
42
43
|
import { useEmailVerificationContext } from '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
43
44
|
import { useLoadingContext } from '../../context/LoadingContext/LoadingContext.js';
|
|
44
45
|
|
|
@@ -52,6 +52,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
52
52
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
53
53
|
require('formik');
|
|
54
54
|
require('yup');
|
|
55
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
55
56
|
var EmailVerificationContext = require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
56
57
|
var LoadingContext = require('../../context/LoadingContext/LoadingContext.cjs');
|
|
57
58
|
var useEmailVerificationRequest = require('../../utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs');
|
|
@@ -146,10 +147,10 @@ const EmailVerification = () => {
|
|
|
146
147
|
}
|
|
147
148
|
setCallback('authSuccess');
|
|
148
149
|
// this timeout is set to make sure that the user will see success message
|
|
149
|
-
setTimeout(() => {
|
|
150
|
-
createUserProfileByJWT(jwt);
|
|
150
|
+
setTimeout(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
151
|
+
yield createUserProfileByJWT(jwt);
|
|
151
152
|
setShowAuthFlow(false);
|
|
152
|
-
}, 1500);
|
|
153
|
+
}), 1500);
|
|
153
154
|
}
|
|
154
155
|
catch (error) {
|
|
155
156
|
if (error instanceof utils.NoAccessError) {
|
|
@@ -207,7 +208,7 @@ const EmailVerification = () => {
|
|
|
207
208
|
});
|
|
208
209
|
return (jsxRuntime.jsxs("div", Object.assign({ className: 'email-verification__container' }, { children: [error && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'email-verification__error-message' }, { children: error }))), showTransferMessage && (jsxRuntime.jsx("div", Object.assign({ className: 'email-verification__transfer-message' }, { children: "Verification complete, the email is now verified to this account." }))), isValidated ? (jsxRuntime.jsx("div", Object.assign({ className: 'email-verification__icon-container' }, { children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: iconic.SignInWithEmailIcon, iconSize: 50, InnerIcon: check.ReactComponent }) }))) : (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { className: classNames.classNames({
|
|
209
210
|
'email-verification__icon-with-spinner': Boolean(!error),
|
|
210
|
-
}), Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxRuntime.jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail.shortenEmail(email) }))] })), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ onClick: () => setView('update-email'), className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", remainingSeconds] })), jsxRuntime.jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsxRuntime.jsx(checkCircle.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__log-out', onClick:
|
|
211
|
+
}), Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxRuntime.jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail.shortenEmail(email) }))] })), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ onClick: () => setView('update-email'), className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", remainingSeconds] })), jsxRuntime.jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsxRuntime.jsx(checkCircle.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__log-out', onClick: handleLogOut }, { children: "Log out" }))), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {})] })));
|
|
211
212
|
};
|
|
212
213
|
|
|
213
214
|
exports.EmailVerification = EmailVerification;
|
|
@@ -48,6 +48,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
48
48
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
49
49
|
import 'formik';
|
|
50
50
|
import 'yup';
|
|
51
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
51
52
|
import { useEmailVerificationContext } from '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
52
53
|
import { useLoadingContext } from '../../context/LoadingContext/LoadingContext.js';
|
|
53
54
|
import { useEmailVerificationRequest } from '../../utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js';
|
|
@@ -142,10 +143,10 @@ const EmailVerification = () => {
|
|
|
142
143
|
}
|
|
143
144
|
setCallback('authSuccess');
|
|
144
145
|
// this timeout is set to make sure that the user will see success message
|
|
145
|
-
setTimeout(() => {
|
|
146
|
-
createUserProfileByJWT(jwt);
|
|
146
|
+
setTimeout(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
147
|
+
yield createUserProfileByJWT(jwt);
|
|
147
148
|
setShowAuthFlow(false);
|
|
148
|
-
}, 1500);
|
|
149
|
+
}), 1500);
|
|
149
150
|
}
|
|
150
151
|
catch (error) {
|
|
151
152
|
if (error instanceof NoAccessError) {
|
|
@@ -203,7 +204,7 @@ const EmailVerification = () => {
|
|
|
203
204
|
});
|
|
204
205
|
return (jsxs("div", Object.assign({ className: 'email-verification__container' }, { children: [error && (jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'email-verification__error-message' }, { children: error }))), showTransferMessage && (jsx("div", Object.assign({ className: 'email-verification__transfer-message' }, { children: "Verification complete, the email is now verified to this account." }))), isValidated ? (jsx("div", Object.assign({ className: 'email-verification__icon-container' }, { children: jsx(IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: SignInWithEmailIcon, iconSize: 50, InnerIcon: SvgCheck }) }))) : (jsx(IconWithSpinner, { className: classNames({
|
|
205
206
|
'email-verification__icon-with-spinner': Boolean(!error),
|
|
206
|
-
}), Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail(email) }))] })), !isLoginView && (jsx(TextButton, Object.assign({ onClick: () => setView('update-email'), className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxs(Fragment, { children: [jsxs(Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", remainingSeconds] })), jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsx(SvgCheckCircle, {}), jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsx(TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsx(TextButton, Object.assign({ className: 'email-verification__log-out', onClick:
|
|
207
|
+
}), Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail(email) }))] })), !isLoginView && (jsx(TextButton, Object.assign({ onClick: () => setView('update-email'), className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxs(Fragment, { children: [jsxs(Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", remainingSeconds] })), jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsx(SvgCheckCircle, {}), jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsx(TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsx(TextButton, Object.assign({ className: 'email-verification__log-out', onClick: handleLogOut }, { children: "Log out" }))), jsx(PoweredByDynamic, {})] })));
|
|
207
208
|
};
|
|
208
209
|
|
|
209
210
|
export { EmailVerification };
|