@dynamic-labs/sdk-react-core 3.1.4 → 3.3.0

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 (33) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +10 -10
  5. package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.cjs +15 -8
  6. package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.js +15 -8
  7. package/src/lib/locale/en/translation.cjs +43 -24
  8. package/src/lib/locale/en/translation.d.ts +43 -24
  9. package/src/lib/locale/en/translation.js +43 -24
  10. package/src/lib/shared/assets/connected-apps.cjs +64 -0
  11. package/src/lib/shared/assets/connected-apps.js +40 -0
  12. package/src/lib/shared/assets/embedded-wallet-icon.cjs +11 -10
  13. package/src/lib/shared/assets/embedded-wallet-icon.js +11 -10
  14. package/src/lib/shared/assets/index.d.ts +1 -0
  15. package/src/lib/styles/index.shadow.cjs +1 -1
  16. package/src/lib/styles/index.shadow.js +1 -1
  17. package/src/lib/utils/functions/socialStorage/socialStorage.d.ts +3 -0
  18. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -0
  19. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -0
  20. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.cjs +4 -2
  21. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js +4 -2
  22. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +8 -1
  23. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +9 -2
  24. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +4 -1
  25. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +19 -14
  26. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +4 -1
  27. package/src/lib/widgets/DynamicWidget/views/ConnectedAppsView/ConnectedAppsView.cjs +180 -0
  28. package/src/lib/widgets/DynamicWidget/views/ConnectedAppsView/ConnectedAppsView.d.ts +12 -0
  29. package/src/lib/widgets/DynamicWidget/views/ConnectedAppsView/ConnectedAppsView.js +175 -0
  30. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.cjs +7 -9
  31. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.js +7 -9
  32. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +17 -8
  33. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +17 -8
@@ -114,13 +114,13 @@ const GlobalWalletView = () => {
114
114
  throw new Error('Global Wallet not found');
115
115
  const showBanner = useCallback((message, type) => {
116
116
  setBannerMessage({ message, type });
117
- const timeout = type === 'success' ? 2000 : 3000;
117
+ const timeout = type === 'success' ? 0 : 3000;
118
118
  setTimeout(() => {
119
119
  setBannerMessage(null);
120
- if (type === 'success')
121
- goToInitialDynamicWidgetView();
122
120
  }, timeout);
123
- }, [goToInitialDynamicWidgetView]);
121
+ },
122
+ // eslint-disable-next-line react-hooks/exhaustive-deps
123
+ []);
124
124
  const handleConfirmView = (pairingInfo) => {
125
125
  setView('global-wallet-confirm', {
126
126
  onCancel: () => {
@@ -132,7 +132,7 @@ const GlobalWalletView = () => {
132
132
  setWalletConnectUri('');
133
133
  },
134
134
  onConfirm: () => __awaiter(void 0, void 0, void 0, function* () {
135
- var _a, _b;
135
+ var _a;
136
136
  try {
137
137
  yield globalWallet.confirmPairing(true);
138
138
  setDynamicWidgetView('global-wallet');
@@ -140,13 +140,11 @@ const GlobalWalletView = () => {
140
140
  ignoreIfIsEmbeddedWidget: false,
141
141
  performMultiWalletChecks: false,
142
142
  });
143
- showBanner(t('global_wallet.banner.success', {
144
- name: (_a = pairingInfo.name) !== null && _a !== void 0 ? _a : t('global_wallet.the_dapp'),
145
- }), 'success');
143
+ setDynamicWidgetView('connected-apps', { name: pairingInfo.name });
146
144
  }
147
145
  catch (error) {
148
146
  showBanner(t('global_wallet.banner.warning', {
149
- name: (_b = pairingInfo.name) !== null && _b !== void 0 ? _b : t('global_wallet.the_dapp'),
147
+ name: (_a = pairingInfo.name) !== null && _a !== void 0 ? _a : t('global_wallet.the_dapp'),
150
148
  }), 'error');
151
149
  }
152
150
  }),
@@ -21,6 +21,7 @@ require('../../../../context/ViewContext/ViewContext.cjs');
21
21
  var add = require('../../../../shared/assets/add.cjs');
22
22
  var altKey = require('../../../../shared/assets/alt-key.cjs');
23
23
  var androidTouchId = require('../../../../shared/assets/android-touch-id.cjs');
24
+ var connectedApps = require('../../../../shared/assets/connected-apps.cjs');
24
25
  var checkCircle = require('../../../../shared/assets/check-circle.cjs');
25
26
  var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
26
27
  var exportPrivateKey = require('../../../../shared/assets/export-private-key.cjs');
@@ -117,8 +118,11 @@ require('../../../../store/state/tokenBalances.cjs');
117
118
  var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
118
119
 
119
120
  const SettingsView = () => {
120
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
121
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
121
122
  const { projectSettings, primaryWallet, user, handleLogOut } = useInternalDynamicContext.useInternalDynamicContext();
123
+ const { globalWallet } =
124
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
125
+ (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) !== null && _a !== void 0 ? _a : {};
122
126
  const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
123
127
  const { addEmbeddedWalletRecoveryEmail } = useEmbeddedWalletAuthenticator.useEmbeddedWalletAuthenticator();
124
128
  const { createPassword } = useEmbeddedWallet.useEmbeddedWallet();
@@ -129,17 +133,20 @@ const SettingsView = () => {
129
133
  const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery.usePasskeyRecovery();
130
134
  const [isLoading, setIsLoading] = React.useState(false);
131
135
  const { getEOAWallet } = useSmartWallets.useSmartWallets();
132
- const cbWalletProperties = (_b = (_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.find(({ walletName }) => walletName === 'coinbasempc')) === null || _b === void 0 ? void 0 : _b.walletProperties;
136
+ const cbWalletProperties = (_c = (_b = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.find(({ walletName }) => walletName === 'coinbasempc')) === null || _c === void 0 ? void 0 : _c.walletProperties;
133
137
  const isCoinbaseWallet = walletConnectorCore.isCoinbaseMpcWalletConnector(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
134
138
  const hasClaimedCoinbaseMPC = Boolean(cbWalletProperties === null || cbWalletProperties === void 0 ? void 0 : cbWalletProperties.claimed);
135
- const turnkeyWalletProperties = (_d = (_c = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _c === void 0 ? void 0 : _c.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _d === void 0 ? void 0 : _d.walletProperties;
139
+ const turnkeyWalletProperties = (_e = (_d = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _d === void 0 ? void 0 : _d.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _e === void 0 ? void 0 : _e.walletProperties;
136
140
  const isTurnkeyHDWallet = turnkeyWalletProperties === null || turnkeyWalletProperties === void 0 ? void 0 : turnkeyWalletProperties.turnkeyHDWalletId;
137
- const isPasskeyEnabled = Boolean((_h = (_g = (_f = (_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _e === void 0 ? void 0 : _e.embeddedWallets) === null || _f === void 0 ? void 0 : _f.supportedSecurityMethods) === null || _g === void 0 ? void 0 : _g.passkey) === null || _h === void 0 ? void 0 : _h.isEnabled);
141
+ const isPasskeyEnabled = Boolean((_j = (_h = (_g = (_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _f === void 0 ? void 0 : _f.embeddedWallets) === null || _g === void 0 ? void 0 : _g.supportedSecurityMethods) === null || _h === void 0 ? void 0 : _h.passkey) === null || _j === void 0 ? void 0 : _j.isEnabled);
138
142
  const isTurnkeyWalletWithAuthenticator = isTurnkeyWallet && !isTurnkeyWalletWithoutAuthenticator;
139
143
  const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
140
144
  const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
141
145
  const isSessionKeyCompatible = (primaryWallet && walletConnectorCore.isSessionKeyCompatibleWallet(primaryWallet)) ||
142
146
  (eoaWallet && walletConnectorCore.isSessionKeyCompatibleWallet(eoaWallet));
147
+ const handleConnectedAppsClick = () => {
148
+ setDynamicWidgetView('connected-apps');
149
+ };
143
150
  const handlePasskeyClick = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
144
151
  if (isTurnkeyWalletWithAuthenticator) {
145
152
  return setDynamicWidgetView('manage-passkeys');
@@ -175,14 +182,16 @@ const SettingsView = () => {
175
182
  return jsxRuntime.jsx(add.ReactComponent, { "data-testid": 'email-add-icon' });
176
183
  };
177
184
  const isEmbeddedWallet = Boolean(wallet &&
178
- (((_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')) ||
179
- ((_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('coinbasempc'))));
180
- const isMfaEnabled = Boolean((_p = (_o = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _o === void 0 ? void 0 : _o.mfa) === null || _p === void 0 ? void 0 : _p.enabled);
185
+ (((_l = (_k = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _k === void 0 ? void 0 : _k.key) === null || _l === void 0 ? void 0 : _l.startsWith('turnkey')) ||
186
+ ((_o = (_m = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _m === void 0 ? void 0 : _m.key) === null || _o === void 0 ? void 0 : _o.startsWith('coinbasempc'))));
187
+ const isMfaEnabled = Boolean((_q = (_p = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _p === void 0 ? void 0 : _p.mfa) === null || _q === void 0 ? void 0 : _q.enabled);
181
188
  const shouldShowPasskeyMFA = isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatible;
182
189
  const shouldShowSecuritySection = isMfaEnabled || isCoinbaseWallet || shouldShowPasskeyMFA;
183
190
  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:
184
191
  // eslint-disable-next-line react/jsx-wrap-multilines
185
- 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', {
192
+ 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 })] }), 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:
193
+ // eslint-disable-next-line react/jsx-wrap-multilines
194
+ 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 })] })), shouldShowSecuritySection && (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: classNames.classNames('settings-view__body__section__title', {
186
195
  'settings-view__body__section__title__info-icon': !isTurnkeyWalletWithAuthenticator,
187
196
  }), children: t('dyn_settings.security_section.title') }), shouldShowPasskeyMFA && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-passkeys-button', onClick: () => handlePasskeyClick(), buttonClassName: classNames.classNames('settings-view__body__section__button', {
188
197
  'settings-view__body__section__button__badge': !isTurnkeyWalletWithAuthenticator,
@@ -17,6 +17,7 @@ import '../../../../context/ViewContext/ViewContext.js';
17
17
  import { ReactComponent as SvgAdd } from '../../../../shared/assets/add.js';
18
18
  import { ReactComponent as SvgAltKey } from '../../../../shared/assets/alt-key.js';
19
19
  import { ReactComponent as SvgAndroidTouchId } from '../../../../shared/assets/android-touch-id.js';
20
+ import { ReactComponent as SvgConnectedApps } from '../../../../shared/assets/connected-apps.js';
20
21
  import { ReactComponent as SvgCheckCircle } from '../../../../shared/assets/check-circle.js';
21
22
  import { ReactComponent as SvgChevronLeft } from '../../../../shared/assets/chevron-left.js';
22
23
  import { ReactComponent as SvgExportPrivateKey } from '../../../../shared/assets/export-private-key.js';
@@ -113,8 +114,11 @@ import '../../../../store/state/tokenBalances.js';
113
114
  import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
114
115
 
115
116
  const SettingsView = () => {
116
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
117
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
117
118
  const { projectSettings, primaryWallet, user, handleLogOut } = useInternalDynamicContext();
119
+ const { globalWallet } =
120
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
121
+ (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) !== null && _a !== void 0 ? _a : {};
118
122
  const { setDynamicWidgetView } = useWidgetContext();
119
123
  const { addEmbeddedWalletRecoveryEmail } = useEmbeddedWalletAuthenticator();
120
124
  const { createPassword } = useEmbeddedWallet();
@@ -125,17 +129,20 @@ const SettingsView = () => {
125
129
  const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery();
126
130
  const [isLoading, setIsLoading] = useState(false);
127
131
  const { getEOAWallet } = useSmartWallets();
128
- const cbWalletProperties = (_b = (_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.find(({ walletName }) => walletName === 'coinbasempc')) === null || _b === void 0 ? void 0 : _b.walletProperties;
132
+ const cbWalletProperties = (_c = (_b = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.find(({ walletName }) => walletName === 'coinbasempc')) === null || _c === void 0 ? void 0 : _c.walletProperties;
129
133
  const isCoinbaseWallet = isCoinbaseMpcWalletConnector(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
130
134
  const hasClaimedCoinbaseMPC = Boolean(cbWalletProperties === null || cbWalletProperties === void 0 ? void 0 : cbWalletProperties.claimed);
131
- const turnkeyWalletProperties = (_d = (_c = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _c === void 0 ? void 0 : _c.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _d === void 0 ? void 0 : _d.walletProperties;
135
+ const turnkeyWalletProperties = (_e = (_d = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _d === void 0 ? void 0 : _d.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _e === void 0 ? void 0 : _e.walletProperties;
132
136
  const isTurnkeyHDWallet = turnkeyWalletProperties === null || turnkeyWalletProperties === void 0 ? void 0 : turnkeyWalletProperties.turnkeyHDWalletId;
133
- const isPasskeyEnabled = Boolean((_h = (_g = (_f = (_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _e === void 0 ? void 0 : _e.embeddedWallets) === null || _f === void 0 ? void 0 : _f.supportedSecurityMethods) === null || _g === void 0 ? void 0 : _g.passkey) === null || _h === void 0 ? void 0 : _h.isEnabled);
137
+ const isPasskeyEnabled = Boolean((_j = (_h = (_g = (_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _f === void 0 ? void 0 : _f.embeddedWallets) === null || _g === void 0 ? void 0 : _g.supportedSecurityMethods) === null || _h === void 0 ? void 0 : _h.passkey) === null || _j === void 0 ? void 0 : _j.isEnabled);
134
138
  const isTurnkeyWalletWithAuthenticator = isTurnkeyWallet && !isTurnkeyWalletWithoutAuthenticator;
135
139
  const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
136
140
  const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
137
141
  const isSessionKeyCompatible = (primaryWallet && isSessionKeyCompatibleWallet(primaryWallet)) ||
138
142
  (eoaWallet && isSessionKeyCompatibleWallet(eoaWallet));
143
+ const handleConnectedAppsClick = () => {
144
+ setDynamicWidgetView('connected-apps');
145
+ };
139
146
  const handlePasskeyClick = () => __awaiter(void 0, void 0, void 0, function* () {
140
147
  if (isTurnkeyWalletWithAuthenticator) {
141
148
  return setDynamicWidgetView('manage-passkeys');
@@ -171,14 +178,16 @@ const SettingsView = () => {
171
178
  return jsx(SvgAdd, { "data-testid": 'email-add-icon' });
172
179
  };
173
180
  const isEmbeddedWallet = Boolean(wallet &&
174
- (((_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')) ||
175
- ((_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('coinbasempc'))));
176
- const isMfaEnabled = Boolean((_p = (_o = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _o === void 0 ? void 0 : _o.mfa) === null || _p === void 0 ? void 0 : _p.enabled);
181
+ (((_l = (_k = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _k === void 0 ? void 0 : _k.key) === null || _l === void 0 ? void 0 : _l.startsWith('turnkey')) ||
182
+ ((_o = (_m = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _m === void 0 ? void 0 : _m.key) === null || _o === void 0 ? void 0 : _o.startsWith('coinbasempc'))));
183
+ const isMfaEnabled = Boolean((_q = (_p = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _p === void 0 ? void 0 : _p.mfa) === null || _q === void 0 ? void 0 : _q.enabled);
177
184
  const shouldShowPasskeyMFA = isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatible;
178
185
  const shouldShowSecuritySection = isMfaEnabled || isCoinbaseWallet || shouldShowPasskeyMFA;
179
186
  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:
180
187
  // eslint-disable-next-line react/jsx-wrap-multilines
181
- 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', {
188
+ 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 })] }), 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:
189
+ // eslint-disable-next-line react/jsx-wrap-multilines
190
+ 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 })] })), shouldShowSecuritySection && (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: classNames('settings-view__body__section__title', {
182
191
  'settings-view__body__section__title__info-icon': !isTurnkeyWalletWithAuthenticator,
183
192
  }), children: t('dyn_settings.security_section.title') }), shouldShowPasskeyMFA && (jsx(TypographyButton, { dataTestId: 'manage-passkeys-button', onClick: () => handlePasskeyClick(), buttonClassName: classNames('settings-view__body__section__button', {
184
193
  'settings-view__body__section__button__badge': !isTurnkeyWalletWithAuthenticator,