@dynamic-labs/sdk-react-core 4.12.3 → 4.13.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,13 @@
1
1
 
2
+ ## [4.13.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.12.4...v4.13.0) (2025-04-24)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * upgrade solana/web3.js to 1.98.1 to address security vulnerability. this required us to upgrade to node 20+ ([#8580](https://github.com/dynamic-labs/dynamic-auth/issues/8580)) ([ec0dc0d](https://github.com/dynamic-labs/dynamic-auth/commit/ec0dc0d6460feb79b513619357febd5c19bad657))
8
+
9
+ ### [4.12.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.12.3...v4.12.4) (2025-04-18)
10
+
2
11
  ### [4.12.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.12.2...v4.12.3) (2025-04-17)
3
12
 
4
13
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.12.3";
6
+ var version = "4.13.0";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.658",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "4.12.3";
2
+ var version = "4.13.0";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.658",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "4.12.3",
3
+ "version": "4.13.0",
4
4
  "dependencies": {
5
5
  "@dynamic-labs/sdk-api-core": "0.0.658",
6
6
  "@hcaptcha/react-hcaptcha": "1.4.4",
@@ -14,16 +14,16 @@
14
14
  "yup": "0.32.11",
15
15
  "react-international-phone": "4.2.5",
16
16
  "bs58": "5.0.0",
17
- "@dynamic-labs/assert-package-version": "4.12.3",
18
- "@dynamic-labs/iconic": "4.12.3",
19
- "@dynamic-labs/logger": "4.12.3",
20
- "@dynamic-labs/multi-wallet": "4.12.3",
21
- "@dynamic-labs/rpc-providers": "4.12.3",
22
- "@dynamic-labs/store": "4.12.3",
23
- "@dynamic-labs/types": "4.12.3",
24
- "@dynamic-labs/utils": "4.12.3",
25
- "@dynamic-labs/wallet-book": "4.12.3",
26
- "@dynamic-labs/wallet-connector-core": "4.12.3",
17
+ "@dynamic-labs/assert-package-version": "4.13.0",
18
+ "@dynamic-labs/iconic": "4.13.0",
19
+ "@dynamic-labs/logger": "4.13.0",
20
+ "@dynamic-labs/multi-wallet": "4.13.0",
21
+ "@dynamic-labs/rpc-providers": "4.13.0",
22
+ "@dynamic-labs/store": "4.13.0",
23
+ "@dynamic-labs/types": "4.13.0",
24
+ "@dynamic-labs/utils": "4.13.0",
25
+ "@dynamic-labs/wallet-book": "4.13.0",
26
+ "@dynamic-labs/wallet-connector-core": "4.13.0",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
29
29
  "devDependencies": {
@@ -8,97 +8,8 @@ var classNames = require('../../utils/functions/classNames/classNames.cjs');
8
8
  var Typography = require('../Typography/Typography.cjs');
9
9
  require('react');
10
10
  var dynamicLogo = require('../../assets/dynamic-logo.cjs');
11
- require('../../context/DynamicContext/DynamicContext.cjs');
12
- require('../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
13
- require('@dynamic-labs/sdk-api-core');
14
- require('../../shared/logger.cjs');
15
- require('@dynamic-labs/iconic');
16
- require('@dynamic-labs/wallet-connector-core');
17
- require('../../context/ViewContext/ViewContext.cjs');
18
- require('@dynamic-labs/wallet-book');
19
- require('@dynamic-labs/utils');
20
- require('../../utils/constants/colors.cjs');
21
- require('../../utils/constants/values.cjs');
22
- require('../../shared/consts/index.cjs');
23
- require('../../events/dynamicEvents.cjs');
24
- require('../../../../_virtual/_tslib.cjs');
25
- require('../../context/CaptchaContext/CaptchaContext.cjs');
26
- require('../../context/ErrorContext/ErrorContext.cjs');
27
- require('@dynamic-labs/multi-wallet');
28
- require('react-international-phone');
29
- require('../../store/state/nonce/nonce.cjs');
30
- require('../../store/state/projectSettings/projectSettings.cjs');
31
- require('../../config/ApiEndpoint.cjs');
32
- require('../../store/state/user/user.cjs');
33
- require('../../locale/locale.cjs');
34
- require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
35
- require('../../store/state/primaryWalletId/primaryWalletId.cjs');
36
- require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
37
- require('../../context/AccountExistsContext/AccountExistsContext.cjs');
38
- require('../../context/UserWalletsContext/UserWalletsContext.cjs');
39
- require('../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
40
- require('../../context/VerificationContext/VerificationContext.cjs');
41
- require('react-dom');
42
- require('../../utils/functions/compareChains/compareChains.cjs');
43
- require('../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
44
- require('../../context/ThemeContext/ThemeContext.cjs');
45
- require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
46
- require('bs58');
47
- require('@dynamic-labs/types');
48
- require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
49
- require('../../context/LoadingContext/LoadingContext.cjs');
50
- require('../../context/WalletContext/WalletContext.cjs');
51
- require('../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
52
- require('yup');
53
- require('../../context/MockContext/MockContext.cjs');
54
- require('../../views/CollectUserDataView/useFields.cjs');
55
- require('../../context/FieldsStateContext/FieldsStateContext.cjs');
56
- require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
57
- require('@dynamic-labs/rpc-providers');
58
- require('../../store/state/walletOptions/walletOptions.cjs');
59
- require('react-i18next');
60
- require('../Accordion/components/AccordionItem/AccordionItem.cjs');
61
- require('../Alert/Alert.cjs');
62
- require('../ShadowDOM/ShadowDOM.cjs');
63
- require('../IconButton/IconButton.cjs');
64
- require('../InlineWidget/InlineWidget.cjs');
65
- require('../Input/Input.cjs');
66
- require('../IsBrowser/IsBrowser.cjs');
67
- require('../MenuList/Dropdown/Dropdown.cjs');
68
- require('../OverlayCard/OverlayCard.cjs');
69
- require('../Transition/ZoomTransition/ZoomTransition.cjs');
70
- require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
71
- require('../Transition/OpacityTransition/OpacityTransition.cjs');
72
- require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
73
- require('../Popper/Popper/Popper.cjs');
74
- require('../Popper/PopperContext/PopperContext.cjs');
75
- require('react-focus-lock');
76
11
  var DynamicWidgetFooter = require('../../widgets/DynamicWidget/components/DynamicWidgetFooter/DynamicWidgetFooter.cjs');
77
- require('qrcode');
78
- require('formik');
79
- require('../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
80
- require('../../context/WalletGroupContext/WalletGroupContext.cjs');
81
- require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
82
- require('../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
83
- require('../../context/ConnectWithOtpContext/constants.cjs');
84
- require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
85
- require('@hcaptcha/react-hcaptcha');
86
- require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
87
- require('../../context/FooterAnimationContext/index.cjs');
88
- require('../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
89
- require('../../context/PasskeyContext/PasskeyContext.cjs');
90
- require('../../store/state/sendBalances.cjs');
91
- require('../../store/state/connectorsInitializing/connectorsInitializing.cjs');
92
- require('../OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
93
- require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
94
- require('../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
95
- require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
96
- require('../../context/OnrampContext/OnrampContext.cjs');
97
- require('../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
98
- require('../../../index.cjs');
99
- require('../../store/state/tokenBalances.cjs');
100
- require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
101
- var useInternalDynamicContext = require('../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
12
+ var projectSettings = require('../../store/state/projectSettings/projectSettings.cjs');
102
13
 
103
14
  const URL = 'https://dynamic.xyz';
104
15
  const alignClassNames = {
@@ -107,8 +18,8 @@ const alignClassNames = {
107
18
  };
108
19
  const PoweredByDynamic = ({ align = 'center', classNameLogo, classNameRoot, classNameText, asFooter, }) => {
109
20
  var _a;
110
- const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
111
- if (((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.displayDynamicMessaging) === false) {
21
+ const projectSettings$1 = projectSettings.useProjectSettings();
22
+ if (((_a = projectSettings$1 === null || projectSettings$1 === void 0 ? void 0 : projectSettings$1.sdk) === null || _a === void 0 ? void 0 : _a.displayDynamicMessaging) === false) {
112
23
  return null;
113
24
  }
114
25
  const content = (jsxRuntime.jsxs("a", { target: '_blank', href: URL, className: classNames.classNames('powered-by-dynamic', alignClassNames[align], classNameRoot), rel: 'noreferrer', children: [jsxRuntime.jsx(Typography.Typography, { as: 'span', color: 'tertiary', weight: 'regular', variant: 'body_mini', className: classNames.classNames('powered-by-dynamic__text', classNameText), children: "Powered by" }), jsxRuntime.jsx(dynamicLogo.ReactComponent, { className: classNames.classNames('powered-by-dynamic__logo', classNameLogo) })] }));
@@ -4,97 +4,8 @@ import { classNames } from '../../utils/functions/classNames/classNames.js';
4
4
  import { Typography } from '../Typography/Typography.js';
5
5
  import 'react';
6
6
  import { ReactComponent as SvgDynamicLogo } from '../../assets/dynamic-logo.js';
7
- import '../../context/DynamicContext/DynamicContext.js';
8
- import '../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
9
- import '@dynamic-labs/sdk-api-core';
10
- import '../../shared/logger.js';
11
- import '@dynamic-labs/iconic';
12
- import '@dynamic-labs/wallet-connector-core';
13
- import '../../context/ViewContext/ViewContext.js';
14
- import '@dynamic-labs/wallet-book';
15
- import '@dynamic-labs/utils';
16
- import '../../utils/constants/colors.js';
17
- import '../../utils/constants/values.js';
18
- import '../../shared/consts/index.js';
19
- import '../../events/dynamicEvents.js';
20
- import '../../../../_virtual/_tslib.js';
21
- import '../../context/CaptchaContext/CaptchaContext.js';
22
- import '../../context/ErrorContext/ErrorContext.js';
23
- import '@dynamic-labs/multi-wallet';
24
- import 'react-international-phone';
25
- import '../../store/state/nonce/nonce.js';
26
- import '../../store/state/projectSettings/projectSettings.js';
27
- import '../../config/ApiEndpoint.js';
28
- import '../../store/state/user/user.js';
29
- import '../../locale/locale.js';
30
- import '../../store/state/dynamicContextProps/dynamicContextProps.js';
31
- import '../../store/state/primaryWalletId/primaryWalletId.js';
32
- import '../../context/AccessDeniedContext/AccessDeniedContext.js';
33
- import '../../context/AccountExistsContext/AccountExistsContext.js';
34
- import '../../context/UserWalletsContext/UserWalletsContext.js';
35
- import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
36
- import '../../context/VerificationContext/VerificationContext.js';
37
- import 'react-dom';
38
- import '../../utils/functions/compareChains/compareChains.js';
39
- import '../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
40
- import '../../context/ThemeContext/ThemeContext.js';
41
- import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
42
- import 'bs58';
43
- import '@dynamic-labs/types';
44
- import '../../context/SocialRedirectContext/SocialRedirectContext.js';
45
- import '../../context/LoadingContext/LoadingContext.js';
46
- import '../../context/WalletContext/WalletContext.js';
47
- import '../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
48
- import 'yup';
49
- import '../../context/MockContext/MockContext.js';
50
- import '../../views/CollectUserDataView/useFields.js';
51
- import '../../context/FieldsStateContext/FieldsStateContext.js';
52
- import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
53
- import '@dynamic-labs/rpc-providers';
54
- import '../../store/state/walletOptions/walletOptions.js';
55
- import 'react-i18next';
56
- import '../Accordion/components/AccordionItem/AccordionItem.js';
57
- import '../Alert/Alert.js';
58
- import '../ShadowDOM/ShadowDOM.js';
59
- import '../IconButton/IconButton.js';
60
- import '../InlineWidget/InlineWidget.js';
61
- import '../Input/Input.js';
62
- import '../IsBrowser/IsBrowser.js';
63
- import '../MenuList/Dropdown/Dropdown.js';
64
- import '../OverlayCard/OverlayCard.js';
65
- import '../Transition/ZoomTransition/ZoomTransition.js';
66
- import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
67
- import '../Transition/OpacityTransition/OpacityTransition.js';
68
- import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
69
- import '../Popper/Popper/Popper.js';
70
- import '../Popper/PopperContext/PopperContext.js';
71
- import 'react-focus-lock';
72
7
  import { DynamicWidgetFooter } from '../../widgets/DynamicWidget/components/DynamicWidgetFooter/DynamicWidgetFooter.js';
73
- import 'qrcode';
74
- import 'formik';
75
- import '../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
76
- import '../../context/WalletGroupContext/WalletGroupContext.js';
77
- import '../../context/IpConfigurationContext/IpConfigurationContext.js';
78
- import '../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
79
- import '../../context/ConnectWithOtpContext/constants.js';
80
- import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
81
- import '@hcaptcha/react-hcaptcha';
82
- import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
83
- import '../../context/FooterAnimationContext/index.js';
84
- import '../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
85
- import '../../context/PasskeyContext/PasskeyContext.js';
86
- import '../../store/state/sendBalances.js';
87
- import '../../store/state/connectorsInitializing/connectorsInitializing.js';
88
- import '../OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
89
- import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
90
- import '../../views/TransactionConfirmationView/TransactionConfirmationView.js';
91
- import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
92
- import '../../context/OnrampContext/OnrampContext.js';
93
- import '../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
94
- import '../../../index.js';
95
- import '../../store/state/tokenBalances.js';
96
- import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
97
- import { useInternalDynamicContext } from '../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
8
+ import { useProjectSettings } from '../../store/state/projectSettings/projectSettings.js';
98
9
 
99
10
  const URL = 'https://dynamic.xyz';
100
11
  const alignClassNames = {
@@ -103,7 +14,7 @@ const alignClassNames = {
103
14
  };
104
15
  const PoweredByDynamic = ({ align = 'center', classNameLogo, classNameRoot, classNameText, asFooter, }) => {
105
16
  var _a;
106
- const { projectSettings } = useInternalDynamicContext();
17
+ const projectSettings = useProjectSettings();
107
18
  if (((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.displayDynamicMessaging) === false) {
108
19
  return null;
109
20
  }
@@ -172,10 +172,9 @@ const UserProfile = ({ rootClassName }) => {
172
172
  }
173
173
  return (jsxRuntime.jsx(UserProfileField.UserProfileField, { name: name, label: fieldLabel, value: fieldValue }, name));
174
174
  }
175
- const { label: defaultLabel, key } = index$1.getValueByKey(fieldsConfig, name);
176
- label !== null && label !== void 0 ? label : (label = defaultLabel);
175
+ const { key } = index$1.getValueByKey(fieldsConfig, name);
177
176
  const value = mapFieldKeyToValue(name);
178
- return (jsxRuntime.jsx(UserProfileField.UserProfileField, { copykey: key, name: name, label: label, value: value }, name));
177
+ return (jsxRuntime.jsx(UserProfileField.UserProfileField, { copykey: key, name: name, label: t(`${key}`), value: value }, name));
179
178
  }) }) })), canLink && !multiWallet && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, { title: t('dyn_user_profile.wallets.title'), children: jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'link-wallet-button', onClick: addNewWallet, startSlot: jsxRuntime.jsx(add.ReactComponent, {}), showInternalLoading: false, children: jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_user_profile.wallets.link_wallet_button', children: t('dyn_user_profile.wallets.link_wallet_button') }) }) })), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, { title: t('dyn_user_profile.social_accounts.title'), children: jsxRuntime.jsx("div", { className: 'user-profile__social-accounts', children: providers.map(({ provider }) => (jsxRuntime.jsx(UserProfileSocialAccount.UserProfileSocialAccount, { provider: provider }, provider))) }) }))] }));
180
179
  };
181
180
 
@@ -168,10 +168,9 @@ const UserProfile = ({ rootClassName }) => {
168
168
  }
169
169
  return (jsx(UserProfileField, { name: name, label: fieldLabel, value: fieldValue }, name));
170
170
  }
171
- const { label: defaultLabel, key } = getValueByKey(fieldsConfig, name);
172
- label !== null && label !== void 0 ? label : (label = defaultLabel);
171
+ const { key } = getValueByKey(fieldsConfig, name);
173
172
  const value = mapFieldKeyToValue(name);
174
- return (jsx(UserProfileField, { copykey: key, name: name, label: label, value: value }, name));
173
+ return (jsx(UserProfileField, { copykey: key, name: name, label: t(`${key}`), value: value }, name));
175
174
  }) }) })), canLink && !multiWallet && (jsx(UserProfileSection, { title: t('dyn_user_profile.wallets.title'), children: jsx(TypographyButton, { dataTestId: 'link-wallet-button', onClick: addNewWallet, startSlot: jsx(SvgAdd, {}), showInternalLoading: false, children: jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_user_profile.wallets.link_wallet_button', children: t('dyn_user_profile.wallets.link_wallet_button') }) }) })), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsx(UserProfileSection, { title: t('dyn_user_profile.social_accounts.title'), children: jsx("div", { className: 'user-profile__social-accounts', children: providers.map(({ provider }) => (jsx(UserProfileSocialAccount, { provider: provider }, provider))) }) }))] }));
176
175
  };
177
176
 
@@ -4,6 +4,7 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
+ var reactI18next = require('react-i18next');
7
8
  require('react');
8
9
  require('react-dom');
9
10
  require('@dynamic-labs/sdk-api-core');
@@ -59,7 +60,6 @@ require('../../context/FieldsStateContext/FieldsStateContext.cjs');
59
60
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
60
61
  require('@dynamic-labs/rpc-providers');
61
62
  require('../../store/state/walletOptions/walletOptions.cjs');
62
- require('react-i18next');
63
63
  require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
64
64
  require('../../components/Alert/Alert.cjs');
65
65
  require('../../components/ShadowDOM/ShadowDOM.cjs');
@@ -129,25 +129,29 @@ const DynamicUserProfileLayout = ({ variant, className, style, }) => {
129
129
  const { multiWallet } = useInternalDynamicContext.useInternalDynamicContext();
130
130
  const isKYCEnabled = useKYCFlag.useKYCFlag();
131
131
  const { dynamicWidgetView, setDynamicWidgetView, overridenWidgetView } = DynamicWidgetContext.useWidgetContext();
132
+ const { t } = reactI18next.useTranslation();
132
133
  const getNavBarOptions = () => {
133
134
  const options = [];
134
135
  if (multiWallet) {
135
136
  options.push({
137
+ copykey: 'dyn_nav_bar.wallets',
136
138
  icon: jsxRuntime.jsx(walletOutlineV2.ReactComponent, {}),
137
- label: 'Wallets',
139
+ label: t('dyn_nav_bar.wallets'),
138
140
  value: 'wallets',
139
141
  });
140
142
  }
141
143
  if (isKYCEnabled) {
142
144
  options.push({
145
+ copykey: 'dyn_nav_bar.profile',
143
146
  icon: jsxRuntime.jsx(profileOutline.ReactComponent, {}),
144
- label: 'Profile',
147
+ label: t('dyn_nav_bar.profile'),
145
148
  value: 'profile',
146
149
  });
147
150
  }
148
151
  options.push({
152
+ copykey: 'dyn_nav_bar.settings',
149
153
  icon: jsxRuntime.jsx(settingsOutline.ReactComponent, {}),
150
- label: 'Settings',
154
+ label: t('dyn_nav_bar.settings'),
151
155
  value: 'settings',
152
156
  });
153
157
  return options;
@@ -1,5 +1,6 @@
1
1
  'use client'
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { useTranslation } from 'react-i18next';
3
4
  import 'react';
4
5
  import 'react-dom';
5
6
  import '@dynamic-labs/sdk-api-core';
@@ -55,7 +56,6 @@ import '../../context/FieldsStateContext/FieldsStateContext.js';
55
56
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
56
57
  import '@dynamic-labs/rpc-providers';
57
58
  import '../../store/state/walletOptions/walletOptions.js';
58
- import 'react-i18next';
59
59
  import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
60
60
  import '../../components/Alert/Alert.js';
61
61
  import '../../components/ShadowDOM/ShadowDOM.js';
@@ -125,25 +125,29 @@ const DynamicUserProfileLayout = ({ variant, className, style, }) => {
125
125
  const { multiWallet } = useInternalDynamicContext();
126
126
  const isKYCEnabled = useKYCFlag();
127
127
  const { dynamicWidgetView, setDynamicWidgetView, overridenWidgetView } = useWidgetContext();
128
+ const { t } = useTranslation();
128
129
  const getNavBarOptions = () => {
129
130
  const options = [];
130
131
  if (multiWallet) {
131
132
  options.push({
133
+ copykey: 'dyn_nav_bar.wallets',
132
134
  icon: jsx(SvgWalletOutlineV2, {}),
133
- label: 'Wallets',
135
+ label: t('dyn_nav_bar.wallets'),
134
136
  value: 'wallets',
135
137
  });
136
138
  }
137
139
  if (isKYCEnabled) {
138
140
  options.push({
141
+ copykey: 'dyn_nav_bar.profile',
139
142
  icon: jsx(SvgProfileOutline, {}),
140
- label: 'Profile',
143
+ label: t('dyn_nav_bar.profile'),
141
144
  value: 'profile',
142
145
  });
143
146
  }
144
147
  options.push({
148
+ copykey: 'dyn_nav_bar.settings',
145
149
  icon: jsx(SvgSettingsOutline, {}),
146
- label: 'Settings',
150
+ label: t('dyn_nav_bar.settings'),
147
151
  value: 'settings',
148
152
  });
149
153
  return options;
@@ -251,7 +251,7 @@ const translation = {
251
251
  label: 'Country',
252
252
  },
253
253
  email: {
254
- label: 'Email',
254
+ label: 'E-mail',
255
255
  validation: 'Email is not valid',
256
256
  },
257
257
  first_name: {
@@ -2181,6 +2181,21 @@ const translation = {
2181
2181
  title: 'Sign to confirm transfer',
2182
2182
  },
2183
2183
  },
2184
+ /**
2185
+ * @description copy keys for Dynamic widget nav bar
2186
+ * @default
2187
+ *
2188
+ dyn_nav_bar: {
2189
+ wallets: 'Wallets',
2190
+ profile: 'Profile',
2191
+ settings: 'Settings',
2192
+ },
2193
+ **/
2194
+ dyn_nav_bar: {
2195
+ wallets: 'Wallets',
2196
+ profile: 'Profile',
2197
+ settings: 'Settings',
2198
+ },
2184
2199
  /**
2185
2200
  * @description copy keys for Dynamic widget
2186
2201
  * @default
@@ -2177,6 +2177,21 @@ export declare const translation: {
2177
2177
  title: string;
2178
2178
  };
2179
2179
  };
2180
+ /**
2181
+ * @description copy keys for Dynamic widget nav bar
2182
+ * @default
2183
+ *
2184
+ dyn_nav_bar: {
2185
+ wallets: 'Wallets',
2186
+ profile: 'Profile',
2187
+ settings: 'Settings',
2188
+ },
2189
+ **/
2190
+ dyn_nav_bar: {
2191
+ wallets: string;
2192
+ profile: string;
2193
+ settings: string;
2194
+ };
2180
2195
  /**
2181
2196
  * @description copy keys for Dynamic widget
2182
2197
  * @default
@@ -247,7 +247,7 @@ const translation = {
247
247
  label: 'Country',
248
248
  },
249
249
  email: {
250
- label: 'Email',
250
+ label: 'E-mail',
251
251
  validation: 'Email is not valid',
252
252
  },
253
253
  first_name: {
@@ -2177,6 +2177,21 @@ const translation = {
2177
2177
  title: 'Sign to confirm transfer',
2178
2178
  },
2179
2179
  },
2180
+ /**
2181
+ * @description copy keys for Dynamic widget nav bar
2182
+ * @default
2183
+ *
2184
+ dyn_nav_bar: {
2185
+ wallets: 'Wallets',
2186
+ profile: 'Profile',
2187
+ settings: 'Settings',
2188
+ },
2189
+ **/
2190
+ dyn_nav_bar: {
2191
+ wallets: 'Wallets',
2192
+ profile: 'Profile',
2193
+ settings: 'Settings',
2194
+ },
2180
2195
  /**
2181
2196
  * @description copy keys for Dynamic widget
2182
2197
  * @default
@@ -31,6 +31,7 @@ export { ReactComponent as CurrencyIcon } from './currency.svg';
31
31
  export { ReactComponent as DefaultWallet } from './default-wallet.svg';
32
32
  export { ReactComponent as DeleteEmbeddedHero } from './delete-embedded-hero.svg';
33
33
  export { ReactComponent as DomainIcon } from './domain.svg';
34
+ export { ReactComponent as DomainBlockedIcon } from './domain-blocked.svg';
34
35
  export { ReactComponent as DotsHorizontalIcon } from './dots-horizontal.svg';
35
36
  export { ReactComponent as DoubleArrowRightIcon } from './double-arrow-right.svg';
36
37
  export { ReactComponent as DownloadIcon } from './download.svg';
@@ -98,15 +98,22 @@ require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
98
98
  var useInternalDynamicContext = require('../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
99
99
 
100
100
  const useIsLoadingEmbeddedWallet = () => {
101
- const { user } = useInternalDynamicContext.useInternalDynamicContext();
101
+ const { user, authMode } = useInternalDynamicContext.useInternalDynamicContext();
102
102
  const projectSettings$1 = projectSettings.getProjectSettings();
103
103
  // we only want to show the loading state if the user has no wallets at all, and is creating a waas wallet
104
104
  // for example if they sign up with phantom wallet, we don't want to show the loading state
105
+ // always return false for connect-only mode, because verified credentials are not used in this mode
105
106
  const isLoadingEmbeddedWallet = React.useMemo(() => {
106
107
  var _a;
107
- return usingV3Wallets.usingV3Wallets(projectSettings$1) &&
108
- !((_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.find(({ format }) => format === 'blockchain'));
109
- }, [projectSettings$1, user]);
108
+ if (!usingV3Wallets.usingV3Wallets(projectSettings$1)) {
109
+ return false;
110
+ }
111
+ if (authMode === 'connect-only') {
112
+ return false;
113
+ }
114
+ // If user has NO blockchain credential, then we show loading state
115
+ return !((_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.some((credential) => credential.format === 'blockchain'));
116
+ }, [projectSettings$1, user, authMode]);
110
117
  return { isLoadingEmbeddedWallet };
111
118
  };
112
119
 
@@ -94,15 +94,22 @@ import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
94
94
  import { useInternalDynamicContext } from '../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
95
95
 
96
96
  const useIsLoadingEmbeddedWallet = () => {
97
- const { user } = useInternalDynamicContext();
97
+ const { user, authMode } = useInternalDynamicContext();
98
98
  const projectSettings = getProjectSettings();
99
99
  // we only want to show the loading state if the user has no wallets at all, and is creating a waas wallet
100
100
  // for example if they sign up with phantom wallet, we don't want to show the loading state
101
+ // always return false for connect-only mode, because verified credentials are not used in this mode
101
102
  const isLoadingEmbeddedWallet = useMemo(() => {
102
103
  var _a;
103
- return usingV3Wallets(projectSettings) &&
104
- !((_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.find(({ format }) => format === 'blockchain'));
105
- }, [projectSettings, user]);
104
+ if (!usingV3Wallets(projectSettings)) {
105
+ return false;
106
+ }
107
+ if (authMode === 'connect-only') {
108
+ return false;
109
+ }
110
+ // If user has NO blockchain credential, then we show loading state
111
+ return !((_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.some((credential) => credential.format === 'blockchain'));
112
+ }, [projectSettings, user, authMode]);
106
113
  return { isLoadingEmbeddedWallet };
107
114
  };
108
115
 
@@ -101,7 +101,7 @@ const BottomNavBar = ({ value, onChange, options }) => {
101
101
  const isActive = (_value) => _value === value;
102
102
  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', {
103
103
  'footer-options-switcher__tab--active': isActive(option.value),
104
- }), onClick: () => onChange(option.value), children: [option.icon, jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', className: 'footer-options-switcher__label', children: option.label })] }, option.value))) }));
104
+ }), onClick: () => onChange(option.value), children: [option.icon, jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', className: 'footer-options-switcher__label', copykey: option.copykey, children: option.label })] }, option.value))) }));
105
105
  };
106
106
 
107
107
  exports.BottomNavBar = BottomNavBar;
@@ -4,6 +4,7 @@ export type OptionsSwitcherOption = {
4
4
  value: string;
5
5
  label: string;
6
6
  icon: ReactNode;
7
+ copykey?: string;
7
8
  };
8
9
  export declare const BottomNavBar: FC<{
9
10
  value: DynamicWidgetViews;
@@ -97,7 +97,7 @@ const BottomNavBar = ({ value, onChange, options }) => {
97
97
  const isActive = (_value) => _value === value;
98
98
  return (jsx("div", { className: 'footer-options-switcher__container', "data-testid": 'OptionsSwitcher', children: options.map((option) => (jsxs("div", { className: classNames('footer-options-switcher__tab', {
99
99
  'footer-options-switcher__tab--active': isActive(option.value),
100
- }), onClick: () => onChange(option.value), children: [option.icon, jsx(Typography, { variant: 'body_small', className: 'footer-options-switcher__label', children: option.label })] }, option.value))) }));
100
+ }), onClick: () => onChange(option.value), children: [option.icon, jsx(Typography, { variant: 'body_small', className: 'footer-options-switcher__label', copykey: option.copykey, children: option.label })] }, option.value))) }));
101
101
  };
102
102
 
103
103
  export { BottomNavBar };