@dynamic-labs/sdk-react-core 3.0.0-alpha.37 → 3.0.0-alpha.38

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.
Files changed (164) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +11 -11
  5. package/src/lib/components/EmailForm/EmailForm.cjs +1 -1
  6. package/src/lib/components/EmailForm/EmailForm.js +1 -1
  7. package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +1 -1
  8. package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +1 -1
  9. package/src/lib/components/UserProfile/UserProfile.cjs +2 -1
  10. package/src/lib/components/UserProfile/UserProfile.js +2 -1
  11. package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.cjs +112 -0
  12. package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.d.ts +2 -0
  13. package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.js +108 -0
  14. package/src/lib/components/UserProfile/parts/EditProfileButton/index.d.ts +1 -0
  15. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -1
  16. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.d.ts +2 -1
  17. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +2 -2
  18. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -1
  19. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -1
  20. package/src/lib/components/index.d.ts +1 -1
  21. package/src/lib/context/CaptchaContext/CaptchaContext.cjs +22 -12
  22. package/src/lib/context/CaptchaContext/CaptchaContext.d.ts +1 -4
  23. package/src/lib/context/CaptchaContext/CaptchaContext.js +23 -12
  24. package/src/lib/data/api/mfa/mfa.cjs +2 -1
  25. package/src/lib/data/api/mfa/mfa.d.ts +2 -1
  26. package/src/lib/data/api/mfa/mfa.js +2 -1
  27. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +41 -3
  28. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +42 -4
  29. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -1
  30. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -1
  31. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -1
  32. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -1
  33. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -1
  34. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -1
  35. package/src/lib/locale/en/translation.cjs +23 -7
  36. package/src/lib/locale/en/translation.d.ts +21 -5
  37. package/src/lib/locale/en/translation.js +23 -7
  38. package/src/lib/shared/assets/currency.cjs +70 -0
  39. package/src/lib/shared/assets/currency.js +46 -0
  40. package/src/lib/shared/assets/index.d.ts +7 -0
  41. package/src/lib/shared/assets/profile-outline.cjs +54 -0
  42. package/src/lib/shared/assets/profile-outline.js +30 -0
  43. package/src/lib/shared/assets/profile.cjs +65 -0
  44. package/src/lib/shared/assets/profile.js +41 -0
  45. package/src/lib/shared/assets/settings-outline.cjs +54 -0
  46. package/src/lib/shared/assets/settings-outline.js +30 -0
  47. package/src/lib/shared/assets/settings.cjs +54 -0
  48. package/src/lib/shared/assets/settings.js +30 -0
  49. package/src/lib/shared/assets/wallet-outline-v2.cjs +54 -0
  50. package/src/lib/shared/assets/wallet-outline-v2.js +30 -0
  51. package/src/lib/shared/assets/wallet.cjs +52 -0
  52. package/src/lib/shared/assets/wallet.js +28 -0
  53. package/src/lib/styles/index.shadow.cjs +1 -1
  54. package/src/lib/styles/index.shadow.js +1 -1
  55. package/src/lib/utils/constants/localStorage.cjs +2 -0
  56. package/src/lib/utils/constants/localStorage.d.ts +1 -0
  57. package/src/lib/utils/constants/localStorage.js +2 -1
  58. package/src/lib/utils/hooks/useMfa/useMfa.cjs +2 -1
  59. package/src/lib/utils/hooks/useMfa/useMfa.d.ts +1 -1
  60. package/src/lib/utils/hooks/useMfa/useMfa.js +2 -1
  61. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +2 -1
  62. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +2 -1
  63. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +2 -1
  64. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +2 -1
  65. package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +1 -1
  66. package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +1 -1
  67. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -1
  68. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -1
  69. package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.cjs +1 -1
  70. package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.js +1 -1
  71. package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.cjs +1 -1
  72. package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.js +1 -1
  73. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +1 -1
  74. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +1 -1
  75. package/src/lib/views/EnterPasswordView/EnterPasswordView.cjs +1 -1
  76. package/src/lib/views/EnterPasswordView/EnterPasswordView.js +1 -1
  77. package/src/lib/views/FarcasterQrCodeView/FarcasterQrCodeView.cjs +0 -3
  78. package/src/lib/views/FarcasterQrCodeView/FarcasterQrCodeView.js +0 -3
  79. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +1 -1
  80. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +1 -1
  81. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +2 -0
  82. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +2 -0
  83. package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +1 -2
  84. package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +1 -2
  85. package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.cjs +1 -1
  86. package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.js +1 -1
  87. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +1 -1
  88. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +1 -1
  89. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +1 -1
  90. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +1 -1
  91. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +1 -1
  92. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +1 -1
  93. package/src/lib/views/MfaRecoveryView/MfaRecoveryView.cjs +1 -1
  94. package/src/lib/views/MfaRecoveryView/MfaRecoveryView.js +1 -1
  95. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +2 -2
  96. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +2 -2
  97. package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +15 -15
  98. package/src/lib/views/MfaVerificationView/MfaVerificationView.d.ts +2 -1
  99. package/src/lib/views/MfaVerificationView/MfaVerificationView.js +15 -15
  100. package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
  101. package/src/lib/views/NoAccess/NoAccess.js +1 -1
  102. package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +1 -1
  103. package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +1 -1
  104. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +1 -1
  105. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +1 -1
  106. package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +1 -1
  107. package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +1 -1
  108. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +1 -1
  109. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +1 -1
  110. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -1
  111. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -1
  112. package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +1 -1
  113. package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +1 -1
  114. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -1
  115. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -1
  116. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
  117. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
  118. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
  119. package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
  120. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
  121. package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
  122. package/src/lib/views/viewToComponentMap.d.ts +1 -1
  123. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -1
  124. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -1
  125. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
  126. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
  127. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.cjs +16 -0
  128. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.d.ts +13 -0
  129. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js +12 -0
  130. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/index.d.ts +1 -0
  131. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +23 -45
  132. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +24 -46
  133. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -1
  134. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -1
  135. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.cjs +2 -2
  136. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js +2 -2
  137. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +13 -2
  138. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +13 -2
  139. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -1
  140. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -1
  141. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +11 -0
  142. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +11 -0
  143. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +2 -2
  144. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +4 -3
  145. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +2 -2
  146. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -1
  147. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -1
  148. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -1
  149. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -1
  150. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -1
  151. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -1
  152. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +2 -2
  153. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +2 -2
  154. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -105
  155. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +2 -106
  156. package/src/lib/widgets/DynamicWidget/views/{WalletSettingsView/WalletSettingsView.cjs → SettingsView/SettingsView.cjs} +34 -26
  157. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.d.ts +2 -0
  158. package/src/lib/widgets/DynamicWidget/views/{WalletSettingsView/WalletSettingsView.js → SettingsView/SettingsView.js} +35 -27
  159. package/src/lib/widgets/DynamicWidget/views/SettingsView/index.d.ts +1 -0
  160. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +2 -15
  161. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +2 -15
  162. package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -1
  163. package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.d.ts +0 -2
  164. package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/index.d.ts +0 -1
@@ -62,8 +62,8 @@ import 'react-focus-lock';
62
62
  import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
63
63
  import { IconButton } from '../../../../components/IconButton/IconButton.js';
64
64
  import '../../../../components/MenuList/Dropdown/Dropdown.js';
65
- import 'formik';
66
65
  import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
66
+ import 'formik';
67
67
  import '../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
68
68
  import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
69
69
  import '../../../../components/Input/Input.js';
@@ -99,7 +99,7 @@ const ManagePasskeysWidgetView = () => {
99
99
  const { initPasskeyRecoveryProcess } = usePasskeyRecovery();
100
100
  const { t } = useTranslation();
101
101
  const isRecoveryEnabled = Boolean((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _a === void 0 ? void 0 : _a.emailRecoveryEnabled);
102
- const backButton = (jsx(IconButton, { type: 'button', onClick: () => setDynamicWidgetView('wallet-settings'), "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
102
+ const backButton = (jsx(IconButton, { type: 'button', onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
103
103
  return (jsxs("div", { className: 'manage-passkeys-widget-view', children: [jsx(ModalHeader, { leading: backButton, children: jsx("div", { className: 'send-balance-page-layout__header-content', children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_manage_passkeys.title', children: t('dyn_manage_passkeys.title') }) }) }), jsx(PasskeyCreatedSuccessBanner, {}), jsxs("div", { className: 'manage-passkeys-widget-view__body', children: [jsx("div", { className: 'manage-passkeys-widget-view__body__cards', children: isLoading ? (jsx(Skeleton, { count: 1, className: 'manage-passkeys-widget-view__body__cards__skeleton' })) : (userPasskeys.map((passkey) => (jsx(PasskeyCard, { passkey: passkey }, passkey.id)))) }), isRecoveryEnabled && (jsx(TypographyButton, { buttonPadding: 'large', buttonClassName: 'manage-passkeys-widget-view__body__recovery-button', onClick: () => initPasskeyRecoveryProcess('passkey'), showInternalLoading: false, startSlot: jsx(SvgAdd, {}), copykey: 'dyn_manage_passkeys.recovery_button', children: t('dyn_manage_passkeys.recovery_button') }))] })] }));
104
104
  };
105
105
 
@@ -5,111 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var UserProfile = require('../../../../components/UserProfile/UserProfile.cjs');
8
- var DynamicWidgetFooter = require('../../components/DynamicWidgetFooter/DynamicWidgetFooter.cjs');
9
- var classNames = require('../../../../utils/functions/classNames/classNames.cjs');
10
- require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
11
- require('../../../../components/Alert/Alert.cjs');
12
- require('react');
13
- require('../../../../events/dynamicEvents.cjs');
14
- require('../../../../../../_virtual/_tslib.cjs');
15
- require('@dynamic-labs/utils');
16
- require('../../../../context/DynamicContext/DynamicContext.cjs');
17
- require('@dynamic-labs/sdk-api-core');
18
- require('../../../../shared/logger.cjs');
19
- require('@dynamic-labs/iconic');
20
- require('@dynamic-labs/wallet-connector-core');
21
- require('../../../../context/ViewContext/ViewContext.cjs');
22
- var pencil = require('../../../../shared/assets/pencil.cjs');
23
- require('@dynamic-labs/wallet-book');
24
- require('../../../../utils/constants/colors.cjs');
25
- require('../../../../utils/constants/values.cjs');
26
- require('../../../../shared/utils/classes/storage/localStorage.cjs');
27
- require('../../../../shared/utils/classes/storage/sessionStorage.cjs');
28
- require('../../../../shared/consts/index.cjs');
29
- var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
30
- require('../../../../context/CaptchaContext/CaptchaContext.cjs');
31
- require('../../../../context/ErrorContext/ErrorContext.cjs');
32
- require('@dynamic-labs/multi-wallet');
33
- require('react-international-phone');
34
- require('../../../../config/ApiEndpoint.cjs');
35
- require('@dynamic-labs/store');
36
- require('../../../../locale/locale.cjs');
37
- var getUserProfileFields = require('../../../../utils/functions/getUserProfileFields/getUserProfileFields.cjs');
38
- require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
39
- require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
40
- require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
41
- require('../../../../context/VerificationContext/VerificationContext.cjs');
42
- require('react-dom');
43
- require('../../../../context/WalletContext/WalletContext.cjs');
44
- require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
45
- require('../../../../context/ThemeContext/ThemeContext.cjs');
46
- require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
47
- require('@dynamic-labs/types');
48
- require('../../../../context/LoadingContext/LoadingContext.cjs');
49
- require('yup');
50
- require('../../../../context/MockContext/MockContext.cjs');
51
- require('../../../../views/CollectUserDataView/useFields.cjs');
52
- require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
53
- require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
54
- require('@dynamic-labs/rpc-providers');
55
- require('react-i18next');
56
- require('../../../../context/FooterAnimationContext/index.cjs');
57
- require('../../../../components/ShadowDOM/ShadowDOM.cjs');
58
- require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
59
- require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
60
- require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
61
- require('../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
62
- require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
63
- require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
64
- require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
65
- require('react-focus-lock');
66
- var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
67
- require('../../../../components/IconButton/IconButton.cjs');
68
- require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
69
- require('formik');
70
- var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
71
- require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
72
- require('../../../../components/Input/Input.cjs');
73
- require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
74
- require('../../../../context/PasskeyContext/PasskeyContext.cjs');
75
- require('../ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
76
- require('../../../../../polyfills.cjs');
77
- require('../../../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
78
- require('../../../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
79
- require('../../../DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs');
80
- require('../../components/DynamicWidgetCard/DynamicWidgetCard.cjs');
81
- require('../../../../components/IsBrowser/IsBrowser.cjs');
82
- require('../../../../context/WidgetRegistry/WidgetRegistryContextProvider.cjs');
83
- require('../../../../context/FundingContext/FundingContext.cjs');
84
- require('../../../../components/Popper/Popper/Popper.cjs');
85
- require('../../../../components/Popper/PopperContext/PopperContext.cjs');
86
- require('../../../../views/WalletList/WalletList.cjs');
87
- require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
88
- require('@hcaptcha/react-hcaptcha');
89
- require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
90
- require('../../../../context/SendBalanceContext/SendBalanceContext.cjs');
91
- require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
92
- require('../../../../context/ConnectWithOtpContext/constants.cjs');
93
- require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
94
- require('../../../../components/InlineWidget/InlineWidget.cjs');
95
- var LogoutButton = require('../../../../components/LogoutButton/LogoutButton.cjs');
96
- require('qrcode');
97
8
 
98
- const ProfileView = () => {
99
- var _a, _b;
100
- const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
101
- const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
102
- // Allow to navigate to edit profile view when there are fields what can be edited
103
- const editableUserFields = getUserProfileFields.getEditableUserProfileFields([
104
- ...((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc) !== null && _a !== void 0 ? _a : []),
105
- ...((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.customFields) !== null && _b !== void 0 ? _b : []),
106
- ]);
107
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(UserProfile.UserProfile, { rootClassName: 'profile-view' }), jsxRuntime.jsx(DynamicWidgetFooter.DynamicWidgetFooter, { children: jsxRuntime.jsxs("div", { className: 'profile-view__footer', children: [editableUserFields.length > 0 && (jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'dynamic-widget-footer__button', buttonVariant: 'tertiary', buttonPadding: 'none', typographyProps: {
108
- color: 'secondary',
109
- variant: 'button_tertiary',
110
- }, onClick: () => setDynamicWidgetView('edit-profile'), startSlot: jsxRuntime.jsx(pencil.ReactComponent, {}), children: "Edit profile" })), jsxRuntime.jsx(LogoutButton.LogoutButton, { isTextButton: true, buttonClassName: classNames.classNames('dynamic-widget-footer__button', {
111
- 'dynamic-widget-footer__button-align-right': !(editableUserFields === null || editableUserFields === void 0 ? void 0 : editableUserFields.length),
112
- }) })] }) })] }));
113
- };
9
+ const ProfileView = () => (jsxRuntime.jsx(UserProfile.UserProfile, { rootClassName: 'profile-view' }));
114
10
 
115
11
  exports.ProfileView = ProfileView;
@@ -1,111 +1,7 @@
1
1
  'use client'
2
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { jsx } from 'react/jsx-runtime';
3
3
  import { UserProfile } from '../../../../components/UserProfile/UserProfile.js';
4
- import { DynamicWidgetFooter } from '../../components/DynamicWidgetFooter/DynamicWidgetFooter.js';
5
- import { classNames } from '../../../../utils/functions/classNames/classNames.js';
6
- import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
7
- import '../../../../components/Alert/Alert.js';
8
- import 'react';
9
- import '../../../../events/dynamicEvents.js';
10
- import '../../../../../../_virtual/_tslib.js';
11
- import '@dynamic-labs/utils';
12
- import '../../../../context/DynamicContext/DynamicContext.js';
13
- import '@dynamic-labs/sdk-api-core';
14
- import '../../../../shared/logger.js';
15
- import '@dynamic-labs/iconic';
16
- import '@dynamic-labs/wallet-connector-core';
17
- import '../../../../context/ViewContext/ViewContext.js';
18
- import { ReactComponent as SvgPencil } from '../../../../shared/assets/pencil.js';
19
- import '@dynamic-labs/wallet-book';
20
- import '../../../../utils/constants/colors.js';
21
- import '../../../../utils/constants/values.js';
22
- import '../../../../shared/utils/classes/storage/localStorage.js';
23
- import '../../../../shared/utils/classes/storage/sessionStorage.js';
24
- import '../../../../shared/consts/index.js';
25
- import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
26
- import '../../../../context/CaptchaContext/CaptchaContext.js';
27
- import '../../../../context/ErrorContext/ErrorContext.js';
28
- import '@dynamic-labs/multi-wallet';
29
- import 'react-international-phone';
30
- import '../../../../config/ApiEndpoint.js';
31
- import '@dynamic-labs/store';
32
- import '../../../../locale/locale.js';
33
- import { getEditableUserProfileFields } from '../../../../utils/functions/getUserProfileFields/getUserProfileFields.js';
34
- import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
35
- import '../../../../context/AccountExistsContext/AccountExistsContext.js';
36
- import '../../../../context/UserWalletsContext/UserWalletsContext.js';
37
- import '../../../../context/VerificationContext/VerificationContext.js';
38
- import 'react-dom';
39
- import '../../../../context/WalletContext/WalletContext.js';
40
- import '../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
41
- import '../../../../context/ThemeContext/ThemeContext.js';
42
- import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
43
- import '@dynamic-labs/types';
44
- import '../../../../context/LoadingContext/LoadingContext.js';
45
- import 'yup';
46
- import '../../../../context/MockContext/MockContext.js';
47
- import '../../../../views/CollectUserDataView/useFields.js';
48
- import '../../../../context/FieldsStateContext/FieldsStateContext.js';
49
- import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
50
- import '@dynamic-labs/rpc-providers';
51
- import 'react-i18next';
52
- import '../../../../context/FooterAnimationContext/index.js';
53
- import '../../../../components/ShadowDOM/ShadowDOM.js';
54
- import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
55
- import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
56
- import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
57
- import '../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
58
- import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
59
- import '../../../../context/WalletGroupContext/WalletGroupContext.js';
60
- import '../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
61
- import 'react-focus-lock';
62
- import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
63
- import '../../../../components/IconButton/IconButton.js';
64
- import '../../../../components/MenuList/Dropdown/Dropdown.js';
65
- import 'formik';
66
- import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
67
- import '../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
68
- import '../../../../components/Input/Input.js';
69
- import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
70
- import '../../../../context/PasskeyContext/PasskeyContext.js';
71
- import '../ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
72
- import '../../../../../polyfills.js';
73
- import '../../../../context/ErrorBoundary/ErrorBoundaryBase.js';
74
- import '../../../../context/ErrorBoundary/ErrorBoundaryContext.js';
75
- import '../../../DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js';
76
- import '../../components/DynamicWidgetCard/DynamicWidgetCard.js';
77
- import '../../../../components/IsBrowser/IsBrowser.js';
78
- import '../../../../context/WidgetRegistry/WidgetRegistryContextProvider.js';
79
- import '../../../../context/FundingContext/FundingContext.js';
80
- import '../../../../components/Popper/Popper/Popper.js';
81
- import '../../../../components/Popper/PopperContext/PopperContext.js';
82
- import '../../../../views/WalletList/WalletList.js';
83
- import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
84
- import '@hcaptcha/react-hcaptcha';
85
- import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
86
- import '../../../../context/SendBalanceContext/SendBalanceContext.js';
87
- import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
88
- import '../../../../context/ConnectWithOtpContext/constants.js';
89
- import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
90
- import '../../../../components/InlineWidget/InlineWidget.js';
91
- import { LogoutButton } from '../../../../components/LogoutButton/LogoutButton.js';
92
- import 'qrcode';
93
4
 
94
- const ProfileView = () => {
95
- var _a, _b;
96
- const { setDynamicWidgetView } = useWidgetContext();
97
- const { projectSettings } = useInternalDynamicContext();
98
- // Allow to navigate to edit profile view when there are fields what can be edited
99
- const editableUserFields = getEditableUserProfileFields([
100
- ...((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc) !== null && _a !== void 0 ? _a : []),
101
- ...((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.customFields) !== null && _b !== void 0 ? _b : []),
102
- ]);
103
- return (jsxs(Fragment, { children: [jsx(UserProfile, { rootClassName: 'profile-view' }), jsx(DynamicWidgetFooter, { children: jsxs("div", { className: 'profile-view__footer', children: [editableUserFields.length > 0 && (jsx(TypographyButton, { buttonClassName: 'dynamic-widget-footer__button', buttonVariant: 'tertiary', buttonPadding: 'none', typographyProps: {
104
- color: 'secondary',
105
- variant: 'button_tertiary',
106
- }, onClick: () => setDynamicWidgetView('edit-profile'), startSlot: jsx(SvgPencil, {}), children: "Edit profile" })), jsx(LogoutButton, { isTextButton: true, buttonClassName: classNames('dynamic-widget-footer__button', {
107
- 'dynamic-widget-footer__button-align-right': !(editableUserFields === null || editableUserFields === void 0 ? void 0 : editableUserFields.length),
108
- }) })] }) })] }));
109
- };
5
+ const ProfileView = () => (jsx(UserProfile, { rootClassName: 'profile-view' }));
110
6
 
111
7
  export { ProfileView };
@@ -26,7 +26,9 @@ var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
26
26
  var exportPrivateKey = require('../../../../shared/assets/export-private-key.cjs');
27
27
  var exportRecoveryPhrase = require('../../../../shared/assets/export-recovery-phrase.cjs');
28
28
  var footerInfoIcon = require('../../../../shared/assets/footer-info-icon.cjs');
29
+ var logout = require('../../../../shared/assets/logout.cjs');
29
30
  var signInWithEmail = require('../../../../shared/assets/sign-in-with-email.cjs');
31
+ var currency = require('../../../../shared/assets/currency.cjs');
30
32
  require('@dynamic-labs/wallet-book');
31
33
  require('../../../../utils/constants/colors.cjs');
32
34
  require('../../../../utils/constants/values.cjs');
@@ -41,6 +43,7 @@ require('react-international-phone');
41
43
  require('../../../../config/ApiEndpoint.cjs');
42
44
  require('@dynamic-labs/store');
43
45
  require('../../../../locale/locale.cjs');
46
+ var getEOAWallet = require('../../../../utils/functions/getEOAWallet/getEOAWallet.cjs');
44
47
  require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
45
48
  require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
46
49
  require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
@@ -74,10 +77,10 @@ require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
74
77
  require('react-focus-lock');
75
78
  var Icon = require('../../../../components/Icon/Icon.cjs');
76
79
  var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
77
- var IconButton = require('../../../../components/IconButton/IconButton.cjs');
80
+ require('../../../../components/IconButton/IconButton.cjs');
78
81
  require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
79
- require('formik');
80
82
  var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
83
+ require('formik');
81
84
  require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
82
85
  var spinner = require('../../../../components/Spinner/spinner.cjs');
83
86
  var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
@@ -110,10 +113,10 @@ var useEmbeddedWalletAuthenticator = require('../../../../utils/hooks/useEmbedde
110
113
  require('../../../../components/InlineWidget/InlineWidget.cjs');
111
114
  require('qrcode');
112
115
 
113
- const WalletSettingsView = () => {
114
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
115
- const { projectSettings, primaryWallet, user } = useInternalDynamicContext.useInternalDynamicContext();
116
- const { goToInitialDynamicWidgetView, setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
116
+ const SettingsView = () => {
117
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
118
+ const { projectSettings, primaryWallet, user, handleLogOut } = useInternalDynamicContext.useInternalDynamicContext();
119
+ const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
117
120
  const { addEmbeddedWalletRecoveryEmail } = useEmbeddedWalletAuthenticator.useEmbeddedWalletAuthenticator();
118
121
  const { createPassword } = useEmbeddedWallet.useEmbeddedWallet();
119
122
  const { initExportProcess } = useEmbeddedReveal.useEmbeddedReveal();
@@ -154,38 +157,43 @@ const WalletSettingsView = () => {
154
157
  });
155
158
  const renderPasskeysButtonEndSlot = () => {
156
159
  if (isTurnkeyWalletWithAuthenticator)
157
- return (jsxRuntime.jsx(checkCircle.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' }));
160
+ return (jsxRuntime.jsx(checkCircle.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--success' }));
158
161
  if (isLoading)
159
162
  return jsxRuntime.jsx(spinner.Spinner, {});
160
163
  return jsxRuntime.jsx(add.ReactComponent, {});
161
164
  };
162
165
  const renderEmailButtonEndSlot = () => {
163
166
  if (hasRecoveryEmail)
164
- return (jsxRuntime.jsx(checkCircle.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' }));
167
+ return (jsxRuntime.jsx(checkCircle.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--success' }));
165
168
  if (isLoading)
166
169
  return jsxRuntime.jsx(spinner.Spinner, {});
167
170
  return jsxRuntime.jsx(add.ReactComponent, { "data-testid": 'email-add-icon' });
168
171
  };
169
- const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: goToInitialDynamicWidgetView, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
172
+ const wallet = getEOAWallet.getEOAWallet(primaryWallet, (user === null || user === void 0 ? void 0 : user.verifiedCredentials) || []);
173
+ const isEmbeddedWallet = Boolean(wallet &&
174
+ (((_m = (_l = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _l === void 0 ? void 0 : _l.key) === null || _m === void 0 ? void 0 : _m.startsWith('turnkey')) ||
175
+ ((_p = (_o = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _o === void 0 ? void 0 : _o.key) === null || _p === void 0 ? void 0 : _p.startsWith('coinbasempc'))));
170
176
  const showSigninSection = (isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatibleWallet) ||
171
177
  isCoinbaseWallet;
172
- return (jsxRuntime.jsxs("div", { className: 'wallet-settings-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx("div", { className: 'wallet-settings-view__header', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_wallet_settings.title', children: t('dyn_wallet_settings.title') }) }) }), jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body', children: [showSigninSection && (jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxRuntime.jsxs("div", { className: classNames.classNames('wallet-settings-view__body__section__title', {
173
- 'wallet-settings-view__body__section__title__info-icon': !isTurnkeyWalletWithAuthenticator,
174
- }), children: [t('dyn_wallet_settings.signing_section.title'), !isTurnkeyWalletWithAuthenticator && (jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, { className: 'wallet-settings-view__body__section__title__info-icon' }) }))] }), isPasskeyEnabled && isTurnkeyWallet && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-passkeys-button', onClick: () => handlePasskeyClick(), buttonClassName: classNames.classNames('wallet-settings-view__body__section__button', {
175
- 'wallet-settings-view__body__section__button__badge': !isTurnkeyWalletWithAuthenticator,
176
- }), startSlot:
177
- // eslint-disable-next-line react/jsx-wrap-multilines
178
- jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(PasskeyDeviceIcon.PasskeyDeviceIcon, { className: 'wallet-settings-view__body__section__button__icon', defaultIcon: jsxRuntime.jsx(androidTouchId.ReactComponent, { "data-testid": 'default-icon' }) }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.passkey_button') }), !isTurnkeyWalletWithAuthenticator && (jsxRuntime.jsx(Badge.Badge, { text: t('dyn_wallet_settings.tags.recommended'), copykey: 'dyn_wallet_settings.tags.recommended', variant: 'secondary' }))] }), endSlot: renderPasskeysButtonEndSlot(), disabled: isLoading, showInternalLoading: false })), isCoinbaseWallet && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-password-button', onClick: () => createPassword(!hasClaimedCoinbaseMPC), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
179
- // eslint-disable-next-line react/jsx-wrap-multilines
180
- jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(altKey.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsxRuntime.jsx(checkCircle.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isTurnkeyWallet &&
181
- !hasRecoveryEmail &&
182
- !isSessionKeyCompatibleWallet && (jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxRuntime.jsxs("div", { className: classNames.classNames('wallet-settings-view__body__section__title', 'wallet-settings-view__body__section__title__info-icon'), children: [t('dyn_wallet_settings.identity_section.title'), jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, { className: 'wallet-settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) })] }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames.classNames('wallet-settings-view__body__section__button', 'wallet-settings-view__body__section__button__badge'), startSlot:
183
- // eslint-disable-next-line react/jsx-wrap-multilines
184
- jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(signInWithEmail.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon email' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.identity_section.add_email_button', children: t('dyn_wallet_settings.identity_section.add_email_button') }), jsxRuntime.jsx(Badge.Badge, { text: t('dyn_wallet_settings.tags.recommended'), copykey: 'dyn_wallet_settings.tags.recommended', variant: 'secondary' })] }), endSlot: renderEmailButtonEndSlot(), disabled: isLoading || hasRecoveryEmail, showInternalLoading: false })] })), jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxRuntime.jsx("div", { className: 'wallet-settings-view__body__section__title', children: t('dyn_wallet_settings.export_section.title') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'embedded-reveal-account-button', onClick: () => handleExportClick(), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
185
- // eslint-disable-next-line react/jsx-wrap-multilines
186
- jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(exportPrivateKey.ReactComponent, { className: `wallet-settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.export_section.private_key_button', children: t('dyn_wallet_settings.export_section.private_key_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'embedded-reveal-button', onClick: () => handleExportClick(true), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
178
+ return (jsxRuntime.jsxs("div", { className: 'settings-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { children: jsxRuntime.jsx("div", { className: 'settings-view__header', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_settings.title', children: t('dyn_settings.title') }) }) }), jsxRuntime.jsxs("div", { className: 'settings-view__body', children: [jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.global_section.title') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'currency-button', buttonClassName: classNames.classNames('settings-view__body__section__button', 'settings-view__body__section__button__badge'), startSlot:
187
179
  // eslint-disable-next-line react/jsx-wrap-multilines
188
- jsxRuntime.jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(exportRecoveryPhrase.ReactComponent, { className: `wallet-settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.export_section.srp_button', children: t('dyn_wallet_settings.export_section.srp_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'wallet-settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }))] })] })] }));
180
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(currency.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.global_section.currency.badge', children: t('dyn_settings.global_section.currency.title') }), jsxRuntime.jsx(Badge.Badge, { text: t('dyn_settings.global_section.currency.badge'), copykey: 'dyn_settings.global_section.currency.badge', variant: 'secondary' })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: true, showInternalLoading: false })] }), isEmbeddedWallet && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showSigninSection && (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsxs("div", { className: classNames.classNames('settings-view__body__section__title', {
181
+ 'settings-view__body__section__title__info-icon': !isTurnkeyWalletWithAuthenticator,
182
+ }), children: [t('dyn_settings.security_section.title'), !isTurnkeyWalletWithAuthenticator && (jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, { className: 'settings-view__body__section__title__info-icon' }) }))] }), isPasskeyEnabled && isTurnkeyWallet && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-passkeys-button', onClick: () => handlePasskeyClick(), buttonClassName: classNames.classNames('settings-view__body__section__button', {
183
+ 'settings-view__body__section__button__badge': !isTurnkeyWalletWithAuthenticator,
184
+ }), startSlot:
185
+ // eslint-disable-next-line react/jsx-wrap-multilines
186
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(PasskeyDeviceIcon.PasskeyDeviceIcon, { className: 'settings-view__body__section__button__icon', defaultIcon: jsxRuntime.jsx(androidTouchId.ReactComponent, { "data-testid": 'default-icon' }) }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.passkey_button', children: t('dyn_settings.security_section.passkey_button') }), !isTurnkeyWalletWithAuthenticator && (jsxRuntime.jsx(Badge.Badge, { text: t('dyn_settings.tags.recommended'), copykey: 'dyn_settings.tags.recommended', variant: 'secondary' }))] }), endSlot: renderPasskeysButtonEndSlot(), disabled: isLoading, showInternalLoading: false })), isCoinbaseWallet && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-password-button', onClick: () => createPassword(!hasClaimedCoinbaseMPC), buttonClassName: 'settings-view__body__section__button', startSlot:
187
+ // eslint-disable-next-line react/jsx-wrap-multilines
188
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(altKey.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.passkey_button', children: t('dyn_settings.security_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsxRuntime.jsx(checkCircle.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isTurnkeyWallet &&
189
+ !hasRecoveryEmail &&
190
+ !isSessionKeyCompatibleWallet && (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsxs("div", { className: classNames.classNames('settings-view__body__section__title', 'settings-view__body__section__title__info-icon'), children: [t('dyn_settings.identity_section.title'), jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, { className: 'settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) })] }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames.classNames('settings-view__body__section__button', 'settings-view__body__section__button__badge'), startSlot:
191
+ // eslint-disable-next-line react/jsx-wrap-multilines
192
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(signInWithEmail.ReactComponent, { className: 'settings-view__body__section__button__icon email' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.identity_section.add_email_button', children: t('dyn_settings.identity_section.add_email_button') }), jsxRuntime.jsx(Badge.Badge, { text: t('dyn_settings.tags.recommended'), copykey: 'dyn_settings.tags.recommended', variant: 'secondary' })] }), endSlot: renderEmailButtonEndSlot(), disabled: isLoading || hasRecoveryEmail, showInternalLoading: false })] })), jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.export_section.title') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'embedded-reveal-account-button', onClick: () => handleExportClick(), buttonClassName: 'settings-view__body__section__button', startSlot:
193
+ // eslint-disable-next-line react/jsx-wrap-multilines
194
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(exportPrivateKey.ReactComponent, { className: `settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.private_key_button', children: t('dyn_settings.export_section.private_key_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'embedded-reveal-button', onClick: () => handleExportClick(true), buttonClassName: 'settings-view__body__section__button', startSlot:
195
+ // eslint-disable-next-line react/jsx-wrap-multilines
196
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(exportRecoveryPhrase.ReactComponent, { className: `settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.srp_button', children: t('dyn_settings.export_section.srp_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }))] })] }))] }), jsxRuntime.jsx("div", { className: 'settings-view__logout-button-container', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'settings-view__logout-button-container__button', onClick: handleLogOut, dataTestId: 'logout-button', copykey: 'dyn_settings.buttonLogout', startSlot: jsxRuntime.jsx(logout.ReactComponent, {}), children: t('dyn_settings.button_logout') }) })] }));
189
197
  };
190
198
 
191
- exports.WalletSettingsView = WalletSettingsView;
199
+ exports.SettingsView = SettingsView;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const SettingsView: FC;
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../../_virtual/_tslib.js';
3
- import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
4
  import { useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { isCoinbaseMpcWalletConnector, isSessionKeyCompatibleWalletConnector } from '@dynamic-labs/wallet-connector-core';
@@ -22,7 +22,9 @@ import { ReactComponent as SvgChevronLeft } from '../../../../shared/assets/chev
22
22
  import { ReactComponent as SvgExportPrivateKey } from '../../../../shared/assets/export-private-key.js';
23
23
  import { ReactComponent as SvgExportRecoveryPhrase } from '../../../../shared/assets/export-recovery-phrase.js';
24
24
  import { ReactComponent as SvgFooterInfoIcon } from '../../../../shared/assets/footer-info-icon.js';
25
+ import { ReactComponent as SvgLogout } from '../../../../shared/assets/logout.js';
25
26
  import { ReactComponent as SvgSignInWithEmail } from '../../../../shared/assets/sign-in-with-email.js';
27
+ import { ReactComponent as SvgCurrency } from '../../../../shared/assets/currency.js';
26
28
  import '@dynamic-labs/wallet-book';
27
29
  import '../../../../utils/constants/colors.js';
28
30
  import '../../../../utils/constants/values.js';
@@ -37,6 +39,7 @@ import 'react-international-phone';
37
39
  import '../../../../config/ApiEndpoint.js';
38
40
  import '@dynamic-labs/store';
39
41
  import '../../../../locale/locale.js';
42
+ import { getEOAWallet } from '../../../../utils/functions/getEOAWallet/getEOAWallet.js';
40
43
  import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
41
44
  import '../../../../context/AccountExistsContext/AccountExistsContext.js';
42
45
  import '../../../../context/UserWalletsContext/UserWalletsContext.js';
@@ -70,10 +73,10 @@ import '../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
70
73
  import 'react-focus-lock';
71
74
  import { Icon } from '../../../../components/Icon/Icon.js';
72
75
  import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
73
- import { IconButton } from '../../../../components/IconButton/IconButton.js';
76
+ import '../../../../components/IconButton/IconButton.js';
74
77
  import '../../../../components/MenuList/Dropdown/Dropdown.js';
75
- import 'formik';
76
78
  import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
79
+ import 'formik';
77
80
  import '../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
78
81
  import { Spinner } from '../../../../components/Spinner/spinner.js';
79
82
  import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
@@ -106,10 +109,10 @@ import { useEmbeddedWalletAuthenticator } from '../../../../utils/hooks/useEmbed
106
109
  import '../../../../components/InlineWidget/InlineWidget.js';
107
110
  import 'qrcode';
108
111
 
109
- const WalletSettingsView = () => {
110
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
111
- const { projectSettings, primaryWallet, user } = useInternalDynamicContext();
112
- const { goToInitialDynamicWidgetView, setDynamicWidgetView } = useWidgetContext();
112
+ const SettingsView = () => {
113
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
114
+ const { projectSettings, primaryWallet, user, handleLogOut } = useInternalDynamicContext();
115
+ const { setDynamicWidgetView } = useWidgetContext();
113
116
  const { addEmbeddedWalletRecoveryEmail } = useEmbeddedWalletAuthenticator();
114
117
  const { createPassword } = useEmbeddedWallet();
115
118
  const { initExportProcess } = useEmbeddedReveal();
@@ -150,38 +153,43 @@ const WalletSettingsView = () => {
150
153
  });
151
154
  const renderPasskeysButtonEndSlot = () => {
152
155
  if (isTurnkeyWalletWithAuthenticator)
153
- return (jsx(SvgCheckCircle, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' }));
156
+ return (jsx(SvgCheckCircle, { className: 'settings-view__body__section__button__icon-secondary--success' }));
154
157
  if (isLoading)
155
158
  return jsx(Spinner, {});
156
159
  return jsx(SvgAdd, {});
157
160
  };
158
161
  const renderEmailButtonEndSlot = () => {
159
162
  if (hasRecoveryEmail)
160
- return (jsx(SvgCheckCircle, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' }));
163
+ return (jsx(SvgCheckCircle, { className: 'settings-view__body__section__button__icon-secondary--success' }));
161
164
  if (isLoading)
162
165
  return jsx(Spinner, {});
163
166
  return jsx(SvgAdd, { "data-testid": 'email-add-icon' });
164
167
  };
165
- const backButton = (jsx(IconButton, { type: 'button', onClick: goToInitialDynamicWidgetView, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
168
+ const wallet = getEOAWallet(primaryWallet, (user === null || user === void 0 ? void 0 : user.verifiedCredentials) || []);
169
+ const isEmbeddedWallet = Boolean(wallet &&
170
+ (((_m = (_l = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _l === void 0 ? void 0 : _l.key) === null || _m === void 0 ? void 0 : _m.startsWith('turnkey')) ||
171
+ ((_p = (_o = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _o === void 0 ? void 0 : _o.key) === null || _p === void 0 ? void 0 : _p.startsWith('coinbasempc'))));
166
172
  const showSigninSection = (isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatibleWallet) ||
167
173
  isCoinbaseWallet;
168
- return (jsxs("div", { className: 'wallet-settings-view', children: [jsx(ModalHeader, { leading: backButton, children: jsx("div", { className: 'wallet-settings-view__header', children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_wallet_settings.title', children: t('dyn_wallet_settings.title') }) }) }), jsxs("div", { className: 'wallet-settings-view__body', children: [showSigninSection && (jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxs("div", { className: classNames('wallet-settings-view__body__section__title', {
169
- 'wallet-settings-view__body__section__title__info-icon': !isTurnkeyWalletWithAuthenticator,
170
- }), children: [t('dyn_wallet_settings.signing_section.title'), !isTurnkeyWalletWithAuthenticator && (jsx(Icon, { size: 'small', children: jsx(SvgFooterInfoIcon, { className: 'wallet-settings-view__body__section__title__info-icon' }) }))] }), isPasskeyEnabled && isTurnkeyWallet && (jsx(TypographyButton, { dataTestId: 'manage-passkeys-button', onClick: () => handlePasskeyClick(), buttonClassName: classNames('wallet-settings-view__body__section__button', {
171
- 'wallet-settings-view__body__section__button__badge': !isTurnkeyWalletWithAuthenticator,
172
- }), startSlot:
173
- // eslint-disable-next-line react/jsx-wrap-multilines
174
- jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(PasskeyDeviceIcon, { className: 'wallet-settings-view__body__section__button__icon', defaultIcon: jsx(SvgAndroidTouchId, { "data-testid": 'default-icon' }) }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.passkey_button') }), !isTurnkeyWalletWithAuthenticator && (jsx(Badge, { text: t('dyn_wallet_settings.tags.recommended'), copykey: 'dyn_wallet_settings.tags.recommended', variant: 'secondary' }))] }), endSlot: renderPasskeysButtonEndSlot(), disabled: isLoading, showInternalLoading: false })), isCoinbaseWallet && (jsx(TypographyButton, { dataTestId: 'manage-password-button', onClick: () => createPassword(!hasClaimedCoinbaseMPC), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
175
- // eslint-disable-next-line react/jsx-wrap-multilines
176
- jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(SvgAltKey, { className: 'wallet-settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.signing_section.passkey_button', children: t('dyn_wallet_settings.signing_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsx(SvgCheckCircle, { className: 'wallet-settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isTurnkeyWallet &&
177
- !hasRecoveryEmail &&
178
- !isSessionKeyCompatibleWallet && (jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsxs("div", { className: classNames('wallet-settings-view__body__section__title', 'wallet-settings-view__body__section__title__info-icon'), children: [t('dyn_wallet_settings.identity_section.title'), jsx(Icon, { size: 'small', children: jsx(SvgFooterInfoIcon, { className: 'wallet-settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) })] }), jsx(TypographyButton, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames('wallet-settings-view__body__section__button', 'wallet-settings-view__body__section__button__badge'), startSlot:
179
- // eslint-disable-next-line react/jsx-wrap-multilines
180
- jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(SvgSignInWithEmail, { className: 'wallet-settings-view__body__section__button__icon email' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.identity_section.add_email_button', children: t('dyn_wallet_settings.identity_section.add_email_button') }), jsx(Badge, { text: t('dyn_wallet_settings.tags.recommended'), copykey: 'dyn_wallet_settings.tags.recommended', variant: 'secondary' })] }), endSlot: renderEmailButtonEndSlot(), disabled: isLoading || hasRecoveryEmail, showInternalLoading: false })] })), jsxs("div", { className: 'wallet-settings-view__body__section', children: [jsx("div", { className: 'wallet-settings-view__body__section__title', children: t('dyn_wallet_settings.export_section.title') }), jsx(TypographyButton, { dataTestId: 'embedded-reveal-account-button', onClick: () => handleExportClick(), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
181
- // eslint-disable-next-line react/jsx-wrap-multilines
182
- jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(SvgExportPrivateKey, { className: `wallet-settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.export_section.private_key_button', children: t('dyn_wallet_settings.export_section.private_key_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'wallet-settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && (jsx(TypographyButton, { dataTestId: 'embedded-reveal-button', onClick: () => handleExportClick(true), buttonClassName: 'wallet-settings-view__body__section__button', startSlot:
174
+ return (jsxs("div", { className: 'settings-view', children: [jsx(ModalHeader, { children: jsx("div", { className: 'settings-view__header', children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_settings.title', children: t('dyn_settings.title') }) }) }), jsxs("div", { className: 'settings-view__body', children: [jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.global_section.title') }), jsx(TypographyButton, { dataTestId: 'currency-button', buttonClassName: classNames('settings-view__body__section__button', 'settings-view__body__section__button__badge'), startSlot:
183
175
  // eslint-disable-next-line react/jsx-wrap-multilines
184
- jsxs("div", { className: 'wallet-settings-view__body__section__button__start-slot', children: [jsx(SvgExportRecoveryPhrase, { className: `wallet-settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_wallet_settings.export_section.srp_button', children: t('dyn_wallet_settings.export_section.srp_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'wallet-settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }))] })] })] }));
176
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgCurrency, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.global_section.currency.badge', children: t('dyn_settings.global_section.currency.title') }), jsx(Badge, { text: t('dyn_settings.global_section.currency.badge'), copykey: 'dyn_settings.global_section.currency.badge', variant: 'secondary' })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: true, showInternalLoading: false })] }), isEmbeddedWallet && (jsxs(Fragment, { children: [showSigninSection && (jsxs("div", { className: 'settings-view__body__section', children: [jsxs("div", { className: classNames('settings-view__body__section__title', {
177
+ 'settings-view__body__section__title__info-icon': !isTurnkeyWalletWithAuthenticator,
178
+ }), children: [t('dyn_settings.security_section.title'), !isTurnkeyWalletWithAuthenticator && (jsx(Icon, { size: 'small', children: jsx(SvgFooterInfoIcon, { className: 'settings-view__body__section__title__info-icon' }) }))] }), isPasskeyEnabled && isTurnkeyWallet && (jsx(TypographyButton, { dataTestId: 'manage-passkeys-button', onClick: () => handlePasskeyClick(), buttonClassName: classNames('settings-view__body__section__button', {
179
+ 'settings-view__body__section__button__badge': !isTurnkeyWalletWithAuthenticator,
180
+ }), startSlot:
181
+ // eslint-disable-next-line react/jsx-wrap-multilines
182
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(PasskeyDeviceIcon, { className: 'settings-view__body__section__button__icon', defaultIcon: jsx(SvgAndroidTouchId, { "data-testid": 'default-icon' }) }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.passkey_button', children: t('dyn_settings.security_section.passkey_button') }), !isTurnkeyWalletWithAuthenticator && (jsx(Badge, { text: t('dyn_settings.tags.recommended'), copykey: 'dyn_settings.tags.recommended', variant: 'secondary' }))] }), endSlot: renderPasskeysButtonEndSlot(), disabled: isLoading, showInternalLoading: false })), isCoinbaseWallet && (jsx(TypographyButton, { dataTestId: 'manage-password-button', onClick: () => createPassword(!hasClaimedCoinbaseMPC), buttonClassName: 'settings-view__body__section__button', startSlot:
183
+ // eslint-disable-next-line react/jsx-wrap-multilines
184
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgAltKey, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.passkey_button', children: t('dyn_settings.security_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsx(SvgCheckCircle, { className: 'settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isTurnkeyWallet &&
185
+ !hasRecoveryEmail &&
186
+ !isSessionKeyCompatibleWallet && (jsxs("div", { className: 'settings-view__body__section', children: [jsxs("div", { className: classNames('settings-view__body__section__title', 'settings-view__body__section__title__info-icon'), children: [t('dyn_settings.identity_section.title'), jsx(Icon, { size: 'small', children: jsx(SvgFooterInfoIcon, { className: 'settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) })] }), jsx(TypographyButton, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames('settings-view__body__section__button', 'settings-view__body__section__button__badge'), startSlot:
187
+ // eslint-disable-next-line react/jsx-wrap-multilines
188
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgSignInWithEmail, { className: 'settings-view__body__section__button__icon email' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.identity_section.add_email_button', children: t('dyn_settings.identity_section.add_email_button') }), jsx(Badge, { text: t('dyn_settings.tags.recommended'), copykey: 'dyn_settings.tags.recommended', variant: 'secondary' })] }), endSlot: renderEmailButtonEndSlot(), disabled: isLoading || hasRecoveryEmail, showInternalLoading: false })] })), jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.export_section.title') }), jsx(TypographyButton, { dataTestId: 'embedded-reveal-account-button', onClick: () => handleExportClick(), buttonClassName: 'settings-view__body__section__button', startSlot:
189
+ // eslint-disable-next-line react/jsx-wrap-multilines
190
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgExportPrivateKey, { className: `settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.private_key_button', children: t('dyn_settings.export_section.private_key_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && (jsx(TypographyButton, { dataTestId: 'embedded-reveal-button', onClick: () => handleExportClick(true), buttonClassName: 'settings-view__body__section__button', startSlot:
191
+ // eslint-disable-next-line react/jsx-wrap-multilines
192
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgExportRecoveryPhrase, { className: `settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}` }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.srp_button', children: t('dyn_settings.export_section.srp_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }))] })] }))] }), jsx("div", { className: 'settings-view__logout-button-container', children: jsx(TypographyButton, { buttonClassName: 'settings-view__logout-button-container__button', onClick: handleLogOut, dataTestId: 'logout-button', copykey: 'dyn_settings.buttonLogout', startSlot: jsx(SvgLogout, {}), children: t('dyn_settings.button_logout') }) })] }));
185
193
  };
186
194
 
187
- export { WalletSettingsView };
195
+ export { SettingsView };
@@ -0,0 +1 @@
1
+ export { SettingsView } from './SettingsView';
@@ -16,7 +16,6 @@ require('../../../../shared/logger.cjs');
16
16
  require('@dynamic-labs/iconic');
17
17
  require('@dynamic-labs/wallet-connector-core');
18
18
  require('../../../../context/ViewContext/ViewContext.cjs');
19
- var add = require('../../../../shared/assets/add.cjs');
20
19
  require('@dynamic-labs/wallet-book');
21
20
  require('../../../../utils/constants/colors.cjs');
22
21
  require('../../../../utils/constants/values.cjs');
@@ -51,7 +50,6 @@ require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs')
51
50
  require('@dynamic-labs/rpc-providers');
52
51
  require('react-i18next');
53
52
  var Typography = require('../../../../components/Typography/Typography.cjs');
54
- var DynamicWidgetFooter = require('../../components/DynamicWidgetFooter/DynamicWidgetFooter.cjs');
55
53
  require('../../../../context/FooterAnimationContext/index.cjs');
56
54
  require('../../../../components/ShadowDOM/ShadowDOM.cjs');
57
55
  require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
@@ -68,7 +66,6 @@ var SingleWalletButtons = require('../../components/SingleWalletButtons/SingleWa
68
66
  require('../../../../components/IconButton/IconButton.cjs');
69
67
  require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
70
68
  require('formik');
71
- var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
72
69
  require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
73
70
  require('../../../../components/Input/Input.cjs');
74
71
  require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
@@ -92,23 +89,13 @@ require('../../../../context/SendBalanceContext/SendBalanceContext.cjs');
92
89
  require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
93
90
  require('../../../../context/ConnectWithOtpContext/constants.cjs');
94
91
  require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
95
- var useDynamicModals = require('../../../../utils/hooks/useDynamicModals/useDynamicModals.cjs');
96
92
  require('../../../../components/InlineWidget/InlineWidget.cjs');
97
- var LogoutButton = require('../../../../components/LogoutButton/LogoutButton.cjs');
98
93
  require('qrcode');
99
94
 
100
95
  const WalletsView = () => {
101
- const { setSelectedWalletConnectorKey, user, authMode, multiWallet } = useInternalDynamicContext.useInternalDynamicContext();
102
- const { setShowLinkNewWalletModal } = useDynamicModals.useDynamicModals();
96
+ const { user, multiWallet } = useInternalDynamicContext.useInternalDynamicContext();
103
97
  const isKYCEnabled = useKYCFlag.useKYCFlag();
104
- const addNewWallet = () => {
105
- setShowLinkNewWalletModal(true);
106
- setSelectedWalletConnectorKey(null);
107
- };
108
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!multiWallet && !isKYCEnabled && (jsxRuntime.jsxs("div", { className: 'dynamic-widget-index-view__email-container', children: [jsxRuntime.jsx(Typography.Typography, { children: user === null || user === void 0 ? void 0 : user.email }), jsxRuntime.jsx(SingleWalletButtons.SingleWalletButtons, {})] })), multiWallet && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DynamicWidgetWallets.DynamicWidgetWallets, {}), jsxRuntime.jsx(DynamicWidgetFooter.DynamicWidgetFooter, { children: jsxRuntime.jsxs("div", { className: 'dynamic-widget-index-view__footer', children: [jsxRuntime.jsxs(TypographyButton.TypographyButton, { buttonClassName: 'dynamic-widget-footer__button', buttonVariant: 'tertiary', buttonPadding: 'none', onClick: addNewWallet, typographyProps: {
109
- color: 'secondary',
110
- variant: 'button_tertiary',
111
- }, startSlot: jsxRuntime.jsx(add.ReactComponent, {}), children: [authMode === 'connect-only' ? 'Connect' : 'Link', " a new wallet"] }), jsxRuntime.jsx(LogoutButton.LogoutButton, { isTextButton: true, buttonClassName: 'dynamic-widget-footer__button' })] }) })] }))] }));
98
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!multiWallet && !isKYCEnabled && (jsxRuntime.jsxs("div", { className: 'dynamic-widget-index-view__email-container', children: [jsxRuntime.jsx(Typography.Typography, { children: user === null || user === void 0 ? void 0 : user.email }), jsxRuntime.jsx(SingleWalletButtons.SingleWalletButtons, {})] })), multiWallet && jsxRuntime.jsx(DynamicWidgetWallets.DynamicWidgetWallets, {})] }));
112
99
  };
113
100
 
114
101
  exports.WalletsView = WalletsView;