@dynamic-labs/sdk-react-core 1.1.0-alpha.0 → 1.1.0-alpha.1
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 +2 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/index.cjs +3 -2
- package/src/index.js +2 -1
- 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/Alert/Alert.types.d.ts +2 -1
- 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/Button/Button.cjs +2 -2
- package/src/lib/components/Button/Button.d.ts +2 -1
- package/src/lib/components/Button/Button.js +2 -2
- package/src/lib/components/Divider/Divider.cjs +1 -0
- package/src/lib/components/Divider/Divider.js +1 -0
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -2
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +3 -2
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -2
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +1 -1
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +2 -1
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +1 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +2 -2
- package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +2 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +2 -2
- package/src/lib/components/Input/Input.types.d.ts +2 -1
- package/src/lib/components/ListTile/ListTile.cjs +1 -1
- package/src/lib/components/ListTile/ListTile.js +1 -1
- package/src/lib/components/ListTile/ListTile.types.d.ts +2 -1
- 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/ModalHeaderBanner/ModalHeaderBanner.cjs +9 -5
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.d.ts +1 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +9 -5
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +4 -3
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +4 -3
- 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/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +8 -6
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +8 -6
- package/src/lib/components/OverlayCard/OverlayCard.cjs +1 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +1 -0
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +2 -1
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +2 -1
- package/src/lib/components/Portal/Portal.cjs +1 -0
- package/src/lib/components/Portal/Portal.js +1 -0
- package/src/lib/components/Search/Search.cjs +1 -1
- package/src/lib/components/Search/Search.d.ts +2 -1
- package/src/lib/components/Search/Search.js +1 -1
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs +2 -2
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js +2 -2
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +3 -3
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +3 -3
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +1 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +1 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.js +1 -0
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.cjs +1 -0
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.js +1 -0
- package/src/lib/components/TextButton/TextButton.d.ts +2 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +3 -2
- package/src/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/src/lib/components/Tooltip/Tooltip.js +3 -2
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -3
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +2 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -3
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.d.ts +2 -1
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +2 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +2 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
- package/src/lib/components/Typography/Typography.types.d.ts +2 -1
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -0
- package/src/lib/components/UserAddress/UserAddress.js +1 -0
- package/src/lib/components/UserProfile/UserProfile.cjs +2 -2
- package/src/lib/components/UserProfile/UserProfile.d.ts +1 -0
- package/src/lib/components/UserProfile/UserProfile.js +2 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +3 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +3 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +3 -2
- 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/context/DynamicContext/DynamicContext.cjs +10 -21
- package/src/lib/context/DynamicContext/DynamicContext.js +11 -22
- package/src/lib/context/DynamicContext/hooks/index.d.ts +2 -1
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +75 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.d.ts +3 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +71 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +0 -3
- package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +3 -5
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +4 -24
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +4 -24
- package/src/lib/context/LoadingContext/LoadingContext.cjs +55 -15
- package/src/lib/context/LoadingContext/LoadingContext.d.ts +1 -1
- package/src/lib/context/LoadingContext/LoadingContext.js +56 -16
- 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 +4 -14
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +5 -15
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -0
- package/src/lib/context/ViewContext/ViewContext.cjs +4 -15
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -3
- package/src/lib/context/ViewContext/ViewContext.js +5 -16
- package/src/lib/data/api.js +1 -1
- package/src/lib/{context/DynamicContext/internalEvents/internalEvents.cjs → events/dynamicEvents.cjs} +2 -3
- package/src/lib/{context/DynamicContext/internalEvents/internalEvents.d.ts → events/dynamicEvents.d.ts} +4 -4
- package/src/lib/events/dynamicEvents.js +5 -0
- package/src/lib/events/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +3 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +2 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +3 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +2 -1
- 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/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.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 +3 -2
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.d.ts +2 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +3 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +3 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +2 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +3 -2
- package/src/lib/locale/en/translation.cjs +6 -0
- package/src/lib/locale/en/translation.d.ts +6 -0
- package/src/lib/locale/en/translation.js +6 -0
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +1 -0
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +3 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +3 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +3 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +3 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +2 -1
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -0
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -0
- package/src/lib/shared/types/index.d.ts +3 -0
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.cjs +5 -3
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.js +5 -3
- package/src/lib/utils/hooks/events/index.d.ts +3 -0
- package/src/lib/utils/hooks/events/types.d.ts +14 -0
- package/src/lib/utils/hooks/events/useDynamicEvents/index.d.ts +1 -0
- package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.cjs +21 -0
- package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.d.ts +8 -0
- package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.js +17 -0
- package/src/lib/utils/hooks/{useWalletConnectorEvent → events/useWalletConnectorEvent}/useWalletConnectorEvent.cjs +1 -0
- package/src/lib/utils/hooks/{useWalletConnectorEvent → events/useWalletConnectorEvent}/useWalletConnectorEvent.d.ts +2 -11
- package/src/lib/utils/hooks/{useWalletConnectorEvent → events/useWalletConnectorEvent}/useWalletConnectorEvent.js +1 -0
- package/src/lib/utils/hooks/index.d.ts +1 -2
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +57 -48
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +57 -48
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +51 -7
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.d.ts +3 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +51 -7
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +7 -7
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +7 -7
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +27 -2
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +27 -2
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +1 -1
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +1 -1
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +5 -7
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +5 -7
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +5 -5
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +5 -5
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +2 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +1 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +2 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +3 -2
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +3 -2
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +3 -2
- package/src/lib/views/AccountExistsView/AccountExistsView.js +3 -2
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +5 -4
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +5 -4
- 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 +8 -7
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +8 -7
- package/src/lib/views/CollectUserDataView/useFields.cjs +11 -0
- package/src/lib/views/CollectUserDataView/useFields.d.ts +11 -0
- package/src/lib/views/CollectUserDataView/useFields.js +11 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +4 -3
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +4 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +3 -2
- package/src/lib/views/EmailUpdate/EmailUpdate.js +3 -2
- package/src/lib/views/EmailVerification/EmailVerification.cjs +3 -5
- package/src/lib/views/EmailVerification/EmailVerification.js +3 -5
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +11 -5
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +11 -5
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +1 -0
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.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 +2 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +2 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +3 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.d.ts +3 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +3 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +2 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +2 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +3 -2
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +3 -2
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +3 -2
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +3 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +4 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +4 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +2 -1
- package/src/lib/views/NoAccess/NoAccess.js +2 -1
- 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/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +1 -0
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +1 -0
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +4 -3
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +4 -3
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +2 -1
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +2 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +6 -5
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +6 -5
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +4 -3
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +4 -3
- 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 +2 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +2 -1
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +1 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +2 -1
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +2 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -1
- 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 +10 -7
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +2 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +10 -7
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -0
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +2 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +2 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +2 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +2 -1
- package/src/lib/views/WalletList/WalletList.cjs +2 -2
- package/src/lib/views/WalletList/WalletList.js +2 -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 +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 +2 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -1
- 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/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +5 -5
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +5 -5
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +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/DynamicNav/DynamicNav.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.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 +6 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +6 -3
- 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 +7 -2
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +7 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.d.ts +3 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +3 -2
- 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/UnknownWalletInformation/UnknownWalletInformation.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.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/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +2 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +2 -1
- 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/context/DynamicContext/internalEvents/index.d.ts +0 -1
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.js +0 -6
- /package/src/lib/utils/hooks/{useEventListener → events/useEventListener}/index.d.ts +0 -0
- /package/src/lib/utils/hooks/{useEventListener → events/useEventListener}/useEventListener.cjs +0 -0
- /package/src/lib/utils/hooks/{useEventListener → events/useEventListener}/useEventListener.d.ts +0 -0
- /package/src/lib/utils/hooks/{useEventListener → events/useEventListener}/useEventListener.js +0 -0
- /package/src/lib/utils/hooks/{useWalletConnectorEvent → events/useWalletConnectorEvent}/index.d.ts +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactElement, ElementType } from 'react';
|
|
2
|
+
import { CopyKey } from '../../shared';
|
|
2
3
|
export type TooltipProps = {
|
|
3
4
|
as?: ElementType;
|
|
4
5
|
className?: string;
|
|
5
6
|
content: string | ReactElement;
|
|
6
|
-
};
|
|
7
|
+
} & CopyKey;
|
|
7
8
|
export declare const Tooltip: FC<PropsWithChildren<TooltipProps>>;
|
|
@@ -15,6 +15,7 @@ import 'viem';
|
|
|
15
15
|
import '@dynamic-labs/utils';
|
|
16
16
|
import { tooltipZIndex } from '../../shared/consts/index.js';
|
|
17
17
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
18
|
+
import '../../events/dynamicEvents.js';
|
|
18
19
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
19
20
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
20
21
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
@@ -60,7 +61,7 @@ import '../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/Verif
|
|
|
60
61
|
import '@dynamic-labs/viem-utils';
|
|
61
62
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
62
63
|
|
|
63
|
-
const Tooltip = ({ children, content, className, as: Tag = 'span', }) => {
|
|
64
|
+
const Tooltip = ({ children, content, className, as: Tag = 'span', copykey, }) => {
|
|
64
65
|
const portalRoot = useElementById('dynamic-tooltips');
|
|
65
66
|
const [childrenHover, childrenHoverHandlers] = useHover(false, true);
|
|
66
67
|
const [hoversTooltip, setHoversTooltip] = useState(false);
|
|
@@ -116,7 +117,7 @@ const Tooltip = ({ children, content, className, as: Tag = 'span', }) => {
|
|
|
116
117
|
});
|
|
117
118
|
return (jsxs(Fragment, { children: [createPortal(jsx(ShadowDOM, { zIndex: tooltipZIndex, children: jsxs("div", { "data-testid": 'dynamicTooltip', className: classNames('dynamic-tooltip', {
|
|
118
119
|
'dynamic-tooltip--visible': visible,
|
|
119
|
-
}, className), style: { left: vector[0], top: vector[1] }, ref: tooltipRef, children: [content, jsx(SvgTooltipArrow, { className: 'dynamic-tooltip__arrow' })] }) }), portalRoot.current), jsx(Tag, Object.assign({ ref: childrenRef }, childrenHoverHandlers, { children: children }))] }));
|
|
120
|
+
}, className), style: { left: vector[0], top: vector[1] }, ref: tooltipRef, copykey: copykey, children: [content, jsx(SvgTooltipArrow, { className: 'dynamic-tooltip__arrow' })] }) }), portalRoot.current), jsx(Tag, Object.assign({ ref: childrenRef }, childrenHoverHandlers, { children: children }))] }));
|
|
120
121
|
};
|
|
121
122
|
|
|
122
123
|
export { Tooltip };
|
package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs
CHANGED
|
@@ -37,14 +37,14 @@ var useIsTurnkeyWallet = require('../../utils/hooks/useIsTurnkeyWallet/useIsTurn
|
|
|
37
37
|
var SecureTurnkeyWalletCard = require('../SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs');
|
|
38
38
|
var PasskeyCreatedSuccessBanner = require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
39
39
|
|
|
40
|
-
const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, alert, children, }) => {
|
|
40
|
+
const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, copykey, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, alert, children, }) => {
|
|
41
41
|
const { t } = reactI18next.useTranslation();
|
|
42
42
|
const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet.useIsTurnkeyWallet();
|
|
43
43
|
const closeButton = onClickClose && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', disabled: isLoading, children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
44
44
|
const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
|
|
45
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxRuntime.jsx(PasskeyCreatedSuccessBanner.PasskeyCreatedSuccessBanner, {}), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__body', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: error && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__error', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__content', children: [jsxRuntime.jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsxRuntime.jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: alert && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsxRuntime.jsx(SecureTurnkeyWalletCard.SecureTurnkeyWalletCard, { className: 'transaction-confirmation__secure-wallet' }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsxRuntime.jsx(Button.Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', disabled: isLoading, children: t('dyn_send_transaction.confirmation.cancel_button') })), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
|
|
45
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxRuntime.jsx(PasskeyCreatedSuccessBanner.PasskeyCreatedSuccessBanner, {}), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__body', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', copykey: copykey, children: title }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: error && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__error', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__content', children: [jsxRuntime.jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsxRuntime.jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: alert && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsxRuntime.jsx(SecureTurnkeyWalletCard.SecureTurnkeyWalletCard, { className: 'transaction-confirmation__secure-wallet' }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsxRuntime.jsx(Button.Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', disabled: isLoading, copykey: 'dyn_send_transaction.confirmation.cancel_button', children: t('dyn_send_transaction.confirmation.cancel_button') })), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
|
|
46
46
|
onClickSend === null || onClickSend === void 0 ? void 0 : onClickSend(event);
|
|
47
|
-
}, expanded: true, loading: isLoading, disabled: disableSendButton || isTurnkeyWalletWithoutAuthenticator, children: t('dyn_send_transaction.confirmation.confirm_button') })] }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
|
|
47
|
+
}, expanded: true, loading: isLoading, disabled: disableSendButton || isTurnkeyWalletWithoutAuthenticator, copykey: 'dyn_send_transaction.confirmation.confirm_button', children: t('dyn_send_transaction.confirmation.confirm_button') })] }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
exports.TransactionConfirmationPageLayout = TransactionConfirmationPageLayout;
|
package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC, MouseEventHandler, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { CopyKey } from '../../shared';
|
|
2
3
|
type TransactionConfirmationPageLayoutProps = {
|
|
3
4
|
appLogoUrl?: string;
|
|
4
5
|
appName?: string;
|
|
@@ -12,6 +13,6 @@ type TransactionConfirmationPageLayoutProps = {
|
|
|
12
13
|
onClickSend: MouseEventHandler<HTMLButtonElement>;
|
|
13
14
|
title?: ReactNode;
|
|
14
15
|
alert?: ReactNode;
|
|
15
|
-
};
|
|
16
|
+
} & CopyKey;
|
|
16
17
|
export declare const TransactionConfirmationPageLayout: FC<PropsWithChildren<TransactionConfirmationPageLayoutProps>>;
|
|
17
18
|
export {};
|
package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js
CHANGED
|
@@ -33,14 +33,14 @@ import { useIsTurnkeyWallet } from '../../utils/hooks/useIsTurnkeyWallet/useIsTu
|
|
|
33
33
|
import { SecureTurnkeyWalletCard } from '../SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js';
|
|
34
34
|
import { PasskeyCreatedSuccessBanner } from '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
35
35
|
|
|
36
|
-
const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, alert, children, }) => {
|
|
36
|
+
const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, copykey, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, alert, children, }) => {
|
|
37
37
|
const { t } = useTranslation();
|
|
38
38
|
const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet();
|
|
39
39
|
const closeButton = onClickClose && (jsx(IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', disabled: isLoading, children: jsx(SvgClose, {}) }));
|
|
40
40
|
const backButton = onClickBack && (jsx(IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
|
|
41
|
-
return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignCircle, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsx(PasskeyCreatedSuccessBanner, {}), jsxs("div", { className: 'transaction-confirmation__body', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: error && (jsx("div", { className: 'transaction-confirmation__error', children: jsx(Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxs("div", { className: 'transaction-confirmation__content', children: [jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: alert && (jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsx(SecureTurnkeyWalletCard, { className: 'transaction-confirmation__secure-wallet' }), jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsx(Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', disabled: isLoading, children: t('dyn_send_transaction.confirmation.cancel_button') })), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
|
|
41
|
+
return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignCircle, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsx(PasskeyCreatedSuccessBanner, {}), jsxs("div", { className: 'transaction-confirmation__body', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', copykey: copykey, children: title }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: error && (jsx("div", { className: 'transaction-confirmation__error', children: jsx(Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxs("div", { className: 'transaction-confirmation__content', children: [jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: alert && (jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsx(SecureTurnkeyWalletCard, { className: 'transaction-confirmation__secure-wallet' }), jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsx(Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', disabled: isLoading, copykey: 'dyn_send_transaction.confirmation.cancel_button', children: t('dyn_send_transaction.confirmation.cancel_button') })), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
|
|
42
42
|
onClickSend === null || onClickSend === void 0 ? void 0 : onClickSend(event);
|
|
43
|
-
}, expanded: true, loading: isLoading, disabled: disableSendButton || isTurnkeyWalletWithoutAuthenticator, children: t('dyn_send_transaction.confirmation.confirm_button') })] }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
|
|
43
|
+
}, expanded: true, loading: isLoading, disabled: disableSendButton || isTurnkeyWalletWithoutAuthenticator, copykey: 'dyn_send_transaction.confirmation.confirm_button', children: t('dyn_send_transaction.confirmation.confirm_button') })] }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export { TransactionConfirmationPageLayout };
|
|
@@ -6,6 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var Typography = require('../../../Typography/Typography.cjs');
|
|
7
7
|
var Skeleton = require('../../../Skeleton/Skeleton.cjs');
|
|
8
8
|
|
|
9
|
-
const TransactionRow = ({ label, title, children, isEmpty = false, isLoading = false, suffix, dataTestId, icon, }) => (jsxRuntime.jsxs("div", { className: 'transaction-row', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-row__label', children: label }), jsxRuntime.jsxs("div", { className: 'transaction-row__content', "data-testid": dataTestId, children: [isLoading && (jsxRuntime.jsx(Skeleton.Skeleton, { count: 1, className: 'transaction-row__skeleton' })), isLoading === false && children !== undefined && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { title: title, color: isEmpty ? 'secondary' : 'primary', variant: 'body_normal', weight: isEmpty ? 'regular' : 'medium', truncate: true, children: children }), suffix && (jsxRuntime.jsx(Typography.Typography, { as: 'span', color: 'secondary', weight: 'regular', children: suffix })), icon] }))] })] }));
|
|
9
|
+
const TransactionRow = ({ label, title, children, isEmpty = false, isLoading = false, suffix, dataTestId, icon, copykey, }) => (jsxRuntime.jsxs("div", { className: 'transaction-row', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-row__label', copykey: copykey, children: label }), jsxRuntime.jsxs("div", { className: 'transaction-row__content', "data-testid": dataTestId, children: [isLoading && (jsxRuntime.jsx(Skeleton.Skeleton, { count: 1, className: 'transaction-row__skeleton' })), isLoading === false && children !== undefined && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { title: title, color: isEmpty ? 'secondary' : 'primary', variant: 'body_normal', weight: isEmpty ? 'regular' : 'medium', truncate: true, children: children }), suffix && (jsxRuntime.jsx(Typography.Typography, { as: 'span', color: 'secondary', weight: 'regular', children: suffix })), icon] }))] })] }));
|
|
10
10
|
|
|
11
11
|
exports.TransactionRow = TransactionRow;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { CopyKey } from '../../../../shared';
|
|
2
3
|
type TransactionRowProps = {
|
|
3
4
|
dataTestId?: string;
|
|
4
5
|
icon?: ReactNode;
|
|
@@ -7,6 +8,6 @@ type TransactionRowProps = {
|
|
|
7
8
|
label: ReactNode;
|
|
8
9
|
suffix?: ReactNode;
|
|
9
10
|
title?: string;
|
|
10
|
-
};
|
|
11
|
+
} & CopyKey;
|
|
11
12
|
export declare const TransactionRow: FC<PropsWithChildren<TransactionRowProps>>;
|
|
12
13
|
export {};
|
|
@@ -2,6 +2,6 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Typography } from '../../../Typography/Typography.js';
|
|
3
3
|
import { Skeleton } from '../../../Skeleton/Skeleton.js';
|
|
4
4
|
|
|
5
|
-
const TransactionRow = ({ label, title, children, isEmpty = false, isLoading = false, suffix, dataTestId, icon, }) => (jsxs("div", { className: 'transaction-row', children: [jsx(Typography, { color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-row__label', children: label }), jsxs("div", { className: 'transaction-row__content', "data-testid": dataTestId, children: [isLoading && (jsx(Skeleton, { count: 1, className: 'transaction-row__skeleton' })), isLoading === false && children !== undefined && (jsxs(Fragment, { children: [jsx(Typography, { title: title, color: isEmpty ? 'secondary' : 'primary', variant: 'body_normal', weight: isEmpty ? 'regular' : 'medium', truncate: true, children: children }), suffix && (jsx(Typography, { as: 'span', color: 'secondary', weight: 'regular', children: suffix })), icon] }))] })] }));
|
|
5
|
+
const TransactionRow = ({ label, title, children, isEmpty = false, isLoading = false, suffix, dataTestId, icon, copykey, }) => (jsxs("div", { className: 'transaction-row', children: [jsx(Typography, { color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-row__label', copykey: copykey, children: label }), jsxs("div", { className: 'transaction-row__content', "data-testid": dataTestId, children: [isLoading && (jsx(Skeleton, { count: 1, className: 'transaction-row__skeleton' })), isLoading === false && children !== undefined && (jsxs(Fragment, { children: [jsx(Typography, { title: title, color: isEmpty ? 'secondary' : 'primary', variant: 'body_normal', weight: isEmpty ? 'regular' : 'medium', truncate: true, children: children }), suffix && (jsx(Typography, { as: 'span', color: 'secondary', weight: 'regular', children: suffix })), icon] }))] })] }));
|
|
6
6
|
|
|
7
7
|
export { TransactionRow };
|
|
@@ -28,6 +28,7 @@ var PoweredByDynamic = require('../PoweredByDynamic/PoweredByDynamic.cjs');
|
|
|
28
28
|
var Button = require('../Button/Button.cjs');
|
|
29
29
|
require('@dynamic-labs/multi-wallet');
|
|
30
30
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
31
|
+
require('../../events/dynamicEvents.cjs');
|
|
31
32
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
32
33
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
33
34
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -72,7 +73,7 @@ const TransactionStatusLayout = ({ destinationAddress, amount, networkName, netw
|
|
|
72
73
|
const { t } = reactI18next.useTranslation();
|
|
73
74
|
const closeButton = onClickClose && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
74
75
|
const networkIcon = (jsxRuntime.jsx("span", { className: 'transaction-status-layout__network-icon', children: NetworkIcon }));
|
|
75
|
-
return (jsxRuntime.jsxs("div", { className: 'transaction-status-layout', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: signCircle.ReactComponent, InnerIcon: check.ReactComponent }) }), jsxRuntime.jsxs("div", { className: 'transaction-status-layout__body', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title', children: t('dyn_send_transaction.succeeded.title') }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__content', children: jsxRuntime.jsxs("div", { className: 'transaction-status-layout__rows', children: [jsxRuntime.jsx(TransactionRow.TransactionRow, { label: t('dyn_send_transaction.succeeded.recipient.label'), children: shortenWalletAddress.shortenWalletAddress(destinationAddress, 3, 3) }), jsxRuntime.jsxs(TransactionRow.TransactionRow, { label: t('dyn_send_transaction.succeeded.network.label'), children: [networkIcon, jsxRuntime.jsx("span", { className: 'transaction-status-layout__network-name', children: networkName })] }), jsxRuntime.jsxs(TransactionRow.TransactionRow, { label: t('dyn_send_transaction.succeeded.total_amount.label'), children: [amount, jsxRuntime.jsx(Typography.Typography, { as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency', children: networkCurrency })] })] }) }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__actions', children: jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', expanded: true, onClick: onDone, loading: false, children: t('dyn_send_transaction.succeeded.continue_button') }) }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
|
|
76
|
+
return (jsxRuntime.jsxs("div", { className: 'transaction-status-layout', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: signCircle.ReactComponent, InnerIcon: check.ReactComponent }) }), jsxRuntime.jsxs("div", { className: 'transaction-status-layout__body', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: t('dyn_send_transaction.succeeded.title') }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__content', children: jsxRuntime.jsxs("div", { className: 'transaction-status-layout__rows', children: [jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.succeeded.recipient.label', label: t('dyn_send_transaction.succeeded.recipient.label'), children: shortenWalletAddress.shortenWalletAddress(destinationAddress, 3, 3) }), jsxRuntime.jsxs(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.succeeded.network.label', label: t('dyn_send_transaction.succeeded.network.label'), children: [networkIcon, jsxRuntime.jsx("span", { className: 'transaction-status-layout__network-name', children: networkName })] }), jsxRuntime.jsxs(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.succeeded.total_amount.label', label: t('dyn_send_transaction.succeeded.total_amount.label'), children: [amount, jsxRuntime.jsx(Typography.Typography, { as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency', children: networkCurrency })] })] }) }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__actions', children: jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', expanded: true, onClick: onDone, loading: false, copykey: 'dyn_send_transaction.succeeded.continue_button', children: t('dyn_send_transaction.succeeded.continue_button') }) }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
exports.TransactionStatusLayout = TransactionStatusLayout;
|
|
@@ -24,6 +24,7 @@ import { PoweredByDynamic } from '../PoweredByDynamic/PoweredByDynamic.js';
|
|
|
24
24
|
import { Button } from '../Button/Button.js';
|
|
25
25
|
import '@dynamic-labs/multi-wallet';
|
|
26
26
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
27
|
+
import '../../events/dynamicEvents.js';
|
|
27
28
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
28
29
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
29
30
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
@@ -68,7 +69,7 @@ const TransactionStatusLayout = ({ destinationAddress, amount, networkName, netw
|
|
|
68
69
|
const { t } = useTranslation();
|
|
69
70
|
const closeButton = onClickClose && (jsx(IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', children: jsx(SvgClose, {}) }));
|
|
70
71
|
const networkIcon = (jsx("span", { className: 'transaction-status-layout__network-icon', children: NetworkIcon }));
|
|
71
|
-
return (jsxs("div", { className: 'transaction-status-layout', children: [jsx(ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) }), jsxs("div", { className: 'transaction-status-layout__body', children: [jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title', children: t('dyn_send_transaction.succeeded.title') }), jsx("div", { className: 'transaction-status-layout__content', children: jsxs("div", { className: 'transaction-status-layout__rows', children: [jsx(TransactionRow, { label: t('dyn_send_transaction.succeeded.recipient.label'), children: shortenWalletAddress(destinationAddress, 3, 3) }), jsxs(TransactionRow, { label: t('dyn_send_transaction.succeeded.network.label'), children: [networkIcon, jsx("span", { className: 'transaction-status-layout__network-name', children: networkName })] }), jsxs(TransactionRow, { label: t('dyn_send_transaction.succeeded.total_amount.label'), children: [amount, jsx(Typography, { as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency', children: networkCurrency })] })] }) }), jsx("div", { className: 'transaction-status-layout__actions', children: jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', expanded: true, onClick: onDone, loading: false, children: t('dyn_send_transaction.succeeded.continue_button') }) }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
|
|
72
|
+
return (jsxs("div", { className: 'transaction-status-layout', children: [jsx(ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) }), jsxs("div", { className: 'transaction-status-layout__body', children: [jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title', copykey: 'dyn_send_transaction.succeeded.title', children: t('dyn_send_transaction.succeeded.title') }), jsx("div", { className: 'transaction-status-layout__content', children: jsxs("div", { className: 'transaction-status-layout__rows', children: [jsx(TransactionRow, { copykey: 'dyn_send_transaction.succeeded.recipient.label', label: t('dyn_send_transaction.succeeded.recipient.label'), children: shortenWalletAddress(destinationAddress, 3, 3) }), jsxs(TransactionRow, { copykey: 'dyn_send_transaction.succeeded.network.label', label: t('dyn_send_transaction.succeeded.network.label'), children: [networkIcon, jsx("span", { className: 'transaction-status-layout__network-name', children: networkName })] }), jsxs(TransactionRow, { copykey: 'dyn_send_transaction.succeeded.total_amount.label', label: t('dyn_send_transaction.succeeded.total_amount.label'), children: [amount, jsx(Typography, { as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency', children: networkCurrency })] })] }) }), jsx("div", { className: 'transaction-status-layout__actions', children: jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', expanded: true, onClick: onDone, loading: false, copykey: 'dyn_send_transaction.succeeded.continue_button', children: t('dyn_send_transaction.succeeded.continue_button') }) }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
|
|
72
73
|
};
|
|
73
74
|
|
|
74
75
|
export { TransactionStatusLayout };
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
|
+
require('../../../events/dynamicEvents.cjs');
|
|
8
9
|
require('@dynamic-labs/utils');
|
|
9
10
|
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
10
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __rest } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useMemo } from 'react';
|
|
4
|
+
import '../../../events/dynamicEvents.js';
|
|
4
5
|
import '@dynamic-labs/utils';
|
|
5
6
|
import '../../../context/DynamicContext/DynamicContext.js';
|
|
6
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ElementType, ReactElement } from 'react';
|
|
2
|
+
import { CopyKey } from '../../shared';
|
|
2
3
|
export type TypographyTag = ElementType;
|
|
3
4
|
export type TypographyVariant = 'title' | 'body_normal' | 'body_small' | 'body_mini' | 'button_primary' | 'button_secondary' | 'button_tertiary' | 'numbers_big' | 'numbers_medium';
|
|
4
5
|
export type TypographyColor = 'primary' | 'secondary' | 'brand-primary' | 'tertiary' | 'link' | 'error-1' | 'error-2' | 'tooltip' | 'green-1' | 'inherit';
|
|
@@ -12,5 +13,5 @@ export type TypographyProps<TAG extends ElementType = 'p'> = {
|
|
|
12
13
|
truncate?: boolean;
|
|
13
14
|
variant?: TypographyVariant;
|
|
14
15
|
weight?: TypographyWeight;
|
|
15
|
-
} & ComponentPropsWithoutRef<TAG
|
|
16
|
+
} & ComponentPropsWithoutRef<TAG> & CopyKey;
|
|
16
17
|
export type TypographyComponent = <TAG extends ElementType>(props: TypographyProps<TAG>, ref?: any) => ReactElement;
|
|
@@ -19,6 +19,7 @@ require('../../shared/consts/index.cjs');
|
|
|
19
19
|
var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
|
|
20
20
|
var StatusDot = require('../StatusDot/StatusDot.cjs');
|
|
21
21
|
var Typography = require('../Typography/Typography.cjs');
|
|
22
|
+
require('../../events/dynamicEvents.cjs');
|
|
22
23
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
23
24
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
24
25
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -15,6 +15,7 @@ import '../../shared/consts/index.js';
|
|
|
15
15
|
import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
|
|
16
16
|
import { StatusDot } from '../StatusDot/StatusDot.js';
|
|
17
17
|
import { Typography } from '../Typography/Typography.js';
|
|
18
|
+
import '../../events/dynamicEvents.js';
|
|
18
19
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
19
20
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
20
21
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
@@ -50,9 +50,9 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
50
50
|
if (!user)
|
|
51
51
|
return null;
|
|
52
52
|
return (jsxRuntime.jsxs("div", { "data-testid": 'userProfile', className: classNames.classNames('user-profile', rootClassName), ref: containerRef, children: [error && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: error }), (allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, { title: 'My information', children: jsxRuntime.jsx("div", { className: 'user-profile__fields', children: allUserFields.map(({ name }) => {
|
|
53
|
-
const { label } = index$1.getValueByKey(fieldsConfig, name);
|
|
53
|
+
const { label, key } = index$1.getValueByKey(fieldsConfig, name);
|
|
54
54
|
const value = mapFieldKeyToValue(name);
|
|
55
|
-
return (jsxRuntime.jsx(UserProfileField.UserProfileField, { name: name, label: label, value: value }, name));
|
|
55
|
+
return (jsxRuntime.jsx(UserProfileField.UserProfileField, { copykey: key, name: name, label: label, value: value }, name));
|
|
56
56
|
}) }) })), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, { title: 'Social accounts', children: jsxRuntime.jsx("div", { className: 'user-profile__social-accounts', children: providers.map(({ provider }) => (jsxRuntime.jsx(UserProfileSocialAccount.UserProfileSocialAccount, { provider: provider }, provider))) }) }))] }));
|
|
57
57
|
};
|
|
58
58
|
|
|
@@ -46,9 +46,9 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
46
46
|
if (!user)
|
|
47
47
|
return null;
|
|
48
48
|
return (jsxs("div", { "data-testid": 'userProfile', className: classNames('user-profile', rootClassName), ref: containerRef, children: [error && jsx(ErrorContainer, { children: error }), (allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsx(UserProfileSection, { title: 'My information', children: jsx("div", { className: 'user-profile__fields', children: allUserFields.map(({ name }) => {
|
|
49
|
-
const { label } = getValueByKey(fieldsConfig, name);
|
|
49
|
+
const { label, key } = getValueByKey(fieldsConfig, name);
|
|
50
50
|
const value = mapFieldKeyToValue(name);
|
|
51
|
-
return (jsx(UserProfileField, { name: name, label: label, value: value }, name));
|
|
51
|
+
return (jsx(UserProfileField, { copykey: key, name: name, label: label, value: value }, name));
|
|
52
52
|
}) }) })), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsx(UserProfileSection, { title: 'Social accounts', children: jsx("div", { className: 'user-profile__social-accounts', children: providers.map(({ provider }) => (jsx(UserProfileSocialAccount, { provider: provider }, provider))) }) }))] }));
|
|
53
53
|
};
|
|
54
54
|
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
7
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
7
8
|
require('@dynamic-labs/utils');
|
|
8
9
|
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
9
10
|
require('@dynamic-labs/wallet-connector-core');
|
|
@@ -59,10 +60,10 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
59
60
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
60
61
|
require('react-focus-lock');
|
|
61
62
|
|
|
62
|
-
const UserProfileField = ({ name, label, value, }) => {
|
|
63
|
+
const UserProfileField = ({ name, label, value, copykey, }) => {
|
|
63
64
|
const isEmpty = value === '';
|
|
64
65
|
const isEmailField = name === 'email';
|
|
65
|
-
return (jsxRuntime.jsxs("div", { className: 'user-profile-field', children: [label && (jsxRuntime.jsx(Typography.Typography, { as: 'h6', color: 'secondary', weight: 'regular', variant: 'body_small', children: label })), jsxRuntime.jsxs("div", { className: 'user-profile-field__value', children: [jsxRuntime.jsx(Typography.Typography, { color: isEmpty ? 'tertiary' : 'primary', as: 'p', weight: 'regular', variant: 'body_normal', children: value }), isEmailField && (jsxRuntime.jsx(VerifiedEmailIcon.VerifiedEmailIcon, { className: 'user-profile-field__verify-email-icon', overwriteTooltipProps: { as: 'div' } }))] })] }));
|
|
66
|
+
return (jsxRuntime.jsxs("div", { className: 'user-profile-field', children: [label && (jsxRuntime.jsx(Typography.Typography, { as: 'h6', color: 'secondary', weight: 'regular', variant: 'body_small', copykey: copykey, children: label })), jsxRuntime.jsxs("div", { className: 'user-profile-field__value', children: [jsxRuntime.jsx(Typography.Typography, { color: isEmpty ? 'tertiary' : 'primary', as: 'p', weight: 'regular', variant: 'body_normal', children: value }), isEmailField && (jsxRuntime.jsx(VerifiedEmailIcon.VerifiedEmailIcon, { className: 'user-profile-field__verify-email-icon', overwriteTooltipProps: { as: 'div' } }))] })] }));
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
exports.UserProfileField = UserProfileField;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { CopyKey } from '../../../../shared';
|
|
2
3
|
export type UserProfileFieldProps = {
|
|
3
4
|
disabled?: boolean;
|
|
4
5
|
label?: string;
|
|
5
6
|
name: string;
|
|
6
7
|
value?: string | boolean | null;
|
|
7
|
-
};
|
|
8
|
-
export declare const UserProfileField: ({ name, label, value, }: UserProfileFieldProps) => JSX.Element;
|
|
8
|
+
} & CopyKey;
|
|
9
|
+
export declare const UserProfileField: ({ name, label, value, copykey, }: UserProfileFieldProps) => JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
+
import '../../../../events/dynamicEvents.js';
|
|
3
4
|
import '@dynamic-labs/utils';
|
|
4
5
|
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
5
6
|
import '@dynamic-labs/wallet-connector-core';
|
|
@@ -55,10 +56,10 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
55
56
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
56
57
|
import 'react-focus-lock';
|
|
57
58
|
|
|
58
|
-
const UserProfileField = ({ name, label, value, }) => {
|
|
59
|
+
const UserProfileField = ({ name, label, value, copykey, }) => {
|
|
59
60
|
const isEmpty = value === '';
|
|
60
61
|
const isEmailField = name === 'email';
|
|
61
|
-
return (jsxs("div", { className: 'user-profile-field', children: [label && (jsx(Typography, { as: 'h6', color: 'secondary', weight: 'regular', variant: 'body_small', children: label })), jsxs("div", { className: 'user-profile-field__value', children: [jsx(Typography, { color: isEmpty ? 'tertiary' : 'primary', as: 'p', weight: 'regular', variant: 'body_normal', children: value }), isEmailField && (jsx(VerifiedEmailIcon, { className: 'user-profile-field__verify-email-icon', overwriteTooltipProps: { as: 'div' } }))] })] }));
|
|
62
|
+
return (jsxs("div", { className: 'user-profile-field', children: [label && (jsx(Typography, { as: 'h6', color: 'secondary', weight: 'regular', variant: 'body_small', copykey: copykey, children: label })), jsxs("div", { className: 'user-profile-field__value', children: [jsx(Typography, { color: isEmpty ? 'tertiary' : 'primary', as: 'p', weight: 'regular', variant: 'body_normal', children: value }), isEmailField && (jsx(VerifiedEmailIcon, { className: 'user-profile-field__verify-email-icon', overwriteTooltipProps: { as: 'div' } }))] })] }));
|
|
62
63
|
};
|
|
63
64
|
|
|
64
65
|
export { UserProfileField };
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
7
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
7
8
|
require('@dynamic-labs/utils');
|
|
8
9
|
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
9
10
|
require('@dynamic-labs/wallet-connector-core');
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var iconic = require('@dynamic-labs/iconic');
|
|
7
7
|
require('react');
|
|
8
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
8
9
|
require('@dynamic-labs/utils');
|
|
9
10
|
var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
10
11
|
require('@dynamic-labs/wallet-connector-core');
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { SocialIcon } from '@dynamic-labs/iconic';
|
|
3
3
|
import 'react';
|
|
4
|
+
import '../../../../events/dynamicEvents.js';
|
|
4
5
|
import '@dynamic-labs/utils';
|
|
5
6
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
6
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
@@ -11,6 +11,8 @@ var utils = require('@dynamic-labs/utils');
|
|
|
11
11
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
12
12
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
13
13
|
var app = require('../../app.cjs');
|
|
14
|
+
var dynamicEvents = require('../../events/dynamicEvents.cjs');
|
|
15
|
+
var useEventListener = require('../../utils/hooks/events/useEventListener/useEventListener.cjs');
|
|
14
16
|
var CaptchaContext = require('../CaptchaContext/CaptchaContext.cjs');
|
|
15
17
|
var ErrorContext = require('../ErrorContext/ErrorContext.cjs');
|
|
16
18
|
var ViewContext = require('../ViewContext/ViewContext.cjs');
|
|
@@ -33,7 +35,6 @@ var api = require('../../data/api.cjs');
|
|
|
33
35
|
var EmailVerificationContext = require('../EmailVerificationContext/EmailVerificationContext.cjs');
|
|
34
36
|
require('react-dom');
|
|
35
37
|
var isSameWalletName = require('../../utils/functions/isSameWalletName/isSameWalletName.cjs');
|
|
36
|
-
var useEventListener = require('../../utils/hooks/useEventListener/useEventListener.cjs');
|
|
37
38
|
var useFetchNonce = require('../../utils/hooks/useFetchNonce/useFetchNonce.cjs');
|
|
38
39
|
var useFetchProjectSettings = require('../../utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs');
|
|
39
40
|
var ThemeContext = require('../ThemeContext/ThemeContext.cjs');
|
|
@@ -105,9 +106,9 @@ var useEmailLoginState = require('./hooks/useEmailLoginState/useEmailLoginState.
|
|
|
105
106
|
var useNameService = require('./hooks/useNameService/useNameService.cjs');
|
|
106
107
|
var useSelectedWalletConnector = require('./hooks/useSelectedWalletConnector/useSelectedWalletConnector.cjs');
|
|
107
108
|
var useSetShowAuthFlowWithInit = require('./hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs');
|
|
108
|
-
var useVerificationInProgress = require('./hooks/useVerificationInProgress/useVerificationInProgress.cjs');
|
|
109
109
|
var useShowPasskeyCreateSuccess = require('./hooks/useShowPasskeyCreateSuccess/useShowPasskeyCreateSuccess.cjs');
|
|
110
|
-
var
|
|
110
|
+
var useTieCallbacksToEvents = require('./hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs');
|
|
111
|
+
var useVerificationInProgress = require('./hooks/useVerificationInProgress/useVerificationInProgress.cjs');
|
|
111
112
|
var useCustomerCallbacks = require('./useCustomerCallbacks/useCustomerCallbacks.cjs');
|
|
112
113
|
var useCustomerAuthFlowCallbacks = require('./useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs');
|
|
113
114
|
var validators = require('./validators.cjs');
|
|
@@ -123,8 +124,9 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
123
124
|
if (bridgeChains) {
|
|
124
125
|
enableForcedNetworkValidation = true;
|
|
125
126
|
}
|
|
126
|
-
//
|
|
127
|
-
|
|
127
|
+
// Ties all client callbacks to dynamic's events, such that
|
|
128
|
+
// when our events are triggered, so are the client callbacks
|
|
129
|
+
useTieCallbacksToEvents.useTieCallbacksToEvents(eventsCallbacks);
|
|
128
130
|
let { walletConnectV1Bridge, appLogoUrl = 'https://demo.dynamic.xyz/assets/dynamic-logo.svg', appName = 'Dynamic Example', } = settings;
|
|
129
131
|
if (!environmentId) {
|
|
130
132
|
throw new utils.MissingEnvironmentIdError();
|
|
@@ -327,7 +329,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
327
329
|
});
|
|
328
330
|
}
|
|
329
331
|
(_k = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onLogout) === null || _k === void 0 ? void 0 : _k.call(eventsCallbacks, user);
|
|
330
|
-
|
|
332
|
+
dynamicEvents.dynamicEvents.emit('logout');
|
|
331
333
|
}), [
|
|
332
334
|
setSdkHasLoaded,
|
|
333
335
|
clearAllWalletConnectSessions,
|
|
@@ -398,23 +400,11 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
398
400
|
helpers.initExpirationTime(handleLogOut);
|
|
399
401
|
}, [handleLogOut]);
|
|
400
402
|
useCustomerAuthFlowCallbacks.useCustomerAuthFlowCallbacks({ eventsCallbacks, showAuthFlow });
|
|
401
|
-
const onEmailVerificationFailure = (email) => {
|
|
402
|
-
var _a;
|
|
403
|
-
(_a = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onEmailVerificationFailure) === null || _a === void 0 ? void 0 : _a.call(eventsCallbacks, email);
|
|
404
|
-
internalEventsRef.current.emit('emailVerificationResult', false, email);
|
|
405
|
-
};
|
|
406
|
-
const onEmailVerificationSuccess = (email) => {
|
|
407
|
-
var _a;
|
|
408
|
-
(_a = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onEmailVerificationSuccess) === null || _a === void 0 ? void 0 : _a.call(eventsCallbacks, email);
|
|
409
|
-
internalEventsRef.current.emit('emailVerificationResult', true, email);
|
|
410
|
-
};
|
|
411
403
|
const { setCallback } = useCustomerCallbacks.useCustomerCallbacks({
|
|
412
404
|
authMode,
|
|
413
405
|
callbacks: {
|
|
414
406
|
onAuthSuccess: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onAuthSuccess,
|
|
415
407
|
onConnect: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onConnect,
|
|
416
|
-
onEmailVerificationFailure,
|
|
417
|
-
onEmailVerificationSuccess,
|
|
418
408
|
onEmbeddedWalletCreated: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onEmbeddedWalletCreated,
|
|
419
409
|
onLinkSuccess: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onLinkSuccess,
|
|
420
410
|
onUserProfileUpdate: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onUserProfileUpdate,
|
|
@@ -506,7 +496,6 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
506
496
|
handleLogOut,
|
|
507
497
|
handleUnlinkWallet: authMode === 'connect-only' ? disconnectWallet : handleUnlinkWallet,
|
|
508
498
|
i18nSDKInstance,
|
|
509
|
-
internalEvents: internalEventsRef,
|
|
510
499
|
internalSetShowAuthFlow: setShowAuthFlow,
|
|
511
500
|
isAuthenticated,
|
|
512
501
|
isBridgeFlow,
|
|
@@ -692,8 +681,8 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
692
681
|
termsOfServiceUrl,
|
|
693
682
|
theme,
|
|
694
683
|
toolkitEnabled,
|
|
695
|
-
walletUiUtils,
|
|
696
684
|
walletConnectorOptions,
|
|
685
|
+
walletUiUtils,
|
|
697
686
|
walletsFilter,
|
|
698
687
|
]);
|
|
699
688
|
React.useEffect(() => {
|
|
@@ -738,7 +727,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
738
727
|
isBridgeFlow,
|
|
739
728
|
isFullyConnected,
|
|
740
729
|
isMultiWalletEnabled: multiWallet,
|
|
741
|
-
}),
|
|
730
|
+
}), children: [enableForcedNetworkValidation && jsxRuntime.jsx(UseNetworkValidation.UseNetworkValidation, {}), jsxRuntime.jsx(CaptchaContext.CaptchaContextProvider, { children: jsxRuntime.jsx(AccountExistsContext.AccountExistsContextProvider, { children: jsxRuntime.jsx(WalletContext.WalletContextProvider, { canSync: didConnectedStateLoad, children: jsxRuntime.jsx(QrCodeContext.QrCodeContextProvider, { children: jsxRuntime.jsx(EmailVerificationContext.EmailVerificationContextProvider, { children: jsxRuntime.jsx(DynamicWidgetContext.DynamicWidgetContextProvider, { children: jsxRuntime.jsx(DynamicBridgeWidgetContext.DynamicBridgeWidgetContextProvider, { children: jsxRuntime.jsx(FundingContext.FundingContextProvider, { children: jsxRuntime.jsx(AccessDeniedContext.AccessDeniedContextProvider, { children: jsxRuntime.jsx(SendBalanceContext.SendBalanceContextProvider, { children: jsxRuntime.jsx(WalletGroupContext.WalletGroupContextProvider, { children: jsxRuntime.jsxs(UserFieldEditorContext.UserFieldEditorContextProvider, { children: [jsxRuntime.jsx(app.DynamicAuthFlow, {}), jsxRuntime.jsx(Toolkit.Toolkit, {}), jsxRuntime.jsx(FundingWidget.FundingWidget, {}), jsxRuntime.jsx(SyncPasskeyFlow.SyncPasskeyFlow, {}), confirmationModal, children] }) }) }) }) }) }) }) }) }) }) }) })] }) }) }) }) }) }) }));
|
|
742
731
|
};
|
|
743
732
|
/** The context provider you need to have access too all of Dynamic's hooks */
|
|
744
733
|
const DynamicContextProvider = (props) => (jsxRuntime.jsx(UserWalletsContext.UserWalletsProvider, { children: jsxRuntime.jsx(InnerDynamicContextProvider, Object.assign({}, props)) }));
|