@dynamic-labs/sdk-react-core 4.18.6 → 4.18.7

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 (46) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +12 -12
  5. package/src/lib/components/Button/Button.d.ts +1 -1
  6. package/src/lib/components/ModalHeader/ModalHeader.cjs +2 -1
  7. package/src/lib/components/ModalHeader/ModalHeader.js +2 -1
  8. package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +3 -1
  9. package/src/lib/components/TypographyButton/TypographyButton.cjs +2 -0
  10. package/src/lib/components/TypographyButton/TypographyButton.js +2 -0
  11. package/src/lib/locale/en/translation.cjs +53 -0
  12. package/src/lib/locale/en/translation.d.ts +53 -0
  13. package/src/lib/locale/en/translation.js +53 -0
  14. package/src/lib/shared/assets/index.d.ts +1 -0
  15. package/src/lib/shared/assets/session.cjs +54 -0
  16. package/src/lib/shared/assets/session.js +30 -0
  17. package/src/lib/styles/index.shadow.cjs +1 -1
  18. package/src/lib/styles/index.shadow.js +1 -1
  19. package/src/lib/utils/functions/index.d.ts +1 -0
  20. package/src/lib/utils/functions/isZKSyncEnabled/index.d.ts +1 -0
  21. package/src/lib/utils/functions/isZKSyncEnabled/isZKSyncEnabled.cjs +11 -0
  22. package/src/lib/utils/functions/isZKSyncEnabled/isZKSyncEnabled.d.ts +2 -0
  23. package/src/lib/utils/functions/isZKSyncEnabled/isZKSyncEnabled.js +7 -0
  24. package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.cjs +1 -3
  25. package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.js +1 -3
  26. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +4 -0
  27. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +2 -0
  28. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +4 -0
  29. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +3 -1
  30. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs +5 -1
  31. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.js +6 -2
  32. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/EmptySessionsView.cjs +15 -0
  33. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/EmptySessionsView.d.ts +2 -0
  34. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/EmptySessionsView.js +11 -0
  35. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/index.d.ts +1 -0
  36. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.cjs +28 -0
  37. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.d.ts +2 -0
  38. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.js +24 -0
  39. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/index.d.ts +1 -0
  40. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementView.cjs +33 -0
  41. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementView.d.ts +2 -0
  42. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementView.js +29 -0
  43. package/src/lib/widgets/DynamicWidget/views/SessionManagementView/index.d.ts +1 -0
  44. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +5 -1
  45. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +5 -1
  46. package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -0
@@ -80,3 +80,4 @@ export * from './updatePrimaryWalletId';
80
80
  export * from './getWalletUniqueId';
81
81
  export * from './openPopup';
82
82
  export * from './hasAllRequiredWalletsConnected';
83
+ export * from './isZKSyncEnabled';
@@ -0,0 +1 @@
1
+ export * from './isZKSyncEnabled';
@@ -0,0 +1,11 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
7
+ var isProviderEnabled = require('../isProviderEnabled/isProviderEnabled.cjs');
8
+
9
+ const isZKSyncEnabled = (projectSettings) => { var _a; return isProviderEnabled.isProviderEnabled((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _a !== void 0 ? _a : [], sdkApiCore.ProviderEnum.Zksync); };
10
+
11
+ exports.isZKSyncEnabled = isZKSyncEnabled;
@@ -0,0 +1,2 @@
1
+ import { ProjectSettings } from '@dynamic-labs/sdk-api-core';
2
+ export declare const isZKSyncEnabled: (projectSettings?: ProjectSettings) => boolean;
@@ -0,0 +1,7 @@
1
+ 'use client'
2
+ import { ProviderEnum } from '@dynamic-labs/sdk-api-core';
3
+ import { isProviderEnabled } from '../isProviderEnabled/isProviderEnabled.js';
4
+
5
+ const isZKSyncEnabled = (projectSettings) => { var _a; return isProviderEnabled((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _a !== void 0 ? _a : [], ProviderEnum.Zksync); };
6
+
7
+ export { isZKSyncEnabled };
@@ -125,9 +125,7 @@ const UserDeleteAccountView = () => {
125
125
  const hasEmbeddedWallet = React.useMemo(() => user === null || user === void 0 ? void 0 : user.verifiedCredentials.some((wallet) => wallet.walletProvider === sdkApiCore.WalletProviderEnum.EmbeddedWallet), [user]);
126
126
  return (jsxRuntime.jsx("div", { className: 'delete-account-view', children: jsxRuntime.jsxs("div", { className: 'delete-account-view__content', children: [jsxRuntime.jsx("div", { className: 'warning-section', children: jsxRuntime.jsxs("div", { className: 'warning-icon-container', children: [jsxRuntime.jsx(warningRed.ReactComponent, { className: 'warning-icon' }), jsxRuntime.jsx(exclamation.ReactComponent, { className: 'exclamation-icon' })] }) }), jsxRuntime.jsx("div", { className: 'message-box', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', children: t('dyn_settings.delete_account.description') }) }), jsxRuntime.jsxs("div", { className: 'confirmation-section', children: [jsxRuntime.jsxs("div", { className: 'checkbox-container', children: [jsxRuntime.jsx("input", { type: 'checkbox', checked: isBackupConfirmed, onChange: handleBackupConfirmChange, "data-testid": 'delete-account-checkbox' }), jsxRuntime.jsx(Typography.Typography, { className: 'checkbox-text', variant: 'body_small', children: hasEmbeddedWallet
127
127
  ? t('dyn_settings.delete_account.backup_confirmation_embedded')
128
- : t('dyn_settings.delete_account.backup_confirmation_no_embedded') })] }), jsxRuntime.jsxs("div", { className: 'input-section', children: [jsxRuntime.jsx(Typography.Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsxRuntime.jsx(Input.Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxRuntime.jsxs("div", { className: 'button-group', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'primary', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, typographyProps: {
129
- color: isDeleteEnabled ? 'white' : 'tertiary',
130
- }, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
128
+ : t('dyn_settings.delete_account.backup_confirmation_no_embedded') })] }), jsxRuntime.jsxs("div", { className: 'input-section', children: [jsxRuntime.jsx(Typography.Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsxRuntime.jsx(Input.Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxRuntime.jsxs("div", { className: 'button-group', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'danger', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
131
129
  ? t('dyn_settings.delete_account.deleting')
132
130
  : t('dyn_settings.delete_account.confirm') })] })] }) }));
133
131
  };
@@ -121,9 +121,7 @@ const UserDeleteAccountView = () => {
121
121
  const hasEmbeddedWallet = useMemo(() => user === null || user === void 0 ? void 0 : user.verifiedCredentials.some((wallet) => wallet.walletProvider === WalletProviderEnum.EmbeddedWallet), [user]);
122
122
  return (jsx("div", { className: 'delete-account-view', children: jsxs("div", { className: 'delete-account-view__content', children: [jsx("div", { className: 'warning-section', children: jsxs("div", { className: 'warning-icon-container', children: [jsx(SvgWarningRed, { className: 'warning-icon' }), jsx(SvgExclamation, { className: 'exclamation-icon' })] }) }), jsx("div", { className: 'message-box', children: jsx(Typography, { variant: 'body_normal', weight: 'bold', children: t('dyn_settings.delete_account.description') }) }), jsxs("div", { className: 'confirmation-section', children: [jsxs("div", { className: 'checkbox-container', children: [jsx("input", { type: 'checkbox', checked: isBackupConfirmed, onChange: handleBackupConfirmChange, "data-testid": 'delete-account-checkbox' }), jsx(Typography, { className: 'checkbox-text', variant: 'body_small', children: hasEmbeddedWallet
123
123
  ? t('dyn_settings.delete_account.backup_confirmation_embedded')
124
- : t('dyn_settings.delete_account.backup_confirmation_no_embedded') })] }), jsxs("div", { className: 'input-section', children: [jsx(Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsx(Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsx(Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxs("div", { className: 'button-group', children: [jsx(TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsx(TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'primary', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, typographyProps: {
125
- color: isDeleteEnabled ? 'white' : 'tertiary',
126
- }, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
124
+ : t('dyn_settings.delete_account.backup_confirmation_no_embedded') })] }), jsxs("div", { className: 'input-section', children: [jsx(Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsx(Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsx(Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxs("div", { className: 'button-group', children: [jsx(TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsx(TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'danger', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
127
125
  ? t('dyn_settings.delete_account.deleting')
128
126
  : t('dyn_settings.delete_account.confirm') })] })] }) }));
129
127
  };
@@ -10,6 +10,7 @@ var SendBalanceWidgetView = require('../../views/SendBalanceWidgetView/SendBalan
10
10
  var ManagePasskeysWidgetView = require('../../views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs');
11
11
  var SettingsView = require('../../views/SettingsView/SettingsView.cjs');
12
12
  var AccountAndSecuritySettingsView = require('../../views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs');
13
+ var SessionManagementView = require('../../views/SessionManagementView/SessionManagementView.cjs');
13
14
  var ChooseLinkedWalletView = require('../../views/ChooseLinkedWalletView/ChooseLinkedWalletView.cjs');
14
15
  var ChooseOnrampProviderView = require('../../views/ChooseOnrampProviderView/ChooseOnrampProviderView.cjs');
15
16
  var ChooseWalletFundingMethod = require('../../views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.cjs');
@@ -18,6 +19,7 @@ var DepositView = require('../../views/DepositView/DepositView.cjs');
18
19
  var GlobalWalletView = require('../../views/GlobalWalletView/GlobalWalletView.cjs');
19
20
  var ManageMfaWidgetView = require('../../views/ManageMfaWidgetView/ManageMfaWidgetView.cjs');
20
21
  var ReceiveWalletFunds = require('../../views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
22
+ var SessionManagementInfoView = require('../../views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.cjs');
21
23
 
22
24
  const mapViewToComponent = {
23
25
  'account-and-security-settings': AccountAndSecuritySettingsView.AccountAndSecuritySettingsView,
@@ -34,6 +36,8 @@ const mapViewToComponent = {
34
36
  profile: ProfileView.ProfileView,
35
37
  'receive-wallet-funds': ReceiveWalletFunds.ReceiveWalletFunds,
36
38
  'send-balance': SendBalanceWidgetView.SendBalanceWidgetView,
39
+ 'session-management': SessionManagementView.SessionManagementView,
40
+ 'session-management-info': SessionManagementInfoView.SessionManagementInfoView,
37
41
  settings: SettingsView.SettingsView,
38
42
  wallets: WalletsView.WalletsView,
39
43
  };
@@ -18,6 +18,8 @@ export declare const mapViewToComponent: {
18
18
  profile: import("react").FC;
19
19
  'receive-wallet-funds': import("react").FC<import("../../views/ReceiveWalletFunds/types").ReceiveWalletFundsProps>;
20
20
  'send-balance': import("react").FC;
21
+ 'session-management': import("react").FC;
22
+ 'session-management-info': import("react").FC;
21
23
  settings: import("react").FC;
22
24
  wallets: import("react").FC;
23
25
  };
@@ -6,6 +6,7 @@ import { SendBalanceWidgetView } from '../../views/SendBalanceWidgetView/SendBal
6
6
  import { ManagePasskeysWidgetView } from '../../views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js';
7
7
  import { SettingsView } from '../../views/SettingsView/SettingsView.js';
8
8
  import { AccountAndSecuritySettingsView } from '../../views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.js';
9
+ import { SessionManagementView } from '../../views/SessionManagementView/SessionManagementView.js';
9
10
  import { ChooseLinkedWalletView } from '../../views/ChooseLinkedWalletView/ChooseLinkedWalletView.js';
10
11
  import { ChooseOnrampProviderView } from '../../views/ChooseOnrampProviderView/ChooseOnrampProviderView.js';
11
12
  import { ChooseWalletFundingMethod } from '../../views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.js';
@@ -14,6 +15,7 @@ import { DepositView } from '../../views/DepositView/DepositView.js';
14
15
  import { GlobalWalletView } from '../../views/GlobalWalletView/GlobalWalletView.js';
15
16
  import { ManageMfaWidgetView } from '../../views/ManageMfaWidgetView/ManageMfaWidgetView.js';
16
17
  import { ReceiveWalletFunds } from '../../views/ReceiveWalletFunds/ReceiveWalletFunds.js';
18
+ import { SessionManagementInfoView } from '../../views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.js';
17
19
 
18
20
  const mapViewToComponent = {
19
21
  'account-and-security-settings': AccountAndSecuritySettingsView,
@@ -30,6 +32,8 @@ const mapViewToComponent = {
30
32
  profile: ProfileView,
31
33
  'receive-wallet-funds': ReceiveWalletFunds,
32
34
  'send-balance': SendBalanceWidgetView,
35
+ 'session-management': SessionManagementView,
36
+ 'session-management-info': SessionManagementInfoView,
33
37
  settings: SettingsView,
34
38
  wallets: WalletsView,
35
39
  };
@@ -9,9 +9,11 @@ export declare const DynamicPasskeyWidgetViews: readonly ["manage-passkeys"];
9
9
  export declare const DynamicMfaWidgetViews: readonly ["manage-mfa", "manage-mfa-no-footer"];
10
10
  export type DynamicPasskeyWidgetViewsType = typeof DynamicPasskeyWidgetViews[number];
11
11
  export type DynamicMfaWidgetViewsType = typeof DynamicMfaWidgetViews[number];
12
+ export declare const DynamicSessionManagementViews: readonly ["session-management", "session-management-info"];
13
+ export type DynamicSessionManagementViewsType = typeof DynamicSessionManagementViews[number];
12
14
  export declare const DynamicTransactionsWidgetViews: readonly ["send-balance"];
13
15
  export type DynamicTransactionsWidgetViewsType = typeof DynamicTransactionsWidgetViews[number];
14
- export type DynamicWidgetViews = 'wallets' | 'profile' | 'edit-profile' | 'choose-wallet-funding-method' | 'receive-wallet-funds' | DynamicTransactionsWidgetViewsType | DynamicPasskeyWidgetViewsType | DynamicMfaWidgetViewsType | DynamicSettingsType | DynamicGlobalWalletType | 'connected-apps' | 'deposit-view' | 'choose-onramp-provider' | 'choose-linked-wallet';
16
+ export type DynamicWidgetViews = 'wallets' | 'profile' | 'edit-profile' | 'choose-wallet-funding-method' | 'receive-wallet-funds' | DynamicTransactionsWidgetViewsType | DynamicPasskeyWidgetViewsType | DynamicMfaWidgetViewsType | DynamicSettingsType | DynamicGlobalWalletType | DynamicSessionManagementViewsType | 'connected-apps' | 'deposit-view' | 'choose-onramp-provider' | 'choose-linked-wallet';
15
17
  export type DynamicWidgetViewMapConstraint = Record<DynamicWidgetViews, FC<any>>;
16
18
  export type DynamicWidgetViewMap = typeof mapViewToComponent;
17
19
  export type SetDynamicWidgetView = <T extends DynamicWidgetViews>(view: T, props?: ComponentProps<DynamicWidgetViewMap[T]>) => void;
@@ -22,6 +22,7 @@ var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
22
22
  var exportPrivateKey = require('../../../../shared/assets/export-private-key.cjs');
23
23
  var exportRecoveryPhrase = require('../../../../shared/assets/export-recovery-phrase.cjs');
24
24
  var footerInfoIcon = require('../../../../shared/assets/footer-info-icon.cjs');
25
+ var session = require('../../../../shared/assets/session.cjs');
25
26
  var shield = require('../../../../shared/assets/shield.cjs');
26
27
  var signInWithEmail = require('../../../../shared/assets/sign-in-with-email.cjs');
27
28
  var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
@@ -43,6 +44,7 @@ require('../../../../locale/locale.cjs');
43
44
  require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
44
45
  require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
45
46
  require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
47
+ var isZKSyncEnabled = require('../../../../utils/functions/isZKSyncEnabled/isZKSyncEnabled.cjs');
46
48
  require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
47
49
  require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
48
50
  require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
@@ -145,6 +147,7 @@ const AccountAndSecuritySettingsView = () => {
145
147
  const shouldShowPasskeyMFA = isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatible;
146
148
  const isEmbeddedWallet = Boolean(wallet && ((_k = (_j = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _j === void 0 ? void 0 : _j.key) === null || _k === void 0 ? void 0 : _k.startsWith('turnkey')));
147
149
  const isV3WaasWallet = Boolean(wallet && ((_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('dynamicwaas')));
150
+ const isZKSyncWallet = React.useMemo(() => isZKSyncEnabled.isZKSyncEnabled(projectSettings$1), [projectSettings$1]);
148
151
  const handleExportClick = React.useCallback((recoveryPhrase) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
149
152
  if (!isSessionKeyCompatible) {
150
153
  if (yield shouldInitRecovery()) {
@@ -184,6 +187,7 @@ const AccountAndSecuritySettingsView = () => {
184
187
  ]);
185
188
  const handleBackClick = React.useCallback(() => setDynamicWidgetView('settings'), [setDynamicWidgetView]);
186
189
  const handleMfaClick = React.useCallback(() => setDynamicWidgetView('manage-mfa'), [setDynamicWidgetView]);
190
+ const handleSessionManagementClick = React.useCallback(() => setDynamicWidgetView('session-management'), [setDynamicWidgetView]);
187
191
  const handlePasskeyButtonClick = React.useCallback(() => handlePasskeyClick(), [handlePasskeyClick]);
188
192
  const handleExportButtonClick = React.useCallback(() => handleExportClick(), [handleExportClick]);
189
193
  const handleExportWithPhraseClick = React.useCallback(() => handleExportClick(true), [handleExportClick]);
@@ -224,7 +228,7 @@ const AccountAndSecuritySettingsView = () => {
224
228
  // eslint-disable-next-line react/jsx-wrap-multilines
225
229
  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 })), isMfaEnabled && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-mfa-button', onClick: handleMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
226
230
  // eslint-disable-next-line react/jsx-wrap-multilines
227
- jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(shield.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.mfa_button', children: t('dyn_settings.security_section.mfa_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false }))] }), (isEmbeddedWallet || isV3WaasWallet) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isTurnkeyWallet &&
231
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(shield.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.mfa_button', children: t('dyn_settings.security_section.mfa_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false }))] }), isZKSyncWallet && (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: identitySectionTitleClasses, children: t('dyn_settings.session_management.title') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'session-management-button', onClick: handleSessionManagementClick, buttonClassName: 'settings-view__body__section__button', startSlot: jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(session.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.session_management.session_management_button', children: t('dyn_settings.session_management.session_management_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })] })), (isEmbeddedWallet || isV3WaasWallet) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isTurnkeyWallet &&
228
232
  !hasRecoveryEmail &&
229
233
  !isSessionKeyCompatible && (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsxs("div", { className: identitySectionTitleClasses, 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: emailButtonClasses, startSlot:
230
234
  // eslint-disable-next-line react/jsx-wrap-multilines
@@ -1,7 +1,7 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../../_virtual/_tslib.js';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
- import { useState, useCallback, useMemo } from 'react';
4
+ import { useState, useMemo, useCallback } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { isSessionKeyCompatibleWallet } from '@dynamic-labs/wallet-connector-core';
7
7
  import { Typography } from '../../../../components/Typography/Typography.js';
@@ -18,6 +18,7 @@ import { ReactComponent as SvgChevronLeft } from '../../../../shared/assets/chev
18
18
  import { ReactComponent as SvgExportPrivateKey } from '../../../../shared/assets/export-private-key.js';
19
19
  import { ReactComponent as SvgExportRecoveryPhrase } from '../../../../shared/assets/export-recovery-phrase.js';
20
20
  import { ReactComponent as SvgFooterInfoIcon } from '../../../../shared/assets/footer-info-icon.js';
21
+ import { ReactComponent as SvgSession } from '../../../../shared/assets/session.js';
21
22
  import { ReactComponent as SvgShield } from '../../../../shared/assets/shield.js';
22
23
  import { ReactComponent as SvgSignInWithEmail } from '../../../../shared/assets/sign-in-with-email.js';
23
24
  import { useViewContext } from '../../../../context/ViewContext/ViewContext.js';
@@ -39,6 +40,7 @@ import '../../../../locale/locale.js';
39
40
  import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
40
41
  import '../../../../store/state/primaryWalletId/primaryWalletId.js';
41
42
  import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
43
+ import { isZKSyncEnabled } from '../../../../utils/functions/isZKSyncEnabled/isZKSyncEnabled.js';
42
44
  import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
43
45
  import '../../../../context/AccountExistsContext/AccountExistsContext.js';
44
46
  import '../../../../context/UserWalletsContext/UserWalletsContext.js';
@@ -141,6 +143,7 @@ const AccountAndSecuritySettingsView = () => {
141
143
  const shouldShowPasskeyMFA = isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatible;
142
144
  const isEmbeddedWallet = Boolean(wallet && ((_k = (_j = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _j === void 0 ? void 0 : _j.key) === null || _k === void 0 ? void 0 : _k.startsWith('turnkey')));
143
145
  const isV3WaasWallet = Boolean(wallet && ((_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('dynamicwaas')));
146
+ const isZKSyncWallet = useMemo(() => isZKSyncEnabled(projectSettings), [projectSettings]);
144
147
  const handleExportClick = useCallback((recoveryPhrase) => __awaiter(void 0, void 0, void 0, function* () {
145
148
  if (!isSessionKeyCompatible) {
146
149
  if (yield shouldInitRecovery()) {
@@ -180,6 +183,7 @@ const AccountAndSecuritySettingsView = () => {
180
183
  ]);
181
184
  const handleBackClick = useCallback(() => setDynamicWidgetView('settings'), [setDynamicWidgetView]);
182
185
  const handleMfaClick = useCallback(() => setDynamicWidgetView('manage-mfa'), [setDynamicWidgetView]);
186
+ const handleSessionManagementClick = useCallback(() => setDynamicWidgetView('session-management'), [setDynamicWidgetView]);
183
187
  const handlePasskeyButtonClick = useCallback(() => handlePasskeyClick(), [handlePasskeyClick]);
184
188
  const handleExportButtonClick = useCallback(() => handleExportClick(), [handleExportClick]);
185
189
  const handleExportWithPhraseClick = useCallback(() => handleExportClick(true), [handleExportClick]);
@@ -220,7 +224,7 @@ const AccountAndSecuritySettingsView = () => {
220
224
  // eslint-disable-next-line react/jsx-wrap-multilines
221
225
  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 })), isMfaEnabled && (jsx(TypographyButton, { dataTestId: 'manage-mfa-button', onClick: handleMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
222
226
  // eslint-disable-next-line react/jsx-wrap-multilines
223
- jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgShield, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.mfa_button', children: t('dyn_settings.security_section.mfa_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false }))] }), (isEmbeddedWallet || isV3WaasWallet) && (jsxs(Fragment, { children: [isTurnkeyWallet &&
227
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgShield, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.mfa_button', children: t('dyn_settings.security_section.mfa_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false }))] }), isZKSyncWallet && (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: identitySectionTitleClasses, children: t('dyn_settings.session_management.title') }), jsx(TypographyButton, { dataTestId: 'session-management-button', onClick: handleSessionManagementClick, buttonClassName: 'settings-view__body__section__button', startSlot: jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgSession, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.session_management.session_management_button', children: t('dyn_settings.session_management.session_management_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })] })), (isEmbeddedWallet || isV3WaasWallet) && (jsxs(Fragment, { children: [isTurnkeyWallet &&
224
228
  !hasRecoveryEmail &&
225
229
  !isSessionKeyCompatible && (jsxs("div", { className: 'settings-view__body__section', children: [jsxs("div", { className: identitySectionTitleClasses, 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: emailButtonClasses, startSlot:
226
230
  // eslint-disable-next-line react/jsx-wrap-multilines
@@ -0,0 +1,15 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var reactI18next = require('react-i18next');
8
+ var Typography = require('../../../../../components/Typography/Typography.cjs');
9
+
10
+ const EmptySessionsView = () => {
11
+ const { t } = reactI18next.useTranslation();
12
+ return (jsxRuntime.jsx("div", { className: 'empty-sessions-view', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', children: t('dyn_session_management.empty_sessions_view.title') }) }));
13
+ };
14
+
15
+ exports.EmptySessionsView = EmptySessionsView;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const EmptySessionsView: FC;
@@ -0,0 +1,11 @@
1
+ 'use client'
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { Typography } from '../../../../../components/Typography/Typography.js';
5
+
6
+ const EmptySessionsView = () => {
7
+ const { t } = useTranslation();
8
+ return (jsx("div", { className: 'empty-sessions-view', children: jsx(Typography, { variant: 'body_normal', color: 'secondary', children: t('dyn_session_management.empty_sessions_view.title') }) }));
9
+ };
10
+
11
+ export { EmptySessionsView };
@@ -0,0 +1 @@
1
+ export * from './EmptySessionsView';
@@ -0,0 +1,28 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var React = require('react');
8
+ var reactI18next = require('react-i18next');
9
+ var ModalHeader = require('../../../../../components/ModalHeader/ModalHeader.cjs');
10
+ var Typography = require('../../../../../components/Typography/Typography.cjs');
11
+ var DynamicWidgetContext = require('../../../context/DynamicWidgetContext.cjs');
12
+ var chevronLeft = require('../../../../../shared/assets/chevron-left.cjs');
13
+ require('@dynamic-labs/iconic');
14
+ require('../../../../../context/ViewContext/ViewContext.cjs');
15
+ var IconButton = require('../../../../../components/IconButton/IconButton.cjs');
16
+ var TypographyButton = require('../../../../../components/TypographyButton/TypographyButton.cjs');
17
+
18
+ const SessionManagementInfoView = () => {
19
+ const { t } = reactI18next.useTranslation();
20
+ const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
21
+ const handleBack = React.useCallback(() => {
22
+ setDynamicWidgetView('session-management');
23
+ }, [setDynamicWidgetView]);
24
+ const renderBackButton = () => (jsxRuntime.jsx(IconButton.IconButton, { onClick: handleBack, "aria-label": t('dyn_session_management.aria.back_button_label'), children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
25
+ return (jsxRuntime.jsxs("div", { className: 'session-management-info-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: renderBackButton(), children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', children: t('dyn_session_management.info_view.title') }) }), jsxRuntime.jsxs("div", { className: 'session-management-info-view__body', children: [jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', as: 'span', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', as: 'span', children: t('dyn_session_management.info_view.description_bold') }), t('dyn_session_management.info_view.description_2')] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', as: 'p', children: t('dyn_session_management.info_view.description_3') })] }), jsxRuntime.jsx("div", { className: 'session-management-info-view__footer', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: handleBack, expanded: true, copykey: 'dyn_session_management.info_view.continue_button', children: t('dyn_session_management.info_view.continue_button') }) })] }));
26
+ };
27
+
28
+ exports.SessionManagementInfoView = SessionManagementInfoView;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const SessionManagementInfoView: FC;
@@ -0,0 +1,24 @@
1
+ 'use client'
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useCallback } from 'react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { ModalHeader } from '../../../../../components/ModalHeader/ModalHeader.js';
6
+ import { Typography } from '../../../../../components/Typography/Typography.js';
7
+ import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
8
+ import { ReactComponent as SvgChevronLeft } from '../../../../../shared/assets/chevron-left.js';
9
+ import '@dynamic-labs/iconic';
10
+ import '../../../../../context/ViewContext/ViewContext.js';
11
+ import { IconButton } from '../../../../../components/IconButton/IconButton.js';
12
+ import { TypographyButton } from '../../../../../components/TypographyButton/TypographyButton.js';
13
+
14
+ const SessionManagementInfoView = () => {
15
+ const { t } = useTranslation();
16
+ const { setDynamicWidgetView } = useWidgetContext();
17
+ const handleBack = useCallback(() => {
18
+ setDynamicWidgetView('session-management');
19
+ }, [setDynamicWidgetView]);
20
+ const renderBackButton = () => (jsx(IconButton, { onClick: handleBack, "aria-label": t('dyn_session_management.aria.back_button_label'), children: jsx(SvgChevronLeft, {}) }));
21
+ return (jsxs("div", { className: 'session-management-info-view', children: [jsx(ModalHeader, { leading: renderBackButton(), children: jsx(Typography, { variant: 'title', color: 'primary', children: t('dyn_session_management.info_view.title') }) }), jsxs("div", { className: 'session-management-info-view__body', children: [jsxs(Typography, { variant: 'body_normal', as: 'span', children: [jsx(Typography, { variant: 'body_normal', weight: 'bold', as: 'span', children: t('dyn_session_management.info_view.description_bold') }), t('dyn_session_management.info_view.description_2')] }), jsx(Typography, { variant: 'body_normal', as: 'p', children: t('dyn_session_management.info_view.description_3') })] }), jsx("div", { className: 'session-management-info-view__footer', children: jsx(TypographyButton, { onClick: handleBack, expanded: true, copykey: 'dyn_session_management.info_view.continue_button', children: t('dyn_session_management.info_view.continue_button') }) })] }));
22
+ };
23
+
24
+ export { SessionManagementInfoView };
@@ -0,0 +1 @@
1
+ export * from './SessionManagementInfoView';
@@ -0,0 +1,33 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var React = require('react');
8
+ var reactI18next = require('react-i18next');
9
+ var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
10
+ var footerInfoIcon = require('../../../../shared/assets/footer-info-icon.cjs');
11
+ require('@dynamic-labs/iconic');
12
+ require('../../../../context/ViewContext/ViewContext.cjs');
13
+ var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
14
+ var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
15
+ var Typography = require('../../../../components/Typography/Typography.cjs');
16
+ var IconButton = require('../../../../components/IconButton/IconButton.cjs');
17
+ var EmptySessionsView = require('./EmptySessionsView/EmptySessionsView.cjs');
18
+
19
+ const SessionManagementView = () => {
20
+ const { t } = reactI18next.useTranslation();
21
+ const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
22
+ const handleBackButtonClick = React.useCallback(() => {
23
+ setDynamicWidgetView('account-and-security-settings');
24
+ }, [setDynamicWidgetView]);
25
+ const handleInfoButtonClick = React.useCallback(() => {
26
+ setDynamicWidgetView('session-management-info');
27
+ }, [setDynamicWidgetView]);
28
+ const renderBackButton = () => (jsxRuntime.jsx(IconButton.IconButton, { onClick: handleBackButtonClick, "aria-label": t('dyn_session_management.aria.back_button_label'), children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
29
+ const renderInfoButton = () => (jsxRuntime.jsx(IconButton.IconButton, { onClick: handleInfoButtonClick, "aria-label": t('dyn_session_management.aria.info_button_label'), children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, {}) }));
30
+ return (jsxRuntime.jsxs("div", { className: 'session-management-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: renderBackButton(), trailing: renderInfoButton(), displayBorder: true, variant: 'filled', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_session_management.title', children: t('dyn_session_management.title') }) }), jsxRuntime.jsx("div", { className: 'session-management-view__body', children: jsxRuntime.jsx(EmptySessionsView.EmptySessionsView, {}) })] }));
31
+ };
32
+
33
+ exports.SessionManagementView = SessionManagementView;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const SessionManagementView: FC;
@@ -0,0 +1,29 @@
1
+ 'use client'
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useCallback } from 'react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { ReactComponent as SvgChevronLeft } from '../../../../shared/assets/chevron-left.js';
6
+ import { ReactComponent as SvgFooterInfoIcon } from '../../../../shared/assets/footer-info-icon.js';
7
+ import '@dynamic-labs/iconic';
8
+ import '../../../../context/ViewContext/ViewContext.js';
9
+ import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
10
+ import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
11
+ import { Typography } from '../../../../components/Typography/Typography.js';
12
+ import { IconButton } from '../../../../components/IconButton/IconButton.js';
13
+ import { EmptySessionsView } from './EmptySessionsView/EmptySessionsView.js';
14
+
15
+ const SessionManagementView = () => {
16
+ const { t } = useTranslation();
17
+ const { setDynamicWidgetView } = useWidgetContext();
18
+ const handleBackButtonClick = useCallback(() => {
19
+ setDynamicWidgetView('account-and-security-settings');
20
+ }, [setDynamicWidgetView]);
21
+ const handleInfoButtonClick = useCallback(() => {
22
+ setDynamicWidgetView('session-management-info');
23
+ }, [setDynamicWidgetView]);
24
+ const renderBackButton = () => (jsx(IconButton, { onClick: handleBackButtonClick, "aria-label": t('dyn_session_management.aria.back_button_label'), children: jsx(SvgChevronLeft, {}) }));
25
+ const renderInfoButton = () => (jsx(IconButton, { onClick: handleInfoButtonClick, "aria-label": t('dyn_session_management.aria.info_button_label'), children: jsx(SvgFooterInfoIcon, {}) }));
26
+ return (jsxs("div", { className: 'session-management-view', children: [jsx(ModalHeader, { leading: renderBackButton(), trailing: renderInfoButton(), displayBorder: true, variant: 'filled', children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_session_management.title', children: t('dyn_session_management.title') }) }), jsx("div", { className: 'session-management-view__body', children: jsx(EmptySessionsView, {}) })] }));
27
+ };
28
+
29
+ export { SessionManagementView };
@@ -0,0 +1 @@
1
+ export * from './SessionManagementView';
@@ -37,6 +37,7 @@ require('../../../../locale/locale.cjs');
37
37
  require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
38
38
  require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
39
39
  require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
40
+ var isZKSyncEnabled = require('../../../../utils/functions/isZKSyncEnabled/isZKSyncEnabled.cjs');
40
41
  require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
41
42
  require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
42
43
  require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
@@ -135,7 +136,10 @@ const SettingsView = () => {
135
136
  const isV3WaasWallet = Boolean(wallet &&
136
137
  ((_g = (_f = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _f === void 0 ? void 0 : _f.key) === null || _g === void 0 ? void 0 : _g.startsWith('dynamicwaas')) &&
137
138
  (wallet === null || wallet === void 0 ? void 0 : wallet.chain) === 'EVM');
138
- const shouldShowAccountAndSecuritySettings = isMfaEnabled || isEmbeddedWallet || isV3WaasWallet;
139
+ const shouldShowAccountAndSecuritySettings = isMfaEnabled ||
140
+ isEmbeddedWallet ||
141
+ isV3WaasWallet ||
142
+ isZKSyncEnabled.isZKSyncEnabled(projectSettings$1);
139
143
  return (jsxRuntime.jsxs("div", { className: 'settings-view', children: [jsxRuntime.jsx("div", { className: 'settings-view__body', children: shouldShowAccountAndSecuritySettings || globalWallet ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [(shouldShowAccountAndSecuritySettings || globalWallet) && (jsxRuntime.jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.general_section.title', 'General') })), shouldShowAccountAndSecuritySettings && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'account-and-security-button', buttonClassName: 'settings-view__body__section__button', onClick: handleAccountSecurityClick, startSlot: jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(accountAndSecurity.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.account_security.title', children: t('dyn_settings.account_security.title') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }))] }), globalWallet && (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.global_connectivity_section.title') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: handleConnectedAppsClick, dataTestId: 'connected-apps-button', buttonClassName: 'settings-view__body__section__button', startSlot: jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(connectedApps.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.global_connectivity_section.connected_apps_button', children: t('dyn_settings.global_connectivity_section.connected_apps_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false })] }))] })) : (jsxRuntime.jsx(EmptyScreen.EmptyScreen, {})) }), 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', children: t('dyn_settings.button_logout') }) }), !shouldShowAccountAndSecuritySettings && (jsxRuntime.jsx("div", { className: 'settings-view__delete-account-container', children: jsxRuntime.jsx(Typography.Typography, { onClick: handleDeleteAccountClick, "data-testid": 'delete-account-button', copykey: 'dyn_settings.delete_account.title', color: 'error-1', variant: 'body_small', className: 'settings-view__delete-account-container__delete-button', weight: 'medium', children: t('dyn_settings.delete_account.title') }) }))] }));
140
144
  };
141
145
 
@@ -33,6 +33,7 @@ import '../../../../locale/locale.js';
33
33
  import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
34
34
  import '../../../../store/state/primaryWalletId/primaryWalletId.js';
35
35
  import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
36
+ import { isZKSyncEnabled } from '../../../../utils/functions/isZKSyncEnabled/isZKSyncEnabled.js';
36
37
  import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
37
38
  import '../../../../context/AccountExistsContext/AccountExistsContext.js';
38
39
  import '../../../../context/UserWalletsContext/UserWalletsContext.js';
@@ -131,7 +132,10 @@ const SettingsView = () => {
131
132
  const isV3WaasWallet = Boolean(wallet &&
132
133
  ((_g = (_f = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _f === void 0 ? void 0 : _f.key) === null || _g === void 0 ? void 0 : _g.startsWith('dynamicwaas')) &&
133
134
  (wallet === null || wallet === void 0 ? void 0 : wallet.chain) === 'EVM');
134
- const shouldShowAccountAndSecuritySettings = isMfaEnabled || isEmbeddedWallet || isV3WaasWallet;
135
+ const shouldShowAccountAndSecuritySettings = isMfaEnabled ||
136
+ isEmbeddedWallet ||
137
+ isV3WaasWallet ||
138
+ isZKSyncEnabled(projectSettings);
135
139
  return (jsxs("div", { className: 'settings-view', children: [jsx("div", { className: 'settings-view__body', children: shouldShowAccountAndSecuritySettings || globalWallet ? (jsxs(Fragment, { children: [jsxs("div", { className: 'settings-view__body__section', children: [(shouldShowAccountAndSecuritySettings || globalWallet) && (jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.general_section.title', 'General') })), shouldShowAccountAndSecuritySettings && (jsx(TypographyButton, { dataTestId: 'account-and-security-button', buttonClassName: 'settings-view__body__section__button', onClick: handleAccountSecurityClick, startSlot: jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgAccountAndSecurity, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.account_security.title', children: t('dyn_settings.account_security.title') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }))] }), globalWallet && (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.global_connectivity_section.title') }), jsx(TypographyButton, { onClick: handleConnectedAppsClick, dataTestId: 'connected-apps-button', buttonClassName: 'settings-view__body__section__button', startSlot: jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgConnectedApps, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.global_connectivity_section.connected_apps_button', children: t('dyn_settings.global_connectivity_section.connected_apps_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false })] }))] })) : (jsx(EmptyScreen, {})) }), 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', children: t('dyn_settings.button_logout') }) }), !shouldShowAccountAndSecuritySettings && (jsx("div", { className: 'settings-view__delete-account-container', children: jsx(Typography, { onClick: handleDeleteAccountClick, "data-testid": 'delete-account-button', copykey: 'dyn_settings.delete_account.title', color: 'error-1', variant: 'body_small', className: 'settings-view__delete-account-container__delete-button', weight: 'medium', children: t('dyn_settings.delete_account.title') }) }))] }));
136
140
  };
137
141
 
@@ -5,3 +5,4 @@ export { SendBalanceWidgetView } from './SendBalanceWidgetView';
5
5
  export { ManagePasskeysWidgetView } from './ManagePasskeysWidgetView';
6
6
  export { SettingsView } from './SettingsView';
7
7
  export { AccountAndSecuritySettingsView } from './AccountAndSecuritySettingsView';
8
+ export { SessionManagementView } from './SessionManagementView';