@dynamic-labs/sdk-react-core 3.0.0-alpha.41 → 3.0.0-alpha.42

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 (49) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +13 -13
  5. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +2 -2
  6. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +2 -2
  7. package/src/lib/components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.cjs +11 -0
  8. package/src/lib/components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.d.ts +2 -0
  9. package/src/lib/components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.js +7 -0
  10. package/src/lib/components/MfaDeviceTileSkeleton/index.d.ts +1 -0
  11. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -1
  12. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -1
  13. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +0 -6
  14. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +0 -6
  15. package/src/lib/locale/en/translation.cjs +2 -2
  16. package/src/lib/locale/en/translation.d.ts +1 -1
  17. package/src/lib/locale/en/translation.js +2 -2
  18. package/src/lib/shared/assets/profile-outline.cjs +5 -5
  19. package/src/lib/shared/assets/profile-outline.js +5 -5
  20. package/src/lib/shared/assets/settings-outline.cjs +5 -5
  21. package/src/lib/shared/assets/settings-outline.js +5 -5
  22. package/src/lib/shared/assets/wallet-outline-v2.cjs +5 -5
  23. package/src/lib/shared/assets/wallet-outline-v2.js +5 -5
  24. package/src/lib/styles/index.shadow.cjs +1 -1
  25. package/src/lib/styles/index.shadow.js +1 -1
  26. package/src/lib/utils/hooks/useTransferWallet/index.d.ts +1 -0
  27. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.d.ts +9 -0
  28. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.cjs +85 -1
  29. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.d.ts +0 -1
  30. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js +85 -1
  31. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -1
  32. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -1
  33. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +7 -4
  34. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.d.ts +0 -2
  35. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +8 -4
  36. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.cjs +4 -3
  37. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.d.ts +1 -1
  38. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.js +4 -3
  39. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.cjs +23 -0
  40. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.d.ts +4 -0
  41. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.js +17 -0
  42. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +1 -2
  43. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +1 -2
  44. package/src/lib/shared/assets/profile.cjs +0 -65
  45. package/src/lib/shared/assets/profile.js +0 -41
  46. package/src/lib/shared/assets/settings.cjs +0 -54
  47. package/src/lib/shared/assets/settings.js +0 -30
  48. package/src/lib/shared/assets/wallet.cjs +0 -52
  49. package/src/lib/shared/assets/wallet.js +0 -28
@@ -0,0 +1 @@
1
+ export * from './useTransferWallet';
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Icon } from '../../shared';
3
+ interface WalletHelpLinkProps {
4
+ Icon: Icon;
5
+ link: string;
6
+ name: string;
7
+ }
8
+ export declare const WalletHelpLink: ({ name, link, Icon }: WalletHelpLinkProps) => JSX.Element;
9
+ export {};
@@ -5,12 +5,96 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var classNames = require('../../../../utils/functions/classNames/classNames.cjs');
8
+ require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
9
+ require('../../../../components/Alert/Alert.cjs');
10
+ require('react');
11
+ require('../../../../events/dynamicEvents.cjs');
12
+ require('../../../../../../_virtual/_tslib.cjs');
13
+ require('@dynamic-labs/utils');
14
+ require('../../../../context/DynamicContext/DynamicContext.cjs');
15
+ require('@dynamic-labs/sdk-api-core');
16
+ require('../../../../shared/logger.cjs');
17
+ require('@dynamic-labs/iconic');
18
+ require('@dynamic-labs/wallet-connector-core');
19
+ require('../../../../context/ViewContext/ViewContext.cjs');
20
+ require('@dynamic-labs/wallet-book');
21
+ require('../../../../utils/constants/colors.cjs');
22
+ require('../../../../utils/constants/values.cjs');
23
+ require('../../../../shared/utils/classes/storage/localStorage.cjs');
24
+ require('../../../../shared/utils/classes/storage/sessionStorage.cjs');
25
+ require('../../../../shared/consts/index.cjs');
26
+ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
27
+ require('../../../../context/ErrorContext/ErrorContext.cjs');
28
+ require('@dynamic-labs/multi-wallet');
29
+ require('react-international-phone');
30
+ require('../../../../config/ApiEndpoint.cjs');
31
+ require('@dynamic-labs/store');
32
+ require('../../../../locale/locale.cjs');
33
+ require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
34
+ require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
35
+ require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
36
+ require('../../../../context/VerificationContext/VerificationContext.cjs');
37
+ require('react-dom');
38
+ require('../../../../context/WalletContext/WalletContext.cjs');
39
+ require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
40
+ require('../../../../context/ThemeContext/ThemeContext.cjs');
41
+ require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
42
+ require('@dynamic-labs/types');
43
+ require('../../../../context/LoadingContext/LoadingContext.cjs');
44
+ require('yup');
45
+ require('../../../../context/MockContext/MockContext.cjs');
46
+ require('../../../../views/CollectUserDataView/useFields.cjs');
47
+ require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
48
+ require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
49
+ require('@dynamic-labs/rpc-providers');
50
+ require('react-i18next');
51
+ var Typography = require('../../../../components/Typography/Typography.cjs');
52
+ require('../../../../context/FooterAnimationContext/index.cjs');
53
+ require('../../../../components/ShadowDOM/ShadowDOM.cjs');
54
+ require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
55
+ require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
56
+ require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
57
+ require('../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
58
+ require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
59
+ require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
60
+ require('../DynamicWidgetHeader/DynamicWidgetHeader.cjs');
61
+ require('react-focus-lock');
62
+ require('../../context/DynamicWidgetContext.cjs');
63
+ require('../../../../components/IconButton/IconButton.cjs');
64
+ require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
65
+ require('formik');
66
+ require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
67
+ require('../../../../components/Input/Input.cjs');
68
+ require('@dynamic-labs/viem-utils');
69
+ require('../../../../context/PasskeyContext/PasskeyContext.cjs');
70
+ require('../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
71
+ require('../../../../../polyfills.cjs');
72
+ require('../../../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
73
+ require('../../../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
74
+ require('../../../DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs');
75
+ require('../DynamicWidgetCard/DynamicWidgetCard.cjs');
76
+ require('../../../../components/IsBrowser/IsBrowser.cjs');
77
+ require('../../../../context/WidgetRegistry/WidgetRegistryContextProvider.cjs');
78
+ require('../../../../context/FundingContext/FundingContext.cjs');
79
+ require('../../../../components/Popper/Popper/Popper.cjs');
80
+ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
81
+ require('../../../../views/WalletList/WalletList.cjs');
82
+ require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
83
+ require('@hcaptcha/react-hcaptcha');
84
+ require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
85
+ require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
86
+ require('../../../../context/SendBalanceContext/SendBalanceContext.cjs');
87
+ require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
88
+ require('../../../../context/ConnectWithOtpContext/constants.cjs');
89
+ require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
90
+ require('../../../../components/InlineWidget/InlineWidget.cjs');
91
+ require('qrcode');
8
92
 
9
93
  const BottomNavBar = ({ value, onChange, options }) => {
10
94
  const isActive = (_value) => _value === value;
11
95
  return (jsxRuntime.jsx("div", { className: 'footer-options-switcher__container', "data-testid": 'OptionsSwitcher', children: options.map((option) => (jsxRuntime.jsxs("div", { className: classNames.classNames('footer-options-switcher__tab', {
12
96
  'footer-options-switcher__tab--active': isActive(option.value),
13
- }), onClick: () => onChange(option.value), children: [isActive(option.value) ? option.selectedIcon : option.icon, jsxRuntime.jsx("span", { className: 'footer-options-switcher__label', children: option.label })] }, option.value))) }));
97
+ }), onClick: () => onChange(option.value), children: [option.icon, jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', className: 'footer-options-switcher__label', children: option.label })] }, option.value))) }));
14
98
  };
15
99
 
16
100
  exports.BottomNavBar = BottomNavBar;
@@ -3,7 +3,6 @@ import { DynamicWidgetViews } from '../../context/DynamicWidgetContext.types';
3
3
  export type OptionsSwitcherOption = {
4
4
  value: string;
5
5
  label: string;
6
- selectedIcon: ReactNode;
7
6
  icon: ReactNode;
8
7
  };
9
8
  export declare const BottomNavBar: FC<{
@@ -1,12 +1,96 @@
1
1
  'use client'
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { classNames } from '../../../../utils/functions/classNames/classNames.js';
4
+ import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
5
+ import '../../../../components/Alert/Alert.js';
6
+ import 'react';
7
+ import '../../../../events/dynamicEvents.js';
8
+ import '../../../../../../_virtual/_tslib.js';
9
+ import '@dynamic-labs/utils';
10
+ import '../../../../context/DynamicContext/DynamicContext.js';
11
+ import '@dynamic-labs/sdk-api-core';
12
+ import '../../../../shared/logger.js';
13
+ import '@dynamic-labs/iconic';
14
+ import '@dynamic-labs/wallet-connector-core';
15
+ import '../../../../context/ViewContext/ViewContext.js';
16
+ import '@dynamic-labs/wallet-book';
17
+ import '../../../../utils/constants/colors.js';
18
+ import '../../../../utils/constants/values.js';
19
+ import '../../../../shared/utils/classes/storage/localStorage.js';
20
+ import '../../../../shared/utils/classes/storage/sessionStorage.js';
21
+ import '../../../../shared/consts/index.js';
22
+ import '../../../../context/CaptchaContext/CaptchaContext.js';
23
+ import '../../../../context/ErrorContext/ErrorContext.js';
24
+ import '@dynamic-labs/multi-wallet';
25
+ import 'react-international-phone';
26
+ import '../../../../config/ApiEndpoint.js';
27
+ import '@dynamic-labs/store';
28
+ import '../../../../locale/locale.js';
29
+ import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
30
+ import '../../../../context/AccountExistsContext/AccountExistsContext.js';
31
+ import '../../../../context/UserWalletsContext/UserWalletsContext.js';
32
+ import '../../../../context/VerificationContext/VerificationContext.js';
33
+ import 'react-dom';
34
+ import '../../../../context/WalletContext/WalletContext.js';
35
+ import '../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
36
+ import '../../../../context/ThemeContext/ThemeContext.js';
37
+ import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
38
+ import '@dynamic-labs/types';
39
+ import '../../../../context/LoadingContext/LoadingContext.js';
40
+ import 'yup';
41
+ import '../../../../context/MockContext/MockContext.js';
42
+ import '../../../../views/CollectUserDataView/useFields.js';
43
+ import '../../../../context/FieldsStateContext/FieldsStateContext.js';
44
+ import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
45
+ import '@dynamic-labs/rpc-providers';
46
+ import 'react-i18next';
47
+ import { Typography } from '../../../../components/Typography/Typography.js';
48
+ import '../../../../context/FooterAnimationContext/index.js';
49
+ import '../../../../components/ShadowDOM/ShadowDOM.js';
50
+ import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
51
+ import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
52
+ import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
53
+ import '../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
54
+ import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
55
+ import '../../../../context/WalletGroupContext/WalletGroupContext.js';
56
+ import '../DynamicWidgetHeader/DynamicWidgetHeader.js';
57
+ import 'react-focus-lock';
58
+ import '../../context/DynamicWidgetContext.js';
59
+ import '../../../../components/IconButton/IconButton.js';
60
+ import '../../../../components/MenuList/Dropdown/Dropdown.js';
61
+ import 'formik';
62
+ import '../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
63
+ import '../../../../components/Input/Input.js';
64
+ import '@dynamic-labs/viem-utils';
65
+ import '../../../../context/PasskeyContext/PasskeyContext.js';
66
+ import '../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
67
+ import '../../../../../polyfills.js';
68
+ import '../../../../context/ErrorBoundary/ErrorBoundaryBase.js';
69
+ import '../../../../context/ErrorBoundary/ErrorBoundaryContext.js';
70
+ import '../../../DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js';
71
+ import '../DynamicWidgetCard/DynamicWidgetCard.js';
72
+ import '../../../../components/IsBrowser/IsBrowser.js';
73
+ import '../../../../context/WidgetRegistry/WidgetRegistryContextProvider.js';
74
+ import '../../../../context/FundingContext/FundingContext.js';
75
+ import '../../../../components/Popper/Popper/Popper.js';
76
+ import '../../../../components/Popper/PopperContext/PopperContext.js';
77
+ import '../../../../views/WalletList/WalletList.js';
78
+ import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
79
+ import '@hcaptcha/react-hcaptcha';
80
+ import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
81
+ import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
82
+ import '../../../../context/SendBalanceContext/SendBalanceContext.js';
83
+ import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
84
+ import '../../../../context/ConnectWithOtpContext/constants.js';
85
+ import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
86
+ import '../../../../components/InlineWidget/InlineWidget.js';
87
+ import 'qrcode';
4
88
 
5
89
  const BottomNavBar = ({ value, onChange, options }) => {
6
90
  const isActive = (_value) => _value === value;
7
91
  return (jsx("div", { className: 'footer-options-switcher__container', "data-testid": 'OptionsSwitcher', children: options.map((option) => (jsxs("div", { className: classNames('footer-options-switcher__tab', {
8
92
  'footer-options-switcher__tab--active': isActive(option.value),
9
- }), onClick: () => onChange(option.value), children: [isActive(option.value) ? option.selectedIcon : option.icon, jsx("span", { className: 'footer-options-switcher__label', children: option.label })] }, option.value))) }));
93
+ }), onClick: () => onChange(option.value), children: [option.icon, jsx(Typography, { variant: 'body_small', className: 'footer-options-switcher__label', children: option.label })] }, option.value))) }));
10
94
  };
11
95
 
12
96
  export { BottomNavBar };
@@ -107,7 +107,7 @@ const DynamicWidgetWallets = () => {
107
107
  setShowLinkNewWalletModal(true);
108
108
  setSelectedWalletConnectorKey(null);
109
109
  };
110
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'dynamic-widget-wallets-header', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets-header__title', copykey: 'dyn_widget.other_wallets', children: t('dyn_widget.other_wallets') }), jsxRuntime.jsxs(TypographyButton.TypographyButton, { buttonClassName: 'dynamic-widget-wallets-header__add_wallet', buttonVariant: 'tertiary', buttonPadding: 'none', onClick: addNewWallet, typographyProps: {
110
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'dynamic-widget-wallets-header', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'regular', variant: 'body_normal', color: 'secondary', className: 'dynamic-widget-wallets-header__title', copykey: 'dyn_widget.other_wallets', children: t('dyn_widget.other_wallets') }), jsxRuntime.jsxs(TypographyButton.TypographyButton, { buttonClassName: 'dynamic-widget-wallets-header__add_wallet', buttonVariant: 'tertiary', buttonPadding: 'none', onClick: addNewWallet, typographyProps: {
111
111
  color: 'secondary',
112
112
  variant: 'button_tertiary',
113
113
  }, startSlot: jsxRuntime.jsx(add.ReactComponent, {}), children: [authMode === 'connect-only' ? 'Connect' : 'Link', " a new wallet"] })] }), jsxRuntime.jsx("div", { ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets', children: jsxRuntime.jsx("div", { className: classNames.classNames('dynamic-widget-wallets__body', {
@@ -103,7 +103,7 @@ const DynamicWidgetWallets = () => {
103
103
  setShowLinkNewWalletModal(true);
104
104
  setSelectedWalletConnectorKey(null);
105
105
  };
106
- return (jsxs(Fragment, { children: [jsxs("div", { className: 'dynamic-widget-wallets-header', children: [jsx(Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets-header__title', copykey: 'dyn_widget.other_wallets', children: t('dyn_widget.other_wallets') }), jsxs(TypographyButton, { buttonClassName: 'dynamic-widget-wallets-header__add_wallet', buttonVariant: 'tertiary', buttonPadding: 'none', onClick: addNewWallet, typographyProps: {
106
+ return (jsxs(Fragment, { children: [jsxs("div", { className: 'dynamic-widget-wallets-header', children: [jsx(Typography, { weight: 'regular', variant: 'body_normal', color: 'secondary', className: 'dynamic-widget-wallets-header__title', copykey: 'dyn_widget.other_wallets', children: t('dyn_widget.other_wallets') }), jsxs(TypographyButton, { buttonClassName: 'dynamic-widget-wallets-header__add_wallet', buttonVariant: 'tertiary', buttonPadding: 'none', onClick: addNewWallet, typographyProps: {
107
107
  color: 'secondary',
108
108
  variant: 'button_tertiary',
109
109
  }, startSlot: jsx(SvgAdd, {}), children: [authMode === 'connect-only' ? 'Connect' : 'Link', " a new wallet"] })] }), jsx("div", { ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets', children: jsx("div", { className: classNames('dynamic-widget-wallets__body', {
@@ -73,7 +73,9 @@ require('../../../../components/Input/Input.cjs');
73
73
  require('@dynamic-labs/viem-utils');
74
74
  require('../../../../context/PasskeyContext/PasskeyContext.cjs');
75
75
  require('../ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
76
+ var MfaDeviceTileSkeleton = require('../../../../components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.cjs');
76
77
  var UserDeviceTile = require('./components/UserDeviceTile.cjs');
78
+ var sort = require('./components/utils/sort.cjs');
77
79
  require('../../../../../polyfills.cjs');
78
80
  require('../../../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
79
81
  require('../../../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
@@ -98,17 +100,19 @@ var useDynamicModals = require('../../../../utils/hooks/useDynamicModals/useDyna
98
100
  require('../../../../components/InlineWidget/InlineWidget.cjs');
99
101
  require('qrcode');
100
102
 
101
- const sortDevicesByDefault = (a, b) => a._default === b._default ? 0 : a._default ? -1 : 1;
102
103
  const ManageMfaWidgetView = () => {
103
104
  const [userDevices, setUserDevices] = React.useState([]);
105
+ const [loading, setLoading] = React.useState(false);
104
106
  const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
105
107
  const { setShowMfaQRCode } = useDynamicModals.useDynamicModals();
106
108
  const { getUserDevices, deleteUserDevice } = useMfa.useMfa();
107
109
  const { t } = reactI18next.useTranslation();
108
110
  const getDevices = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
111
+ setLoading(true);
109
112
  const devices = yield getUserDevices();
110
113
  // set the user devices with the default device first
111
- setUserDevices(devices.sort(sortDevicesByDefault));
114
+ setUserDevices(sort.sortAndNameDevices(devices));
115
+ setLoading(false);
112
116
  }), [getUserDevices]);
113
117
  // re-fetch devices when a new device is added
114
118
  useDynamicEvents.useDynamicEvents('mfaCompletionSuccess', () => getDevices());
@@ -122,8 +126,7 @@ const ManageMfaWidgetView = () => {
122
126
  getDevices();
123
127
  });
124
128
  const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
125
- return (jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx("div", { className: 'send-balance-page-layout__header-content', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_manage_mfa.title', children: t('dyn_manage_mfa.title') }) }) }), jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view__scroll-container', children: [userDevices.length === 0 && (jsxRuntime.jsx(Typography.Typography, { className: 'manage-mfa-widget-view__no-devices', variant: 'body_normal', color: 'secondary', copykey: 'dyn_manage_mfa.no_devices', children: t('dyn_manage_mfa.no_devices') })), userDevices.map((device, index) => (jsxRuntime.jsx(UserDeviceTile.UserDeviceTile, { userDevice: device, index: index, deleteDevice: deleteDevice }, device.id)))] }), jsxRuntime.jsx("div", { className: 'manage-mfa-widget-view__add-mfa-button-container', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'manage-mfa-widget-view__add-mfa-button-container__button', onClick: () => setShowMfaQRCode(true), copykey: 'dyn_manage_mfa.add_mfa_button', startSlot: jsxRuntime.jsx(add.ReactComponent, {}), children: t('dyn_manage_mfa.add_mfa_button') }) })] }));
129
+ return (jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx("div", { className: 'send-balance-page-layout__header-content', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_manage_mfa.title', children: t('dyn_manage_mfa.title') }) }) }), jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view__scroll-container', children: [loading && jsxRuntime.jsx(MfaDeviceTileSkeleton.MfaDeviceTileSkeleton, {}), !loading && userDevices.length === 0 && (jsxRuntime.jsx(Typography.Typography, { className: 'manage-mfa-widget-view__no-devices', variant: 'body_normal', color: 'secondary', copykey: 'dyn_manage_mfa.no_devices', children: t('dyn_manage_mfa.no_devices') })), userDevices.map((device, index) => (jsxRuntime.jsx(UserDeviceTile.UserDeviceTile, { userDevice: device, index: index, deleteDevice: deleteDevice }, device.id)))] }), jsxRuntime.jsx("div", { className: 'manage-mfa-widget-view__add-mfa-button-container', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'manage-mfa-widget-view__add-mfa-button-container__button', onClick: () => setShowMfaQRCode(true), copykey: 'dyn_manage_mfa.add_mfa_button', startSlot: jsxRuntime.jsx(add.ReactComponent, {}), children: t('dyn_manage_mfa.add_mfa_button') }) })] }));
126
130
  };
127
131
 
128
132
  exports.ManageMfaWidgetView = ManageMfaWidgetView;
129
- exports.sortDevicesByDefault = sortDevicesByDefault;
@@ -1,4 +1,2 @@
1
1
  import { FC } from 'react';
2
- import { MFADevice } from '@dynamic-labs/sdk-api-core';
3
- export declare const sortDevicesByDefault: (a: MFADevice, b: MFADevice) => 0 | 1 | -1;
4
2
  export declare const ManageMfaWidgetView: FC;
@@ -69,7 +69,9 @@ import '../../../../components/Input/Input.js';
69
69
  import '@dynamic-labs/viem-utils';
70
70
  import '../../../../context/PasskeyContext/PasskeyContext.js';
71
71
  import '../ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
72
+ import { MfaDeviceTileSkeleton } from '../../../../components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.js';
72
73
  import { UserDeviceTile } from './components/UserDeviceTile.js';
74
+ import { sortAndNameDevices } from './components/utils/sort.js';
73
75
  import '../../../../../polyfills.js';
74
76
  import '../../../../context/ErrorBoundary/ErrorBoundaryBase.js';
75
77
  import '../../../../context/ErrorBoundary/ErrorBoundaryContext.js';
@@ -94,17 +96,19 @@ import { useDynamicModals } from '../../../../utils/hooks/useDynamicModals/useDy
94
96
  import '../../../../components/InlineWidget/InlineWidget.js';
95
97
  import 'qrcode';
96
98
 
97
- const sortDevicesByDefault = (a, b) => a._default === b._default ? 0 : a._default ? -1 : 1;
98
99
  const ManageMfaWidgetView = () => {
99
100
  const [userDevices, setUserDevices] = useState([]);
101
+ const [loading, setLoading] = useState(false);
100
102
  const { setDynamicWidgetView } = useWidgetContext();
101
103
  const { setShowMfaQRCode } = useDynamicModals();
102
104
  const { getUserDevices, deleteUserDevice } = useMfa();
103
105
  const { t } = useTranslation();
104
106
  const getDevices = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
107
+ setLoading(true);
105
108
  const devices = yield getUserDevices();
106
109
  // set the user devices with the default device first
107
- setUserDevices(devices.sort(sortDevicesByDefault));
110
+ setUserDevices(sortAndNameDevices(devices));
111
+ setLoading(false);
108
112
  }), [getUserDevices]);
109
113
  // re-fetch devices when a new device is added
110
114
  useDynamicEvents('mfaCompletionSuccess', () => getDevices());
@@ -118,7 +122,7 @@ const ManageMfaWidgetView = () => {
118
122
  getDevices();
119
123
  });
120
124
  const backButton = (jsx(IconButton, { type: 'button', onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
121
- return (jsxs("div", { className: 'manage-mfa-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_mfa.title', children: t('dyn_manage_mfa.title') }) }) }), jsxs("div", { className: 'manage-mfa-widget-view__scroll-container', children: [userDevices.length === 0 && (jsx(Typography, { className: 'manage-mfa-widget-view__no-devices', variant: 'body_normal', color: 'secondary', copykey: 'dyn_manage_mfa.no_devices', children: t('dyn_manage_mfa.no_devices') })), userDevices.map((device, index) => (jsx(UserDeviceTile, { userDevice: device, index: index, deleteDevice: deleteDevice }, device.id)))] }), jsx("div", { className: 'manage-mfa-widget-view__add-mfa-button-container', children: jsx(TypographyButton, { buttonClassName: 'manage-mfa-widget-view__add-mfa-button-container__button', onClick: () => setShowMfaQRCode(true), copykey: 'dyn_manage_mfa.add_mfa_button', startSlot: jsx(SvgAdd, {}), children: t('dyn_manage_mfa.add_mfa_button') }) })] }));
125
+ return (jsxs("div", { className: 'manage-mfa-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_mfa.title', children: t('dyn_manage_mfa.title') }) }) }), jsxs("div", { className: 'manage-mfa-widget-view__scroll-container', children: [loading && jsx(MfaDeviceTileSkeleton, {}), !loading && userDevices.length === 0 && (jsx(Typography, { className: 'manage-mfa-widget-view__no-devices', variant: 'body_normal', color: 'secondary', copykey: 'dyn_manage_mfa.no_devices', children: t('dyn_manage_mfa.no_devices') })), userDevices.map((device, index) => (jsx(UserDeviceTile, { userDevice: device, index: index, deleteDevice: deleteDevice }, device.id)))] }), jsx("div", { className: 'manage-mfa-widget-view__add-mfa-button-container', children: jsx(TypographyButton, { buttonClassName: 'manage-mfa-widget-view__add-mfa-button-container__button', onClick: () => setShowMfaQRCode(true), copykey: 'dyn_manage_mfa.add_mfa_button', startSlot: jsx(SvgAdd, {}), children: t('dyn_manage_mfa.add_mfa_button') }) })] }));
122
126
  };
123
127
 
124
- export { ManageMfaWidgetView, sortDevicesByDefault };
128
+ export { ManageMfaWidgetView };
@@ -83,6 +83,7 @@ require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
83
83
  require('../../../../../views/WalletList/WalletList.cjs');
84
84
  require('../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
85
85
  require('@hcaptcha/react-hcaptcha');
86
+ var Badge = require('../../../../../components/Badge/Badge.cjs');
86
87
  require('../../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
87
88
  require('../../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
88
89
  require('../../../../../context/SendBalanceContext/SendBalanceContext.cjs');
@@ -92,7 +93,7 @@ require('../../../../../context/ReinitializeContext/ReinitializeContextProvider.
92
93
  require('../../../../../components/InlineWidget/InlineWidget.cjs');
93
94
  require('qrcode');
94
95
 
95
- const UserDeviceTile = ({ userDevice, index, deleteDevice, }) => {
96
+ const UserDeviceTile = ({ userDevice, deleteDevice, }) => {
96
97
  const optionsMenu = [
97
98
  {
98
99
  Icon: null,
@@ -100,8 +101,8 @@ const UserDeviceTile = ({ userDevice, index, deleteDevice, }) => {
100
101
  text: 'Delete',
101
102
  },
102
103
  ];
103
- const timeSinceCreated = userDevice.createdAt && getTimeSince.getTimeSince(new Date(userDevice.createdAt));
104
- return (jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view__list-tile', children: [jsxRuntime.jsx(authenticator.ReactComponent, { className: 'manage-mfa-widget-view__list-tile__icon' }), jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view__list-tile__details', children: [jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'primary', children: ["Authenticator App ", index + 1] }), timeSinceCreated && (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', children: ["Created ", timeSinceCreated.value, " ", timeSinceCreated.unit, " ago"] }))] }), jsxRuntime.jsx("div", { style: {
104
+ const timeSinceCreated = userDevice.verifiedAt && getTimeSince.getTimeSince(new Date(userDevice.verifiedAt));
105
+ return (jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view__list-tile', children: [jsxRuntime.jsx(authenticator.ReactComponent, { className: 'manage-mfa-widget-view__list-tile__icon' }), jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view__list-tile__details', children: [jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view__list-tile__details__title', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', children: userDevice.alias || 'Authenticator App' }), userDevice._default && jsxRuntime.jsx(Badge.Badge, { text: 'Default' })] }), timeSinceCreated && (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', children: ["Created ", timeSinceCreated.value, " ", timeSinceCreated.unit, " ago"] }))] }), jsxRuntime.jsx("div", { style: {
105
106
  cursor: 'pointer',
106
107
  display: 'flex',
107
108
  }, children: jsxRuntime.jsx(DotsMenu.DotsMenu, { direction: 'left', "data-testid": 'dots-menu', options: optionsMenu, buttonClassName: 'manage-mfa-widget-view__list-tile__dots-menu', buttonClassNameWithOpenMenu: 'manage-mfa-widget-view__list-tile__dots-menu' }) })] }, userDevice.id));
@@ -5,4 +5,4 @@ export type UserDeviceTileProps = {
5
5
  index: number;
6
6
  deleteDevice: (id: string) => void;
7
7
  };
8
- export declare const UserDeviceTile: ({ userDevice, index, deleteDevice, }: UserDeviceTileProps) => JSX.Element;
8
+ export declare const UserDeviceTile: ({ userDevice, deleteDevice, }: UserDeviceTileProps) => JSX.Element;
@@ -79,6 +79,7 @@ import '../../../../../components/Popper/PopperContext/PopperContext.js';
79
79
  import '../../../../../views/WalletList/WalletList.js';
80
80
  import '../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
81
81
  import '@hcaptcha/react-hcaptcha';
82
+ import { Badge } from '../../../../../components/Badge/Badge.js';
82
83
  import '../../../../../context/IpConfigurationContext/IpConfigurationContext.js';
83
84
  import '../../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
84
85
  import '../../../../../context/SendBalanceContext/SendBalanceContext.js';
@@ -88,7 +89,7 @@ import '../../../../../context/ReinitializeContext/ReinitializeContextProvider.j
88
89
  import '../../../../../components/InlineWidget/InlineWidget.js';
89
90
  import 'qrcode';
90
91
 
91
- const UserDeviceTile = ({ userDevice, index, deleteDevice, }) => {
92
+ const UserDeviceTile = ({ userDevice, deleteDevice, }) => {
92
93
  const optionsMenu = [
93
94
  {
94
95
  Icon: null,
@@ -96,8 +97,8 @@ const UserDeviceTile = ({ userDevice, index, deleteDevice, }) => {
96
97
  text: 'Delete',
97
98
  },
98
99
  ];
99
- const timeSinceCreated = userDevice.createdAt && getTimeSince(new Date(userDevice.createdAt));
100
- return (jsxs("div", { className: 'manage-mfa-widget-view__list-tile', children: [jsx(SvgAuthenticator, { className: 'manage-mfa-widget-view__list-tile__icon' }), jsxs("div", { className: 'manage-mfa-widget-view__list-tile__details', children: [jsxs(Typography, { variant: 'body_normal', color: 'primary', children: ["Authenticator App ", index + 1] }), timeSinceCreated && (jsxs(Typography, { variant: 'body_small', color: 'secondary', children: ["Created ", timeSinceCreated.value, " ", timeSinceCreated.unit, " ago"] }))] }), jsx("div", { style: {
100
+ const timeSinceCreated = userDevice.verifiedAt && getTimeSince(new Date(userDevice.verifiedAt));
101
+ return (jsxs("div", { className: 'manage-mfa-widget-view__list-tile', children: [jsx(SvgAuthenticator, { className: 'manage-mfa-widget-view__list-tile__icon' }), jsxs("div", { className: 'manage-mfa-widget-view__list-tile__details', children: [jsxs("div", { className: 'manage-mfa-widget-view__list-tile__details__title', children: [jsx(Typography, { variant: 'body_normal', color: 'primary', children: userDevice.alias || 'Authenticator App' }), userDevice._default && jsx(Badge, { text: 'Default' })] }), timeSinceCreated && (jsxs(Typography, { variant: 'body_small', color: 'secondary', children: ["Created ", timeSinceCreated.value, " ", timeSinceCreated.unit, " ago"] }))] }), jsx("div", { style: {
101
102
  cursor: 'pointer',
102
103
  display: 'flex',
103
104
  }, children: jsx(DotsMenu, { direction: 'left', "data-testid": 'dots-menu', options: optionsMenu, buttonClassName: 'manage-mfa-widget-view__list-tile__dots-menu', buttonClassNameWithOpenMenu: 'manage-mfa-widget-view__list-tile__dots-menu' }) })] }, userDevice.id));
@@ -0,0 +1,23 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ const sortDevicesByDefault = (a, b) => a._default === b._default ? 0 : a._default ? -1 : 1;
7
+ const sortDevicesByVerifiedDateDesc = (a, b) => {
8
+ // doing null check for createdAt to avoid runtime error even though it should never be null/undefined
9
+ const dateA = a.verifiedAt ? new Date(a.verifiedAt).getTime() : 0;
10
+ const dateB = b.verifiedAt ? new Date(b.verifiedAt).getTime() : 0;
11
+ return dateA - dateB;
12
+ };
13
+ const sortAndNameDevices = (devices) => devices
14
+ .sort(sortDevicesByVerifiedDateDesc)
15
+ .map((device, index) => {
16
+ device.alias = device.alias || `Authenticator App ${index + 1}`;
17
+ return device;
18
+ })
19
+ .sort(sortDevicesByDefault);
20
+
21
+ exports.sortAndNameDevices = sortAndNameDevices;
22
+ exports.sortDevicesByDefault = sortDevicesByDefault;
23
+ exports.sortDevicesByVerifiedDateDesc = sortDevicesByVerifiedDateDesc;
@@ -0,0 +1,4 @@
1
+ import { MFADevice } from '@dynamic-labs/sdk-api-core';
2
+ export declare const sortDevicesByDefault: (a: MFADevice, b: MFADevice) => 0 | 1 | -1;
3
+ export declare const sortDevicesByVerifiedDateDesc: (a: MFADevice, b: MFADevice) => number;
4
+ export declare const sortAndNameDevices: (devices: MFADevice[]) => MFADevice[];
@@ -0,0 +1,17 @@
1
+ 'use client'
2
+ const sortDevicesByDefault = (a, b) => a._default === b._default ? 0 : a._default ? -1 : 1;
3
+ const sortDevicesByVerifiedDateDesc = (a, b) => {
4
+ // doing null check for createdAt to avoid runtime error even though it should never be null/undefined
5
+ const dateA = a.verifiedAt ? new Date(a.verifiedAt).getTime() : 0;
6
+ const dateB = b.verifiedAt ? new Date(b.verifiedAt).getTime() : 0;
7
+ return dateA - dateB;
8
+ };
9
+ const sortAndNameDevices = (devices) => devices
10
+ .sort(sortDevicesByVerifiedDateDesc)
11
+ .map((device, index) => {
12
+ device.alias = device.alias || `Authenticator App ${index + 1}`;
13
+ return device;
14
+ })
15
+ .sort(sortDevicesByDefault);
16
+
17
+ export { sortAndNameDevices, sortDevicesByDefault, sortDevicesByVerifiedDateDesc };
@@ -84,7 +84,6 @@ var TypographyButton = require('../../../../components/TypographyButton/Typograp
84
84
  require('formik');
85
85
  require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
86
86
  var spinner = require('../../../../components/Spinner/spinner.cjs');
87
- var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
88
87
  require('../../../../components/Input/Input.cjs');
89
88
  require('@dynamic-labs/viem-utils');
90
89
  require('../../../../context/PasskeyContext/PasskeyContext.cjs');
@@ -178,7 +177,7 @@ const SettingsView = () => {
178
177
  const isMfaEnabled = Boolean((_r = (_q = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _q === void 0 ? void 0 : _q.mfa) === null || _r === void 0 ? void 0 : _r.enabled);
179
178
  const shouldShowPasskeyMFA = isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatibleWallet;
180
179
  const shouldShowSecuritySection = isMfaEnabled || isCoinbaseWallet || shouldShowPasskeyMFA;
181
- 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:
180
+ return (jsxRuntime.jsxs("div", { className: 'settings-view', children: [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:
182
181
  // eslint-disable-next-line react/jsx-wrap-multilines
183
182
  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 })] }), shouldShowSecuritySection && (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: classNames.classNames('settings-view__body__section__title', {
184
183
  'settings-view__body__section__title__info-icon': !isTurnkeyWalletWithAuthenticator,
@@ -80,7 +80,6 @@ import { TypographyButton } from '../../../../components/TypographyButton/Typogr
80
80
  import 'formik';
81
81
  import '../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
82
82
  import { Spinner } from '../../../../components/Spinner/spinner.js';
83
- import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
84
83
  import '../../../../components/Input/Input.js';
85
84
  import '@dynamic-labs/viem-utils';
86
85
  import '../../../../context/PasskeyContext/PasskeyContext.js';
@@ -174,7 +173,7 @@ const SettingsView = () => {
174
173
  const isMfaEnabled = Boolean((_r = (_q = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _q === void 0 ? void 0 : _q.mfa) === null || _r === void 0 ? void 0 : _r.enabled);
175
174
  const shouldShowPasskeyMFA = isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatibleWallet;
176
175
  const shouldShowSecuritySection = isMfaEnabled || isCoinbaseWallet || shouldShowPasskeyMFA;
177
- 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:
176
+ return (jsxs("div", { className: 'settings-view', children: [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:
178
177
  // eslint-disable-next-line react/jsx-wrap-multilines
179
178
  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 })] }), shouldShowSecuritySection && (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: classNames('settings-view__body__section__title', {
180
179
  'settings-view__body__section__title__info-icon': !isTurnkeyWalletWithAuthenticator,
@@ -1,65 +0,0 @@
1
- 'use client'
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- var React = require('react');
7
-
8
- function _interopNamespace(e) {
9
- if (e && e.__esModule) return e;
10
- var n = Object.create(null);
11
- if (e) {
12
- Object.keys(e).forEach(function (k) {
13
- if (k !== 'default') {
14
- var d = Object.getOwnPropertyDescriptor(e, k);
15
- Object.defineProperty(n, k, d.get ? d : {
16
- enumerable: true,
17
- get: function () { return e[k]; }
18
- });
19
- }
20
- });
21
- }
22
- n["default"] = e;
23
- return Object.freeze(n);
24
- }
25
-
26
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
-
28
- var _g, _defs;
29
- var _excluded = ["title", "titleId"];
30
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
31
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
32
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
33
- var SvgProfile = function SvgProfile(_ref) {
34
- var title = _ref.title,
35
- titleId = _ref.titleId,
36
- props = _objectWithoutProperties(_ref, _excluded);
37
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
38
- width: 29,
39
- height: 28,
40
- viewBox: "0 0 29 28",
41
- fill: "none",
42
- xmlns: "http://www.w3.org/2000/svg",
43
- "aria-labelledby": titleId
44
- }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
45
- id: titleId
46
- }, title) : null, _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
47
- clipPath: "url(#profile_svg__a)"
48
- }, /*#__PURE__*/React__namespace.createElement("path", {
49
- fillRule: "evenodd",
50
- clipRule: "evenodd",
51
- d: "M24.095 22.523A12.785 12.785 0 0 0 27.333 14c0-7.088-5.745-12.833-12.833-12.833S1.667 6.912 1.667 14c0 3.271 1.224 6.257 3.24 8.524 2.414-2.901 7.001-3.94 9.793-3.94 2.793 0 6.984.832 9.395 3.939ZM9.688 10.792a4.812 4.812 0 1 1 9.624 0 4.812 4.812 0 0 1-9.625 0Z",
52
- fill: "#383C48"
53
- }))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
54
- id: "profile_svg__a"
55
- }, /*#__PURE__*/React__namespace.createElement("rect", {
56
- x: 1.667,
57
- y: 1.167,
58
- width: 25.667,
59
- height: 25.667,
60
- rx: 12.833,
61
- fill: "#fff"
62
- })))));
63
- };
64
-
65
- exports.ReactComponent = SvgProfile;