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

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 (90) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +13 -13
  5. package/src/index.cjs +2 -0
  6. package/src/index.d.ts +1 -0
  7. package/src/index.js +1 -0
  8. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +2 -2
  9. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +2 -2
  10. package/src/lib/components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.cjs +11 -0
  11. package/src/lib/components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.d.ts +2 -0
  12. package/src/lib/components/MfaDeviceTileSkeleton/MfaDeviceTileSkeleton.js +7 -0
  13. package/src/lib/components/MfaDeviceTileSkeleton/index.d.ts +1 -0
  14. package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +2 -1
  15. package/src/lib/components/NeedHelpSection/NeedHelpSection.js +2 -1
  16. package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs +2 -1
  17. package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js +2 -1
  18. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -1
  19. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -1
  20. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +0 -1
  21. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +0 -1
  22. package/src/lib/context/DynamicContext/DynamicContext.cjs +1 -2
  23. package/src/lib/context/DynamicContext/DynamicContext.js +1 -2
  24. package/src/lib/context/DynamicContext/types/IDynamicContext.d.ts +0 -1
  25. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +2 -1
  26. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +2 -1
  27. package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.cjs +1 -2
  28. package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.d.ts +1 -1
  29. package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.js +1 -2
  30. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +0 -6
  31. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +0 -6
  32. package/src/lib/locale/en/translation.cjs +2 -2
  33. package/src/lib/locale/en/translation.d.ts +1 -1
  34. package/src/lib/locale/en/translation.js +2 -2
  35. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +5 -4
  36. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +5 -4
  37. package/src/lib/shared/assets/profile-outline.cjs +5 -5
  38. package/src/lib/shared/assets/profile-outline.js +5 -5
  39. package/src/lib/shared/assets/settings-outline.cjs +5 -5
  40. package/src/lib/shared/assets/settings-outline.js +5 -5
  41. package/src/lib/shared/assets/wallet-outline-v2.cjs +5 -5
  42. package/src/lib/shared/assets/wallet-outline-v2.js +5 -5
  43. package/src/lib/styles/index.shadow.cjs +1 -1
  44. package/src/lib/styles/index.shadow.js +1 -1
  45. package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +1 -4
  46. package/src/lib/utils/functions/createUserProfile/createUserProfile.js +1 -4
  47. package/src/lib/utils/functions/index.d.ts +1 -0
  48. package/src/lib/utils/functions/isAuthenticatedWithAWallet/index.d.ts +1 -0
  49. package/src/lib/utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.cjs +14 -0
  50. package/src/lib/utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.d.ts +2 -0
  51. package/src/lib/utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.js +10 -0
  52. package/src/lib/utils/functions/isMultiAssetSupportedNetwork/isMultiAssetSupportedNetwork.d.ts +1 -1
  53. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +5 -4
  54. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +5 -4
  55. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +2 -1
  56. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +2 -1
  57. package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +2 -1
  58. package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +2 -1
  59. package/src/lib/utils/hooks/useTransferWallet/index.d.ts +1 -0
  60. package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -1
  61. package/src/lib/views/EmailVerification/EmailVerification.js +2 -1
  62. package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.cjs +20 -16
  63. package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.js +20 -16
  64. package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.d.ts +1 -2
  65. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.d.ts +9 -0
  66. package/src/lib/views/viewToComponentMap.d.ts +1 -1
  67. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +3 -2
  68. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +3 -2
  69. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.cjs +85 -1
  70. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.d.ts +0 -1
  71. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js +85 -1
  72. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -1
  73. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -1
  74. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +7 -4
  75. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.d.ts +0 -2
  76. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +8 -4
  77. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.cjs +4 -3
  78. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.d.ts +1 -1
  79. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.js +4 -3
  80. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.cjs +23 -0
  81. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.d.ts +4 -0
  82. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.js +17 -0
  83. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +1 -2
  84. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +1 -2
  85. package/src/lib/shared/assets/profile.cjs +0 -65
  86. package/src/lib/shared/assets/profile.js +0 -41
  87. package/src/lib/shared/assets/settings.cjs +0 -54
  88. package/src/lib/shared/assets/settings.js +0 -30
  89. package/src/lib/shared/assets/wallet.cjs +0 -52
  90. package/src/lib/shared/assets/wallet.js +0 -28
package/CHANGELOG.md CHANGED
@@ -1,4 +1,34 @@
1
1
 
2
+ ## [3.0.0-alpha.43](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.42...v3.0.0-alpha.43) (2024-08-15)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * removes walletConnector from dynamic context (#6579)
8
+ * removed deprecated props from user profile (#6589)
9
+
10
+ ### Features
11
+
12
+ * optimize solana embedded transactions ([#6582](https://github.com/dynamic-labs/DynamicAuth/issues/6582)) ([419aff9](https://github.com/dynamic-labs/DynamicAuth/commit/419aff96d312892d7db520e94ecc6956b8de771d))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * check if wallet is connected using normalized addresses ([#6594](https://github.com/dynamic-labs/DynamicAuth/issues/6594)) ([44aabae](https://github.com/dynamic-labs/DynamicAuth/commit/44aabae8ee72261bf0f7e308ed4adf0f42760ed2))
18
+ * minor sdk ui updates ([#6590](https://github.com/dynamic-labs/DynamicAuth/issues/6590)) ([8619e40](https://github.com/dynamic-labs/DynamicAuth/commit/8619e40e1afff8d68357138f3b5b9b89989140fd))
19
+
20
+
21
+ * removed deprecated props from user profile ([#6589](https://github.com/dynamic-labs/DynamicAuth/issues/6589)) ([b621da8](https://github.com/dynamic-labs/DynamicAuth/commit/b621da8a0703eb8228a5b10131af2717f314fd2e))
22
+ * removes walletConnector from dynamic context ([#6579](https://github.com/dynamic-labs/DynamicAuth/issues/6579)) ([51d69fe](https://github.com/dynamic-labs/DynamicAuth/commit/51d69feebab71158ad2aa69f11001623a0aaa80a))
23
+
24
+ ## [3.0.0-alpha.42](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.41...v3.0.0-alpha.42) (2024-08-14)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * isEmbeddedWallet condition in AuthProviderIcon ([#6581](https://github.com/dynamic-labs/DynamicAuth/issues/6581)) ([afe33ab](https://github.com/dynamic-labs/DynamicAuth/commit/afe33aba1cc8abefd0566bf4e9c0a4f199d64ef7))
30
+ * update text on MFA backup codes acknowledgement ([#6559](https://github.com/dynamic-labs/DynamicAuth/issues/6559)) ([98b5475](https://github.com/dynamic-labs/DynamicAuth/commit/98b5475df73039061d593318cb26140075de69e1))
31
+
2
32
  ## [3.0.0-alpha.41](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.40...v3.0.0-alpha.41) (2024-08-13)
3
33
 
4
34
  ## [3.0.0-alpha.40](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.39...v3.0.0-alpha.40) (2024-08-13)
package/package.cjs CHANGED
@@ -3,9 +3,9 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "3.0.0-alpha.41";
6
+ var version = "3.0.0-alpha.43";
7
7
  var dependencies = {
8
- "@dynamic-labs/sdk-api-core": "0.0.510",
8
+ "@dynamic-labs/sdk-api-core": "0.0.516",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
10
10
  "country-list": "2.3.0",
11
11
  formik: "2.2.9",
package/package.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client'
2
- var version = "3.0.0-alpha.41";
2
+ var version = "3.0.0-alpha.43";
3
3
  var dependencies = {
4
- "@dynamic-labs/sdk-api-core": "0.0.510",
4
+ "@dynamic-labs/sdk-api-core": "0.0.516",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
6
6
  "country-list": "2.3.0",
7
7
  formik: "2.2.9",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "3.0.0-alpha.41",
3
+ "version": "3.0.0-alpha.43",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
7
7
  "directory": "packages/sdk-react-core"
8
8
  },
9
9
  "dependencies": {
10
- "@dynamic-labs/sdk-api-core": "0.0.510",
10
+ "@dynamic-labs/sdk-api-core": "0.0.516",
11
11
  "@hcaptcha/react-hcaptcha": "1.4.4",
12
12
  "country-list": "2.3.0",
13
13
  "formik": "2.2.9",
@@ -17,17 +17,17 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/iconic": "3.0.0-alpha.41",
21
- "@dynamic-labs/logger": "3.0.0-alpha.41",
22
- "@dynamic-labs/message-transport": "3.0.0-alpha.41",
23
- "@dynamic-labs/multi-wallet": "3.0.0-alpha.41",
24
- "@dynamic-labs/rpc-providers": "3.0.0-alpha.41",
25
- "@dynamic-labs/store": "3.0.0-alpha.41",
26
- "@dynamic-labs/types": "3.0.0-alpha.41",
27
- "@dynamic-labs/utils": "3.0.0-alpha.41",
28
- "@dynamic-labs/viem-utils": "3.0.0-alpha.41",
29
- "@dynamic-labs/wallet-book": "3.0.0-alpha.41",
30
- "@dynamic-labs/wallet-connector-core": "3.0.0-alpha.41",
20
+ "@dynamic-labs/iconic": "3.0.0-alpha.43",
21
+ "@dynamic-labs/logger": "3.0.0-alpha.43",
22
+ "@dynamic-labs/message-transport": "3.0.0-alpha.43",
23
+ "@dynamic-labs/multi-wallet": "3.0.0-alpha.43",
24
+ "@dynamic-labs/rpc-providers": "3.0.0-alpha.43",
25
+ "@dynamic-labs/store": "3.0.0-alpha.43",
26
+ "@dynamic-labs/types": "3.0.0-alpha.43",
27
+ "@dynamic-labs/utils": "3.0.0-alpha.43",
28
+ "@dynamic-labs/viem-utils": "3.0.0-alpha.43",
29
+ "@dynamic-labs/wallet-book": "3.0.0-alpha.43",
30
+ "@dynamic-labs/wallet-connector-core": "3.0.0-alpha.43",
31
31
  "eventemitter3": "5.0.1"
32
32
  },
33
33
  "devDependencies": {
package/src/index.cjs CHANGED
@@ -65,6 +65,7 @@ require('@dynamic-labs/multi-wallet');
65
65
  require('react-international-phone');
66
66
  var mergeNetworks = require('./lib/utils/functions/mergeNetworks/mergeNetworks.cjs');
67
67
  require('@dynamic-labs/store');
68
+ var isAuthenticatedWithAWallet = require('./lib/utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.cjs');
68
69
  require('./lib/locale/locale.cjs');
69
70
  var useEmbeddedWallet = require('./lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs');
70
71
  require('./lib/context/WalletContext/WalletContext.cjs');
@@ -206,6 +207,7 @@ exports.SpinnerIcon = spinner.ReactComponent;
206
207
  exports.ArrowIcon = stroke.ReactComponent;
207
208
  exports.apiClient = api.sdkApi;
208
209
  exports.mergeNetworks = mergeNetworks.mergeNetworks;
210
+ exports.isAuthenticatedWithAWallet = isAuthenticatedWithAWallet.isAuthenticatedWithAWallet;
209
211
  exports.useEmbeddedWallet = useEmbeddedWallet.useEmbeddedWallet;
210
212
  exports.usePasskeyRecovery = usePasskeyRecovery.usePasskeyRecovery;
211
213
  Object.defineProperty(exports, 'EmbeddedWalletVersion', {
package/src/index.d.ts CHANGED
@@ -122,3 +122,4 @@ export { useSwitchNetwork } from './lib/utils/hooks/useSwitchNetwork';
122
122
  export { useReinitialize } from './lib/context/ReinitializeContext';
123
123
  export { useExternalAuth } from './lib/utils/hooks/useExternalAuth';
124
124
  export { sdkApi as apiClient } from './lib/data/api/api';
125
+ export { isAuthenticatedWithAWallet } from './lib/utils/functions/isAuthenticatedWithAWallet';
package/src/index.js CHANGED
@@ -61,6 +61,7 @@ import '@dynamic-labs/multi-wallet';
61
61
  import 'react-international-phone';
62
62
  export { mergeNetworks } from './lib/utils/functions/mergeNetworks/mergeNetworks.js';
63
63
  import '@dynamic-labs/store';
64
+ export { isAuthenticatedWithAWallet } from './lib/utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.js';
64
65
  import './lib/locale/locale.js';
65
66
  export { useEmbeddedWallet } from './lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js';
66
67
  import './lib/context/WalletContext/WalletContext.js';
@@ -120,7 +120,7 @@ const getMagicEmailOrSocialIcon = ({ findSocialIcon, wallet, user, }) => {
120
120
  return null;
121
121
  };
122
122
  const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
123
- var _a, _b, _c;
123
+ var _a, _b, _c, _d;
124
124
  const { primaryWallet, selectedWalletConnector, user, userWithMissingInfo } = useInternalDynamicContext.useInternalDynamicContext();
125
125
  const { deniedOauthProvider, deniedAddress } = AccessDeniedContext.useAccessDeniedContext();
126
126
  const { isLoadingEmbeddedWallet } = WalletContext.useWalletContext();
@@ -153,7 +153,7 @@ const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
153
153
  });
154
154
  const isEmbeddedWallet = ((_b = (_a = walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.startsWith('turnkey')) ||
155
155
  (((_c = walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector) === null || _c === void 0 ? void 0 : _c.key) === 'zerodev' &&
156
- (walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector).getEOAConnector());
156
+ ((_d = (walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector).getEOAConnector()) === null || _d === void 0 ? void 0 : _d.isEmbeddedWallet));
157
157
  if (isEmbeddedWallet && MagicEmailOrSocialIcon) {
158
158
  const chain = walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.chain;
159
159
  const chainEnum = values.VerifiedCredentialNameToChainEnum[chain];
@@ -116,7 +116,7 @@ const getMagicEmailOrSocialIcon = ({ findSocialIcon, wallet, user, }) => {
116
116
  return null;
117
117
  };
118
118
  const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
119
- var _a, _b, _c;
119
+ var _a, _b, _c, _d;
120
120
  const { primaryWallet, selectedWalletConnector, user, userWithMissingInfo } = useInternalDynamicContext();
121
121
  const { deniedOauthProvider, deniedAddress } = useAccessDeniedContext();
122
122
  const { isLoadingEmbeddedWallet } = useWalletContext();
@@ -149,7 +149,7 @@ const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
149
149
  });
150
150
  const isEmbeddedWallet = ((_b = (_a = walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.startsWith('turnkey')) ||
151
151
  (((_c = walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector) === null || _c === void 0 ? void 0 : _c.key) === 'zerodev' &&
152
- (walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector).getEOAConnector());
152
+ ((_d = (walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector).getEOAConnector()) === null || _d === void 0 ? void 0 : _d.isEmbeddedWallet));
153
153
  if (isEmbeddedWallet && MagicEmailOrSocialIcon) {
154
154
  const chain = walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.chain;
155
155
  const chainEnum = VerifiedCredentialNameToChainEnum[chain];
@@ -0,0 +1,11 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var Skeleton = require('../Skeleton/Skeleton.cjs');
8
+
9
+ const MfaDeviceTileSkeleton = () => (jsxRuntime.jsx("div", { className: 'mfa-device-skeleton', "data-testid": 'mfa-device-loading', children: jsxRuntime.jsxs("div", { className: 'mfa-device-skeleton__details', children: [jsxRuntime.jsx(Skeleton.Skeleton, {}), jsxRuntime.jsx(Skeleton.Skeleton, {})] }) }));
10
+
11
+ exports.MfaDeviceTileSkeleton = MfaDeviceTileSkeleton;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const MfaDeviceTileSkeleton: FC;
@@ -0,0 +1,7 @@
1
+ 'use client'
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { Skeleton } from '../Skeleton/Skeleton.js';
4
+
5
+ const MfaDeviceTileSkeleton = () => (jsx("div", { className: 'mfa-device-skeleton', "data-testid": 'mfa-device-loading', children: jsxs("div", { className: 'mfa-device-skeleton__details', children: [jsx(Skeleton, {}), jsx(Skeleton, {})] }) }));
6
+
7
+ export { MfaDeviceTileSkeleton };
@@ -0,0 +1 @@
1
+ export { MfaDeviceTileSkeleton } from './MfaDeviceTileSkeleton';
@@ -95,7 +95,7 @@ var useInternalDynamicContext = require('../../context/DynamicContext/useDynamic
95
95
 
96
96
  const NeedHelpSection = ({ isRecoveryFlow = false }) => {
97
97
  var _a, _b, _c, _d, _e, _f;
98
- const { projectSettings, walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
98
+ const { projectSettings, primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
99
99
  const { t } = reactI18next.useTranslation();
100
100
  const { initPasskeyRecoveryProcess } = usePasskeyRecovery.usePasskeyRecovery();
101
101
  const supportEmail = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) === null || _a === void 0 ? void 0 : _a.supportEmail;
@@ -105,6 +105,7 @@ const NeedHelpSection = ({ isRecoveryFlow = false }) => {
105
105
  const isRecoveryEnabled = !isRecoveryFlow &&
106
106
  ((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) === null || _d === void 0 ? void 0 : _d.find((p) => p.provider === sdkApiCore.ProviderEnum.Turnkey && p.enabledAt)) &&
107
107
  Boolean((_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.emailRecoveryEnabled);
108
+ const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
108
109
  const isSessionKeyCompatible = walletConnectorCore.isSessionKeyCompatibleWalletConnector(walletConnector) ||
109
110
  ((walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key) === 'zerodev' &&
110
111
  walletConnectorCore.isSessionKeyCompatibleWalletConnector(walletConnector.getEOAConnector()));
@@ -91,7 +91,7 @@ import { useInternalDynamicContext } from '../../context/DynamicContext/useDynam
91
91
 
92
92
  const NeedHelpSection = ({ isRecoveryFlow = false }) => {
93
93
  var _a, _b, _c, _d, _e, _f;
94
- const { projectSettings, walletConnector } = useInternalDynamicContext();
94
+ const { projectSettings, primaryWallet } = useInternalDynamicContext();
95
95
  const { t } = useTranslation();
96
96
  const { initPasskeyRecoveryProcess } = usePasskeyRecovery();
97
97
  const supportEmail = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) === null || _a === void 0 ? void 0 : _a.supportEmail;
@@ -101,6 +101,7 @@ const NeedHelpSection = ({ isRecoveryFlow = false }) => {
101
101
  const isRecoveryEnabled = !isRecoveryFlow &&
102
102
  ((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) === null || _d === void 0 ? void 0 : _d.find((p) => p.provider === ProviderEnum.Turnkey && p.enabledAt)) &&
103
103
  Boolean((_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.emailRecoveryEnabled);
104
+ const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
104
105
  const isSessionKeyCompatible = isSessionKeyCompatibleWalletConnector(walletConnector) ||
105
106
  ((walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key) === 'zerodev' &&
106
107
  isSessionKeyCompatibleWalletConnector(walletConnector.getEOAConnector()));
@@ -95,7 +95,8 @@ require('../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
95
95
 
96
96
  const SecureEmbeddedWalletCard = ({ className }) => {
97
97
  const { t } = reactI18next.useTranslation();
98
- const { walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
98
+ const { primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
99
+ const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
99
100
  const { initPasskeyRecoveryProcess } = usePasskeyRecovery.usePasskeyRecovery();
100
101
  const { showSecureAccountBanner, setShowSecureAccountBanner } = PasskeyContext.usePasskeyContext();
101
102
  const isSessionKeyCompatible = walletConnectorCore.isSessionKeyCompatibleWalletConnector(walletConnector) ||
@@ -91,7 +91,8 @@ import '../../context/ReinitializeContext/ReinitializeContextProvider.js';
91
91
 
92
92
  const SecureEmbeddedWalletCard = ({ className }) => {
93
93
  const { t } = useTranslation();
94
- const { walletConnector } = useInternalDynamicContext();
94
+ const { primaryWallet } = useInternalDynamicContext();
95
+ const walletConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
95
96
  const { initPasskeyRecoveryProcess } = usePasskeyRecovery();
96
97
  const { showSecureAccountBanner, setShowSecureAccountBanner } = usePasskeyContext();
97
98
  const isSessionKeyCompatible = isSessionKeyCompatibleWalletConnector(walletConnector) ||
@@ -89,6 +89,6 @@ require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs
89
89
  require('../../../InlineWidget/InlineWidget.cjs');
90
90
  require('qrcode');
91
91
 
92
- const UserProfileSection = ({ title, children, action, }) => (jsxRuntime.jsxs("div", { className: 'user-profile-section', children: [jsxRuntime.jsx("div", { className: 'user-profile-section__header', children: title && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title', children: title }), action && (jsxRuntime.jsx("div", { className: 'user-profile-section__action', children: action }))] })) }), children] }));
92
+ const UserProfileSection = ({ title, children, action, }) => (jsxRuntime.jsxs("div", { className: 'user-profile-section', children: [jsxRuntime.jsx("div", { className: 'user-profile-section__header', children: title && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', weight: 'regular', variant: 'body_normal', className: 'user-profile-section__title', children: title }), action && (jsxRuntime.jsx("div", { className: 'user-profile-section__action', children: action }))] })) }), children] }));
93
93
 
94
94
  exports.UserProfileSection = UserProfileSection;
@@ -85,6 +85,6 @@ import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
85
85
  import '../../../InlineWidget/InlineWidget.js';
86
86
  import 'qrcode';
87
87
 
88
- const UserProfileSection = ({ title, children, action, }) => (jsxs("div", { className: 'user-profile-section', children: [jsx("div", { className: 'user-profile-section__header', children: title && (jsxs(Fragment, { children: [jsx(Typography, { as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title', children: title }), action && (jsx("div", { className: 'user-profile-section__action', children: action }))] })) }), children] }));
88
+ const UserProfileSection = ({ title, children, action, }) => (jsxs("div", { className: 'user-profile-section', children: [jsx("div", { className: 'user-profile-section__header', children: title && (jsxs(Fragment, { children: [jsx(Typography, { color: 'secondary', weight: 'regular', variant: 'body_normal', className: 'user-profile-section__title', children: title }), action && (jsx("div", { className: 'user-profile-section__action', children: action }))] })) }), children] }));
89
89
 
90
90
  export { UserProfileSection };
@@ -114,7 +114,6 @@ const UserProfileSocialAccount = ({ provider, }) => {
114
114
  : linkSocialAccount(provider), loading: isProcessing, dataTestId: `social-account-${isProviderLinked ? 'disconnect' : 'connect'}-button`, typographyProps: {
115
115
  color: 'secondary',
116
116
  variant: 'button_tertiary',
117
- // weight: 'medium',
118
117
  }, startSlot:
119
118
  // eslint-disable-next-line react/jsx-wrap-multilines
120
119
  jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', size: 'small', children: isProviderLinked ? jsxRuntime.jsx(unlink.ReactComponent, {}) : jsxRuntime.jsx(add.ReactComponent, {}) }), children: isProviderLinked ? null : 'Connect' }));
@@ -110,7 +110,6 @@ const UserProfileSocialAccount = ({ provider, }) => {
110
110
  : linkSocialAccount(provider), loading: isProcessing, dataTestId: `social-account-${isProviderLinked ? 'disconnect' : 'connect'}-button`, typographyProps: {
111
111
  color: 'secondary',
112
112
  variant: 'button_tertiary',
113
- // weight: 'medium',
114
113
  }, startSlot:
115
114
  // eslint-disable-next-line react/jsx-wrap-multilines
116
115
  jsx(Icon, { color: 'text-tertiary', size: 'small', children: isProviderLinked ? jsx(SvgUnlink, {}) : jsx(SvgAdd, {}) }), children: isProviderLinked ? null : 'Connect' }));
@@ -451,7 +451,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
451
451
  ]);
452
452
  const { passkeySuccessPopup, setPasskeySuccessPopup } = usePasskeySuccessPopup.usePasskeySuccessPopup();
453
453
  const value = React.useMemo(() => {
454
- var _a, _b;
454
+ var _a;
455
455
  return ({
456
456
  accessDeniedButton,
457
457
  accessDeniedMessagePrimary,
@@ -571,7 +571,6 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
571
571
  toolkitEnabled,
572
572
  user,
573
573
  userWithMissingInfo,
574
- walletConnector: (_b = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) !== null && _b !== void 0 ? _b : null,
575
574
  walletConnectorOptions,
576
575
  walletUiUtils,
577
576
  walletsFilter,
@@ -447,7 +447,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
447
447
  ]);
448
448
  const { passkeySuccessPopup, setPasskeySuccessPopup } = usePasskeySuccessPopup();
449
449
  const value = useMemo(() => {
450
- var _a, _b;
450
+ var _a;
451
451
  return ({
452
452
  accessDeniedButton,
453
453
  accessDeniedMessagePrimary,
@@ -567,7 +567,6 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
567
567
  toolkitEnabled,
568
568
  user,
569
569
  userWithMissingInfo,
570
- walletConnector: (_b = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) !== null && _b !== void 0 ? _b : null,
571
570
  walletConnectorOptions,
572
571
  walletUiUtils,
573
572
  walletsFilter,
@@ -162,7 +162,6 @@ export interface IDynamicContext {
162
162
  toolkitEnabled?: boolean;
163
163
  user: UserProfile | undefined;
164
164
  userWithMissingInfo: UserProfile | undefined;
165
- walletConnector: WalletConnector | null;
166
165
  walletConnectorOptions: WalletOption[];
167
166
  walletUiUtils: WalletUiUtils<WalletConnector>;
168
167
  walletsFilter?: (options: WalletOption[]) => WalletOption[];
@@ -17,6 +17,7 @@ require('../../../shared/utils/classes/storage/localStorage.cjs');
17
17
  require('../../../shared/utils/classes/storage/sessionStorage.cjs');
18
18
  require('@dynamic-labs/utils');
19
19
  require('../../../shared/consts/index.cjs');
20
+ var isAuthenticatedWithAWallet = require('../../../utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.cjs');
20
21
 
21
22
  const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onUserProfileUpdate }, handleLogOut, primaryWallet, user, isAuthenticated, setHasLoggedOut, }) => {
22
23
  const [callbackQueue, setCallbackQueue] = React.useState([]);
@@ -62,7 +63,7 @@ const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onUserProfileUpdate
62
63
  // for the primary wallet state to be set
63
64
  // if user logged in with email without embedded wallet, then
64
65
  // there is no wallet so we can go ahead and run the callback
65
- if (user.isAuthenticatedWithAWallet && !primaryWallet) {
66
+ if (isAuthenticatedWithAWallet.isAuthenticatedWithAWallet(user) && !primaryWallet) {
66
67
  return;
67
68
  }
68
69
  handleNextCallback(callbackQueue[0], user);
@@ -13,6 +13,7 @@ import '../../../shared/utils/classes/storage/localStorage.js';
13
13
  import '../../../shared/utils/classes/storage/sessionStorage.js';
14
14
  import '@dynamic-labs/utils';
15
15
  import '../../../shared/consts/index.js';
16
+ import { isAuthenticatedWithAWallet } from '../../../utils/functions/isAuthenticatedWithAWallet/isAuthenticatedWithAWallet.js';
16
17
 
17
18
  const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onUserProfileUpdate }, handleLogOut, primaryWallet, user, isAuthenticated, setHasLoggedOut, }) => {
18
19
  const [callbackQueue, setCallbackQueue] = useState([]);
@@ -58,7 +59,7 @@ const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onUserProfileUpdate
58
59
  // for the primary wallet state to be set
59
60
  // if user logged in with email without embedded wallet, then
60
61
  // there is no wallet so we can go ahead and run the callback
61
- if (user.isAuthenticatedWithAWallet && !primaryWallet) {
62
+ if (isAuthenticatedWithAWallet(user) && !primaryWallet) {
62
63
  return;
63
64
  }
64
65
  handleNextCallback(callbackQueue[0], user);
@@ -13,7 +13,7 @@ const useDynamicContext = () => {
13
13
  if (context === undefined) {
14
14
  throw new Error('useDynamicContext must be used within a DynamicContextProvider');
15
15
  }
16
- const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, userWithMissingInfo, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, minAuthToken, selectedTabIndex, setSelectedTabIndex, } = context;
16
+ const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, userWithMissingInfo, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, minAuthToken, selectedTabIndex, setSelectedTabIndex, } = context;
17
17
  const { setAuthMode } = useOverrides.useOverrides(context);
18
18
  return {
19
19
  accountSwitchState,
@@ -57,7 +57,6 @@ const useDynamicContext = () => {
57
57
  showQrcodeModal,
58
58
  user,
59
59
  userWithMissingInfo,
60
- walletConnector,
61
60
  walletConnectorOptions,
62
61
  };
63
62
  };
@@ -1,6 +1,6 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { IDynamicContext } from '../types';
3
- export type UseDynamicContext = Pick<IDynamicContext, 'accountSwitchState' | 'authMode' | 'authToken' | 'awaitingSignatureState' | 'getNameService' | 'handleLogOut' | 'handleUnlinkWallet' | 'loadingNetwork' | 'locale' | 'loginWithEmail' | 'multiWalletWidgetState' | 'network' | 'networkConfigurations' | 'primaryWallet' | 'qrcodeUri' | 'sdkHasLoaded' | 'setLogInWithEmail' | 'setMultiWalletWidgetState' | 'setShowDynamicUserProfile' | 'setShowQrcodeModal' | 'shadowDOMEnabled' | 'showAuthFlow' | 'showQrcodeModal' | 'user' | 'userWithMissingInfo' | 'walletConnector' | 'walletConnectorOptions' | 'bridgeChains' | 'bridgeChainsToConnect' | 'setShowBridgeWidget' | 'sendWagmiSettings' | 'showDynamicUserProfile' | 'setAuthMode' | 'minAuthToken' | 'selectedTabIndex' | 'setSelectedTabIndex'> & {
3
+ export type UseDynamicContext = Pick<IDynamicContext, 'accountSwitchState' | 'authMode' | 'authToken' | 'awaitingSignatureState' | 'getNameService' | 'handleLogOut' | 'handleUnlinkWallet' | 'loadingNetwork' | 'locale' | 'loginWithEmail' | 'multiWalletWidgetState' | 'network' | 'networkConfigurations' | 'primaryWallet' | 'qrcodeUri' | 'sdkHasLoaded' | 'setLogInWithEmail' | 'setMultiWalletWidgetState' | 'setShowDynamicUserProfile' | 'setShowQrcodeModal' | 'shadowDOMEnabled' | 'showAuthFlow' | 'showQrcodeModal' | 'user' | 'userWithMissingInfo' | 'walletConnectorOptions' | 'bridgeChains' | 'bridgeChainsToConnect' | 'setShowBridgeWidget' | 'sendWagmiSettings' | 'showDynamicUserProfile' | 'setAuthMode' | 'minAuthToken' | 'selectedTabIndex' | 'setSelectedTabIndex'> & {
4
4
  setShowAuthFlow: Dispatch<SetStateAction<boolean>>;
5
5
  };
6
6
  export declare const useDynamicContext: () => UseDynamicContext;
@@ -9,7 +9,7 @@ const useDynamicContext = () => {
9
9
  if (context === undefined) {
10
10
  throw new Error('useDynamicContext must be used within a DynamicContextProvider');
11
11
  }
12
- const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, userWithMissingInfo, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, minAuthToken, selectedTabIndex, setSelectedTabIndex, } = context;
12
+ const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, userWithMissingInfo, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, minAuthToken, selectedTabIndex, setSelectedTabIndex, } = context;
13
13
  const { setAuthMode } = useOverrides(context);
14
14
  return {
15
15
  accountSwitchState,
@@ -53,7 +53,6 @@ const useDynamicContext = () => {
53
53
  showQrcodeModal,
54
54
  user,
55
55
  userWithMissingInfo,
56
- walletConnector,
57
56
  walletConnectorOptions,
58
57
  };
59
58
  };
@@ -12,11 +12,8 @@ require('@dynamic-labs/iconic');
12
12
  require('@dynamic-labs/wallet-connector-core');
13
13
  require('../../context/ViewContext/ViewContext.cjs');
14
14
  var profileOutline = require('../../shared/assets/profile-outline.cjs');
15
- var profile = require('../../shared/assets/profile.cjs');
16
- var wallet = require('../../shared/assets/wallet.cjs');
17
15
  var walletOutlineV2 = require('../../shared/assets/wallet-outline-v2.cjs');
18
16
  var settingsOutline = require('../../shared/assets/settings-outline.cjs');
19
- var settings = require('../../shared/assets/settings.cjs');
20
17
  require('@dynamic-labs/wallet-book');
21
18
  require('../../utils/constants/colors.cjs');
22
19
  require('../../utils/constants/values.cjs');
@@ -116,7 +113,6 @@ const DynamicUserProfileLayout = ({ variant, className, style, }) => {
116
113
  options.push({
117
114
  icon: jsxRuntime.jsx(walletOutlineV2.ReactComponent, {}),
118
115
  label: 'Wallets',
119
- selectedIcon: jsxRuntime.jsx(wallet.ReactComponent, {}),
120
116
  value: 'wallets',
121
117
  });
122
118
  }
@@ -124,14 +120,12 @@ const DynamicUserProfileLayout = ({ variant, className, style, }) => {
124
120
  options.push({
125
121
  icon: jsxRuntime.jsx(profileOutline.ReactComponent, {}),
126
122
  label: 'Profile',
127
- selectedIcon: jsxRuntime.jsx(profile.ReactComponent, {}),
128
123
  value: 'profile',
129
124
  });
130
125
  }
131
126
  options.push({
132
127
  icon: jsxRuntime.jsx(settingsOutline.ReactComponent, {}),
133
128
  label: 'Settings',
134
- selectedIcon: jsxRuntime.jsx(settings.ReactComponent, {}),
135
129
  value: 'settings',
136
130
  });
137
131
  return options;
@@ -8,11 +8,8 @@ import '@dynamic-labs/iconic';
8
8
  import '@dynamic-labs/wallet-connector-core';
9
9
  import '../../context/ViewContext/ViewContext.js';
10
10
  import { ReactComponent as SvgProfileOutline } from '../../shared/assets/profile-outline.js';
11
- import { ReactComponent as SvgProfile } from '../../shared/assets/profile.js';
12
- import { ReactComponent as SvgWallet } from '../../shared/assets/wallet.js';
13
11
  import { ReactComponent as SvgWalletOutlineV2 } from '../../shared/assets/wallet-outline-v2.js';
14
12
  import { ReactComponent as SvgSettingsOutline } from '../../shared/assets/settings-outline.js';
15
- import { ReactComponent as SvgSettings } from '../../shared/assets/settings.js';
16
13
  import '@dynamic-labs/wallet-book';
17
14
  import '../../utils/constants/colors.js';
18
15
  import '../../utils/constants/values.js';
@@ -112,7 +109,6 @@ const DynamicUserProfileLayout = ({ variant, className, style, }) => {
112
109
  options.push({
113
110
  icon: jsx(SvgWalletOutlineV2, {}),
114
111
  label: 'Wallets',
115
- selectedIcon: jsx(SvgWallet, {}),
116
112
  value: 'wallets',
117
113
  });
118
114
  }
@@ -120,14 +116,12 @@ const DynamicUserProfileLayout = ({ variant, className, style, }) => {
120
116
  options.push({
121
117
  icon: jsx(SvgProfileOutline, {}),
122
118
  label: 'Profile',
123
- selectedIcon: jsx(SvgProfile, {}),
124
119
  value: 'profile',
125
120
  });
126
121
  }
127
122
  options.push({
128
123
  icon: jsx(SvgSettingsOutline, {}),
129
124
  label: 'Settings',
130
- selectedIcon: jsx(SvgSettings, {}),
131
125
  value: 'settings',
132
126
  });
133
127
  return options;
@@ -911,7 +911,7 @@ const translation = {
911
911
  warning: 'You won’t be able to see these again',
912
912
  copy_all: 'Copy all',
913
913
  download: 'Download',
914
- checkbox: 'I have safely stored a copy of my password',
914
+ checkbox: 'I have safely stored a copy of my backup codes',
915
915
  complete: 'Complete',
916
916
  },
917
917
  otp_verification_view: {
@@ -963,7 +963,7 @@ const translation = {
963
963
  warning: 'You won’t be able to see these again',
964
964
  copy_all: 'Copy all',
965
965
  download: 'Download',
966
- checkbox: 'I have safely stored a copy of my password',
966
+ checkbox: "I've safely stored a copy of my backup codes",
967
967
  complete: 'Complete',
968
968
  },
969
969
  otp_verification_view: {
@@ -907,7 +907,7 @@ export declare const translation: {
907
907
  warning: 'You won’t be able to see these again',
908
908
  copy_all: 'Copy all',
909
909
  download: 'Download',
910
- checkbox: 'I have safely stored a copy of my password',
910
+ checkbox: 'I have safely stored a copy of my backup codes',
911
911
  complete: 'Complete',
912
912
  },
913
913
  otp_verification_view: {
@@ -907,7 +907,7 @@ const translation = {
907
907
  warning: 'You won’t be able to see these again',
908
908
  copy_all: 'Copy all',
909
909
  download: 'Download',
910
- checkbox: 'I have safely stored a copy of my password',
910
+ checkbox: 'I have safely stored a copy of my backup codes',
911
911
  complete: 'Complete',
912
912
  },
913
913
  otp_verification_view: {
@@ -959,7 +959,7 @@ const translation = {
959
959
  warning: 'You won’t be able to see these again',
960
960
  copy_all: 'Copy all',
961
961
  download: 'Download',
962
- checkbox: 'I have safely stored a copy of my password',
962
+ checkbox: "I've safely stored a copy of my backup codes",
963
963
  complete: 'Complete',
964
964
  },
965
965
  otp_verification_view: {
@@ -118,10 +118,11 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
118
118
  const [show, setShow] = React.useState(true);
119
119
  const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery.usePasskeyRecovery();
120
120
  const { isTurnkeyWallet } = useIsTurnkeyWallet.useIsTurnkeyWallet();
121
- const { setShowAuthFlow, walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
121
+ const { setShowAuthFlow, primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
122
122
  const { setView } = ViewContext.useViewContext();
123
123
  const { userNeedsCrossDomainPasskey } = PasskeyContext.usePasskeyContext();
124
124
  const { t } = reactI18next.useTranslation();
125
+ const primaryConnector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
125
126
  const handleOnReject = React.useCallback(() => {
126
127
  didConfirmRef.current = false;
127
128
  setShow(false);
@@ -157,15 +158,15 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
157
158
  }, [signedMessage, onSignMessage, onReject, signMessageError]);
158
159
  const handleMessageSign = (signWithoutModal) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
159
160
  if ((yield shouldInitRecovery()) &&
160
- walletConnector &&
161
- !usingSessionKeys.usingSessionKey(walletConnector)) {
161
+ primaryConnector &&
162
+ !usingSessionKeys.usingSessionKey(primaryConnector)) {
162
163
  yield initPasskeyRecoveryProcess('email', 'signMessage');
163
164
  }
164
165
  if (signWithoutModal === true) {
165
166
  onSignMessage('callHandlerOutsideModal');
166
167
  return;
167
168
  }
168
- if (walletConnector && usingSessionKeys.usingSessionKey(walletConnector)) {
169
+ if (primaryConnector && usingSessionKeys.usingSessionKey(primaryConnector)) {
169
170
  confirm();
170
171
  return;
171
172
  }