@dynamic-labs/sdk-react-core 4.57.2 → 4.58.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 (135) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +12 -12
  5. package/src/index.cjs +2 -0
  6. package/src/index.d.ts +1 -1
  7. package/src/index.js +1 -0
  8. package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.cjs +127 -0
  9. package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.d.ts +1 -1
  10. package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.js +123 -0
  11. package/src/lib/components/Typography/Typography.cjs +1 -0
  12. package/src/lib/components/Typography/Typography.js +1 -0
  13. package/src/lib/components/Typography/Typography.types.d.ts +1 -1
  14. package/src/lib/context/ViewContext/types/index.d.ts +1 -1
  15. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +6 -0
  16. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +6 -0
  17. package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -1
  18. package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -1
  19. package/src/lib/shared/assets/check-circle-filled.cjs +60 -0
  20. package/src/lib/shared/assets/check-circle-filled.js +36 -0
  21. package/src/lib/shared/assets/index.d.ts +16 -12
  22. package/src/lib/shared/assets/knowledge-check-icon.cjs +57 -0
  23. package/src/lib/shared/assets/knowledge-check-icon.js +33 -0
  24. package/src/lib/shared/assets/password-lock-icon.cjs +54 -0
  25. package/src/lib/shared/assets/password-lock-icon.js +30 -0
  26. package/src/lib/shared/assets/secure-action.cjs +54 -0
  27. package/src/lib/shared/assets/secure-action.js +30 -0
  28. package/src/lib/shared/assets/warning-circle-orange.cjs +57 -0
  29. package/src/lib/shared/assets/warning-circle-orange.js +33 -0
  30. package/src/lib/styles/index.shadow.cjs +1 -1
  31. package/src/lib/styles/index.shadow.js +1 -1
  32. package/src/lib/utils/functions/reconcilePrimaryWallet/index.d.ts +1 -0
  33. package/src/lib/utils/functions/reconcilePrimaryWallet/reconcilePrimaryWallet.cjs +26 -0
  34. package/src/lib/utils/functions/reconcilePrimaryWallet/reconcilePrimaryWallet.d.ts +2 -0
  35. package/src/lib/utils/functions/reconcilePrimaryWallet/reconcilePrimaryWallet.js +22 -0
  36. package/src/lib/utils/hooks/index.d.ts +1 -0
  37. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +30 -17
  38. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.d.ts +0 -1
  39. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +32 -19
  40. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +21 -12
  41. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +2 -1
  42. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +21 -12
  43. package/src/lib/utils/hooks/useRefreshAuth/index.d.ts +1 -0
  44. package/src/lib/utils/hooks/useRefreshAuth/useRefreshAuth.cjs +49 -0
  45. package/src/lib/utils/hooks/useRefreshAuth/useRefreshAuth.d.ts +8 -0
  46. package/src/lib/utils/hooks/useRefreshAuth/useRefreshAuth.js +45 -0
  47. package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.cjs +13 -23
  48. package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.js +12 -22
  49. package/src/lib/utils/hooks/useWalletBackup/cloudProviders.cjs +2 -2
  50. package/src/lib/utils/hooks/useWalletBackup/cloudProviders.js +2 -2
  51. package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.cjs +2 -2
  52. package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.js +2 -2
  53. package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.cjs +2 -2
  54. package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.js +2 -2
  55. package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.cjs +1 -1
  56. package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.js +1 -1
  57. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -1
  58. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -1
  59. package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.cjs +1 -1
  60. package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.js +1 -1
  61. package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -1
  62. package/src/lib/views/EmailVerification/EmailVerification.js +1 -1
  63. package/src/lib/views/ExportSharesView/ExportSharesView.cjs +1 -1
  64. package/src/lib/views/ExportSharesView/ExportSharesView.js +1 -1
  65. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +1 -1
  66. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +1 -1
  67. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +1 -1
  68. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +1 -1
  69. package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +1 -1
  70. package/src/lib/views/MfaVerificationView/MfaVerificationView.js +1 -1
  71. package/src/lib/views/Passkey/ConfirmPasskeyView/ConfirmPasskeyView.cjs +1 -1
  72. package/src/lib/views/Passkey/ConfirmPasskeyView/ConfirmPasskeyView.js +1 -1
  73. package/src/lib/views/Passkey/SetupPasskeyView/SetupPasskeyView.cjs +1 -1
  74. package/src/lib/views/Passkey/SetupPasskeyView/SetupPasskeyView.js +1 -1
  75. package/src/lib/views/SmsVerification/SmsVerification.cjs +1 -1
  76. package/src/lib/views/SmsVerification/SmsVerification.js +1 -1
  77. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +6 -5
  78. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +6 -5
  79. package/src/lib/views/WaasUpgradeView/WaasUpgradeView.cjs +1 -1
  80. package/src/lib/views/WaasUpgradeView/WaasUpgradeView.js +1 -1
  81. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
  82. package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
  83. package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.cjs +2 -2
  84. package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.js +2 -2
  85. package/src/lib/views/viewToComponentMap.cjs +2 -0
  86. package/src/lib/views/viewToComponentMap.d.ts +1 -0
  87. package/src/lib/views/viewToComponentMap.js +2 -0
  88. package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.cjs +1 -1
  89. package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.js +1 -1
  90. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +15 -3
  91. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +6 -0
  92. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +15 -3
  93. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +1 -1
  94. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -1
  95. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -1
  96. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.cjs +2 -2
  97. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.js +2 -2
  98. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.cjs +31 -10
  99. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.js +31 -10
  100. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +1 -1
  101. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +1 -1
  102. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.cjs +54 -0
  103. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.d.ts +7 -0
  104. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.js +50 -0
  105. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/index.d.ts +2 -0
  106. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/PasswordRequirement.cjs +15 -0
  107. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/PasswordRequirement.d.ts +6 -0
  108. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/PasswordRequirement.js +11 -0
  109. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/SetupPasswordEnterView.cjs +57 -0
  110. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/SetupPasswordEnterView.d.ts +6 -0
  111. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/SetupPasswordEnterView.js +53 -0
  112. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/index.d.ts +4 -0
  113. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.cjs +83 -0
  114. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.d.ts +7 -0
  115. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.js +79 -0
  116. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/index.d.ts +2 -0
  117. package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/SetupPasswordSuccessView.cjs +27 -0
  118. package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/SetupPasswordSuccessView.d.ts +5 -0
  119. package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/SetupPasswordSuccessView.js +23 -0
  120. package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/index.d.ts +2 -0
  121. package/src/lib/widgets/DynamicWidget/views/SetupPasswordTermsView/SetupPasswordTermsView.cjs +37 -0
  122. package/src/lib/widgets/DynamicWidget/views/SetupPasswordTermsView/SetupPasswordTermsView.d.ts +6 -0
  123. package/src/lib/widgets/DynamicWidget/views/SetupPasswordTermsView/SetupPasswordTermsView.js +33 -0
  124. package/src/lib/widgets/DynamicWidget/views/SetupPasswordTermsView/index.d.ts +2 -0
  125. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/SetupPasswordView.cjs +76 -0
  126. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/SetupPasswordView.d.ts +6 -0
  127. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/SetupPasswordView.js +72 -0
  128. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/index.d.ts +2 -0
  129. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupInfoView.cjs +1 -1
  130. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupInfoView.js +1 -1
  131. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.cjs +1 -1
  132. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.js +1 -1
  133. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.cjs +1 -1
  134. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.js +1 -1
  135. package/src/lib/widgets/DynamicWidget/views/index.d.ts +6 -0
@@ -283,12 +283,13 @@ const TransactionConfirmationView = ({ transaction, onError, onSuccess, mutation
283
283
  feePromise.finally(update);
284
284
  }
285
285
  }
286
- }, [primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.chain, transaction, update]);
286
+ }, [primaryWallet, transaction, update]);
287
287
  useEffect(() => {
288
- var _a;
289
- // solana gas sponsorship check
290
- if ((_a = transaction.isGasSponsored) === null || _a === void 0 ? void 0 : _a.call(transaction)) {
291
- setIsGasSponsored(true);
288
+ // Solana gas sponsorship check
289
+ // Only set for transactions that implement isGasSponsored (Solana)
290
+ // ZeroDev/EVM transactions handle sponsorship via fetchSimulationResult
291
+ if (transaction.isGasSponsored) {
292
+ setIsGasSponsored(transaction.isGasSponsored());
292
293
  }
293
294
  }, [transaction]);
294
295
  const { mutate: send, isLoading, error: transactionError, } = useMutation(mutation, {
@@ -9,9 +9,9 @@ var React = require('react');
9
9
  var reactI18next = require('react-i18next');
10
10
  require('@dynamic-labs/utils');
11
11
  require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
12
+ var upgrade = require('../../shared/assets/upgrade.cjs');
12
13
  require('@dynamic-labs/iconic');
13
14
  var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
14
- var upgrade = require('../../shared/assets/upgrade.cjs');
15
15
  require('@dynamic-labs/wallet-connector-core');
16
16
  require('../../shared/logger.cjs');
17
17
  require('@dynamic-labs/wallet-book');
@@ -5,9 +5,9 @@ import { useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import '@dynamic-labs/utils';
7
7
  import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
8
+ import { ReactComponent as SvgUpgrade } from '../../shared/assets/upgrade.js';
8
9
  import '@dynamic-labs/iconic';
9
10
  import { useViewContext } from '../../context/ViewContext/ViewContext.js';
10
- import { ReactComponent as SvgUpgrade } from '../../shared/assets/upgrade.js';
11
11
  import '@dynamic-labs/wallet-connector-core';
12
12
  import '../../shared/logger.js';
13
13
  import '@dynamic-labs/wallet-book';
@@ -89,12 +89,12 @@ require('../../context/PasskeyContext/PasskeyContext.cjs');
89
89
  require('../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs');
90
90
  require('../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
91
91
  require('../../utils/hooks/useWalletBackup/types.cjs');
92
+ var TextButton = require('../../components/TextButton/TextButton.cjs');
92
93
  require('../../utils/hooks/useWalletBackup/cloudProviders.cjs');
93
94
  require('../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs');
94
95
  require('../../context/OnrampContext/OnrampContext.cjs');
95
96
  require('../../../index.cjs');
96
97
  require('../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
97
- var TextButton = require('../../components/TextButton/TextButton.cjs');
98
98
  require('qrcode');
99
99
  require('../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
100
100
  require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
@@ -85,12 +85,12 @@ import '../../context/PasskeyContext/PasskeyContext.js';
85
85
  import '../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js';
86
86
  import '../../utils/hooks/useWalletBackup/useWalletBackup.js';
87
87
  import '../../utils/hooks/useWalletBackup/types.js';
88
+ import { TextButton } from '../../components/TextButton/TextButton.js';
88
89
  import '../../utils/hooks/useWalletBackup/cloudProviders.js';
89
90
  import '../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.js';
90
91
  import '../../context/OnrampContext/OnrampContext.js';
91
92
  import '../../../index.js';
92
93
  import '../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.js';
93
- import { TextButton } from '../../components/TextButton/TextButton.js';
94
94
  import 'qrcode';
95
95
  import '../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
96
96
  import '../../context/IpConfigurationContext/IpConfigurationContext.js';
@@ -77,7 +77,7 @@ var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs
77
77
  require('../../components/IconButton/IconButton.cjs');
78
78
  var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
79
79
  var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
80
- var useRefreshUser = require('../../utils/hooks/useRefreshUser/useRefreshUser.cjs');
80
+ var useRefreshAuth = require('../../utils/hooks/useRefreshAuth/useRefreshAuth.cjs');
81
81
  var useDynamicWaas = require('../../utils/hooks/useDynamicWaas/useDynamicWaas.cjs');
82
82
  require('../../components/MenuList/Dropdown/Dropdown.cjs');
83
83
  require('formik');
@@ -128,7 +128,7 @@ const WalletUpgradeFlowView = ({ wallets, method, onComplete, onCancel, }) => {
128
128
  const isLastWallet = currentWalletIndex === wallets.length - 1;
129
129
  const completedSteps = currentWalletIndex;
130
130
  const totalSteps = wallets.length;
131
- const refresh = useRefreshUser.useRefreshUser();
131
+ const refresh = useRefreshAuth.useRefreshAuth();
132
132
  // Check if current wallet is a WaaS wallet based on its properties
133
133
  const isWaasWallet = Boolean(user === null || user === void 0 ? void 0 : user.verifiedCredentials.find((vc) => { var _a; return (_a = vc.walletName) === null || _a === void 0 ? void 0 : _a.startsWith('dynamicwaas'); }));
134
134
  const onExportReady = (isReady, wallet) => {
@@ -73,7 +73,7 @@ import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.j
73
73
  import '../../components/IconButton/IconButton.js';
74
74
  import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
75
75
  import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
76
- import { useRefreshUser } from '../../utils/hooks/useRefreshUser/useRefreshUser.js';
76
+ import { useRefreshAuth } from '../../utils/hooks/useRefreshAuth/useRefreshAuth.js';
77
77
  import { useDynamicWaas } from '../../utils/hooks/useDynamicWaas/useDynamicWaas.js';
78
78
  import '../../components/MenuList/Dropdown/Dropdown.js';
79
79
  import 'formik';
@@ -124,7 +124,7 @@ const WalletUpgradeFlowView = ({ wallets, method, onComplete, onCancel, }) => {
124
124
  const isLastWallet = currentWalletIndex === wallets.length - 1;
125
125
  const completedSteps = currentWalletIndex;
126
126
  const totalSteps = wallets.length;
127
- const refresh = useRefreshUser();
127
+ const refresh = useRefreshAuth();
128
128
  // Check if current wallet is a WaaS wallet based on its properties
129
129
  const isWaasWallet = Boolean(user === null || user === void 0 ? void 0 : user.verifiedCredentials.find((vc) => { var _a; return (_a = vc.walletName) === null || _a === void 0 ? void 0 : _a.startsWith('dynamicwaas'); }));
130
130
  const onExportReady = (isReady, wallet) => {
@@ -13,6 +13,7 @@ var WaasBackupInfoView = require('../widgets/DynamicWidget/views/WaasBackupView/
13
13
  var WaasBackupProgressView = require('../widgets/DynamicWidget/views/WaasBackupView/WaasBackupProgressView.cjs');
14
14
  var WaasBackupSuccessView = require('../widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.cjs');
15
15
  var WaasBackupView = require('../widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.cjs');
16
+ var SetupPasswordTermsView = require('../widgets/DynamicWidget/views/SetupPasswordTermsView/SetupPasswordTermsView.cjs');
16
17
  var AccessBlockedView = require('./AccessBlockedView/AccessBlockedView.cjs');
17
18
  var AccountExistsView = require('./AccountExistsView/AccountExistsView.cjs');
18
19
  var AccountUpgradedView = require('./AccountUpgradedView/AccountUpgradedView.cjs');
@@ -240,6 +241,7 @@ const viewToComponentMap = {
240
241
  'sandbox-maximum-threshold-reached': SandboxMaximumThresholdReached.SandboxMaximumThresholdReached,
241
242
  'select-hardware-wallet': SelectHardwareWalletView.SelectHardwareWalletView,
242
243
  'select-wallet-in-wallet-group': SelectWalletInWalletGroupView.SelectWalletInWalletGroupView,
244
+ 'setup-password-terms': SetupPasswordTermsView.SetupPasswordTermsView,
243
245
  'social-redirect-view': SocialRedirectView.SocialRedirectView,
244
246
  'social-wrong-account': SocialWrongAccountView.SocialWrongAccountView,
245
247
  'unified-wallet-exchange-list': UnifiedList.UnifiedList,
@@ -100,6 +100,7 @@ export declare const viewToComponentMap: {
100
100
  'select-wallet-in-wallet-group': import("react").FC<{
101
101
  onSelectWallet: (wallet: import("../shared").WalletOption) => void;
102
102
  }>;
103
+ 'setup-password-terms': import("react").FC<import("../widgets/DynamicWidget/views/SetupPasswordTermsView").SetupPasswordTermsViewProps>;
103
104
  'social-redirect-view': () => JSX.Element;
104
105
  'social-wrong-account': () => JSX.Element | null;
105
106
  'unified-wallet-exchange-list': import("react").FC<import("./UnifiedList/UnifiedList").UnifiedListProps>;
@@ -9,6 +9,7 @@ import { WaasBackupInfoView } from '../widgets/DynamicWidget/views/WaasBackupVie
9
9
  import { WaasBackupProgressView } from '../widgets/DynamicWidget/views/WaasBackupView/WaasBackupProgressView.js';
10
10
  import { WaasBackupSuccessView } from '../widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.js';
11
11
  import { WaasBackupView } from '../widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.js';
12
+ import { SetupPasswordTermsView } from '../widgets/DynamicWidget/views/SetupPasswordTermsView/SetupPasswordTermsView.js';
12
13
  import { AccessBlockedView } from './AccessBlockedView/AccessBlockedView.js';
13
14
  import { AccountExistsView } from './AccountExistsView/AccountExistsView.js';
14
15
  import { AccountUpgradedView } from './AccountUpgradedView/AccountUpgradedView.js';
@@ -236,6 +237,7 @@ const viewToComponentMap = {
236
237
  'sandbox-maximum-threshold-reached': SandboxMaximumThresholdReached,
237
238
  'select-hardware-wallet': SelectHardwareWalletView,
238
239
  'select-wallet-in-wallet-group': SelectWalletInWalletGroupView,
240
+ 'setup-password-terms': SetupPasswordTermsView,
239
241
  'social-redirect-view': SocialRedirectView,
240
242
  'social-wrong-account': SocialWrongAccountView,
241
243
  'unified-wallet-exchange-list': UnifiedList,
@@ -13,8 +13,8 @@ require('@dynamic-labs/iconic');
13
13
  require('@dynamic-labs/wallet-connector-core');
14
14
  var check = require('../../../../shared/assets/check.cjs');
15
15
  var chevronDown = require('../../../../shared/assets/chevron-down.cjs');
16
- require('../../../../context/ViewContext/ViewContext.cjs');
17
16
  var reloadIcon = require('../../../../shared/assets/reload-icon.cjs');
17
+ require('../../../../context/ViewContext/ViewContext.cjs');
18
18
  require('../../../../shared/logger.cjs');
19
19
  require('@dynamic-labs/wallet-book');
20
20
  require('@dynamic-labs/utils');
@@ -9,8 +9,8 @@ import '@dynamic-labs/iconic';
9
9
  import '@dynamic-labs/wallet-connector-core';
10
10
  import { ReactComponent as SvgCheck } from '../../../../shared/assets/check.js';
11
11
  import { ReactComponent as SvgChevronDown } from '../../../../shared/assets/chevron-down.js';
12
- import '../../../../context/ViewContext/ViewContext.js';
13
12
  import { ReactComponent as SvgReloadIcon } from '../../../../shared/assets/reload-icon.js';
13
+ import '../../../../context/ViewContext/ViewContext.js';
14
14
  import '../../../../shared/logger.js';
15
15
  import '@dynamic-labs/wallet-book';
16
16
  import '@dynamic-labs/utils';
@@ -12,17 +12,23 @@ var ManagePasskeysWidgetView = require('../../views/ManagePasskeysWidgetView/Man
12
12
  var SettingsView = require('../../views/SettingsView/SettingsView.cjs');
13
13
  var AccountAndSecuritySettingsView = require('../../views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs');
14
14
  var SessionManagementView = require('../../views/SessionManagementView/SessionManagementView.cjs');
15
- var WalletsDelegatedSettingsView = require('../../views/WalletsDelegatedSettingsView/WalletsDelegatedSettingsView.cjs');
15
+ var SetupPasswordView = require('../../views/SetupPasswordView/SetupPasswordView.cjs');
16
+ var SetupPasswordTermsView = require('../../views/SetupPasswordTermsView/SetupPasswordTermsView.cjs');
17
+ var SetupPasswordEnterView = require('../../views/SetupPasswordEnterView/SetupPasswordEnterView.cjs');
16
18
  require('react/jsx-runtime');
19
+ require('../../../../../../_virtual/_tslib.cjs');
20
+ require('@dynamic-labs/utils');
17
21
  require('react');
18
22
  require('@dynamic-labs/iconic');
19
23
  require('../../../../context/ViewContext/ViewContext.cjs');
20
- require('../../../../../../_virtual/_tslib.cjs');
24
+ var SetupPasswordConfirmView = require('../../views/SetupPasswordConfirmView/SetupPasswordConfirmView.cjs');
25
+ var SetupPasswordKnowledgeCheckView = require('../../views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.cjs');
26
+ var SetupPasswordSuccessView = require('../../views/SetupPasswordSuccessView/SetupPasswordSuccessView.cjs');
27
+ var WalletsDelegatedSettingsView = require('../../views/WalletsDelegatedSettingsView/WalletsDelegatedSettingsView.cjs');
21
28
  require('react-i18next');
22
29
  require('@dynamic-labs/wallet-connector-core');
23
30
  require('../../../../shared/logger.cjs');
24
31
  require('@dynamic-labs/wallet-book');
25
- require('@dynamic-labs/utils');
26
32
  require('../../../../utils/constants/colors.cjs');
27
33
  require('../../../../utils/constants/values.cjs');
28
34
  require('@dynamic-labs/sdk-api-core');
@@ -156,6 +162,12 @@ const mapViewToComponent = {
156
162
  'session-management-info': SessionManagementInfoView.SessionManagementInfoView,
157
163
  'session-management-revoke-access': RevokeAccessView.RevokeAccessView,
158
164
  settings: SettingsView.SettingsView,
165
+ 'setup-password': SetupPasswordView.SetupPasswordView,
166
+ 'setup-password-confirm': SetupPasswordConfirmView.SetupPasswordConfirmView,
167
+ 'setup-password-enter': SetupPasswordEnterView.SetupPasswordEnterView,
168
+ 'setup-password-knowledge-check': SetupPasswordKnowledgeCheckView.SetupPasswordKnowledgeCheckView,
169
+ 'setup-password-success': SetupPasswordSuccessView.SetupPasswordSuccessView,
170
+ 'setup-password-terms': SetupPasswordTermsView.SetupPasswordTermsView,
159
171
  'waas-backup': WaasBackupView.WaasBackupView,
160
172
  'waas-backup-info': WaasBackupInfoView.WaasBackupInfoView,
161
173
  'wallet-delegation': WalletDelegationView.WalletDelegationView,
@@ -35,6 +35,12 @@ export declare const mapViewToComponent: {
35
35
  'session-management-info': import("react").FC;
36
36
  'session-management-revoke-access': import("react").FC<import("../../views/SessionManagementView/RevokeAccessView").RevokeAccessViewProps>;
37
37
  settings: import("react").FC;
38
+ 'setup-password': import("react").FC<import("../../views/SetupPasswordView").SetupPasswordViewProps>;
39
+ 'setup-password-confirm': import("react").FC<import("../../views/SetupPasswordConfirmView").SetupPasswordConfirmViewProps>;
40
+ 'setup-password-enter': import("react").FC<import("../../views/SetupPasswordEnterView").SetupPasswordEnterViewProps>;
41
+ 'setup-password-knowledge-check': import("react").FC<import("../../views/SetupPasswordKnowledgeCheckView").SetupPasswordKnowledgeCheckViewProps>;
42
+ 'setup-password-success': import("react").FC<import("../../views/SetupPasswordSuccessView").SetupPasswordSuccessViewProps>;
43
+ 'setup-password-terms': import("react").FC<import("../../views/SetupPasswordTermsView").SetupPasswordTermsViewProps>;
38
44
  'waas-backup': import("react").FC;
39
45
  'waas-backup-info': import("react").FC;
40
46
  'wallet-delegation': import("react").FC<{
@@ -8,17 +8,23 @@ import { ManagePasskeysWidgetView } from '../../views/ManagePasskeysWidgetView/M
8
8
  import { SettingsView } from '../../views/SettingsView/SettingsView.js';
9
9
  import { AccountAndSecuritySettingsView } from '../../views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.js';
10
10
  import { SessionManagementView } from '../../views/SessionManagementView/SessionManagementView.js';
11
- import { WalletsDelegatedSettingsView } from '../../views/WalletsDelegatedSettingsView/WalletsDelegatedSettingsView.js';
11
+ import { SetupPasswordView } from '../../views/SetupPasswordView/SetupPasswordView.js';
12
+ import { SetupPasswordTermsView } from '../../views/SetupPasswordTermsView/SetupPasswordTermsView.js';
13
+ import { SetupPasswordEnterView } from '../../views/SetupPasswordEnterView/SetupPasswordEnterView.js';
12
14
  import 'react/jsx-runtime';
15
+ import '../../../../../../_virtual/_tslib.js';
16
+ import '@dynamic-labs/utils';
13
17
  import 'react';
14
18
  import '@dynamic-labs/iconic';
15
19
  import '../../../../context/ViewContext/ViewContext.js';
16
- import '../../../../../../_virtual/_tslib.js';
20
+ import { SetupPasswordConfirmView } from '../../views/SetupPasswordConfirmView/SetupPasswordConfirmView.js';
21
+ import { SetupPasswordKnowledgeCheckView } from '../../views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.js';
22
+ import { SetupPasswordSuccessView } from '../../views/SetupPasswordSuccessView/SetupPasswordSuccessView.js';
23
+ import { WalletsDelegatedSettingsView } from '../../views/WalletsDelegatedSettingsView/WalletsDelegatedSettingsView.js';
17
24
  import 'react-i18next';
18
25
  import '@dynamic-labs/wallet-connector-core';
19
26
  import '../../../../shared/logger.js';
20
27
  import '@dynamic-labs/wallet-book';
21
- import '@dynamic-labs/utils';
22
28
  import '../../../../utils/constants/colors.js';
23
29
  import '../../../../utils/constants/values.js';
24
30
  import '@dynamic-labs/sdk-api-core';
@@ -152,6 +158,12 @@ const mapViewToComponent = {
152
158
  'session-management-info': SessionManagementInfoView,
153
159
  'session-management-revoke-access': RevokeAccessView,
154
160
  settings: SettingsView,
161
+ 'setup-password': SetupPasswordView,
162
+ 'setup-password-confirm': SetupPasswordConfirmView,
163
+ 'setup-password-enter': SetupPasswordEnterView,
164
+ 'setup-password-knowledge-check': SetupPasswordKnowledgeCheckView,
165
+ 'setup-password-success': SetupPasswordSuccessView,
166
+ 'setup-password-terms': SetupPasswordTermsView,
155
167
  'waas-backup': WaasBackupView,
156
168
  'waas-backup-info': WaasBackupInfoView,
157
169
  'wallet-delegation': WalletDelegationView,
@@ -13,7 +13,7 @@ export declare const DynamicSessionManagementViews: readonly ["session-managemen
13
13
  export type DynamicSessionManagementViewsType = typeof DynamicSessionManagementViews[number];
14
14
  export declare const DynamicTransactionsWidgetViews: readonly ["send-balance"];
15
15
  export type DynamicTransactionsWidgetViewsType = typeof DynamicTransactionsWidgetViews[number];
16
- export type DynamicWidgetViews = 'wallets' | 'profile' | 'edit-profile' | 'choose-wallet-funding-method' | 'receive-wallet-funds' | 'deposited-exchange' | 'receive-exchange-funds' | 'crypto-com-onramp' | DynamicTransactionsWidgetViewsType | DynamicPasskeyWidgetViewsType | DynamicMfaWidgetViewsType | DynamicSettingsType | DynamicGlobalWalletType | DynamicSessionManagementViewsType | 'connected-apps' | 'deposit-view' | 'confirm-exchange-transfer' | 'choose-onramp-provider' | 'choose-linked-wallet' | 'waas-backup' | 'waas-backup-info' | 'wallet-delegation' | 'wallets-delegated-settings' | 'export-and-recovery' | 'export-shares-passcode';
16
+ export type DynamicWidgetViews = 'wallets' | 'profile' | 'edit-profile' | 'choose-wallet-funding-method' | 'receive-wallet-funds' | 'deposited-exchange' | 'receive-exchange-funds' | 'crypto-com-onramp' | DynamicTransactionsWidgetViewsType | DynamicPasskeyWidgetViewsType | DynamicMfaWidgetViewsType | DynamicSettingsType | DynamicGlobalWalletType | DynamicSessionManagementViewsType | 'connected-apps' | 'deposit-view' | 'confirm-exchange-transfer' | 'choose-onramp-provider' | 'choose-linked-wallet' | 'waas-backup' | 'waas-backup-info' | 'wallet-delegation' | 'wallets-delegated-settings' | 'export-and-recovery' | 'export-shares-passcode' | 'setup-password' | 'setup-password-terms' | 'setup-password-enter' | 'setup-password-confirm' | 'setup-password-knowledge-check' | 'setup-password-success';
17
17
  export type DynamicWidgetViewMapConstraint = Record<DynamicWidgetViews, FC<any>>;
18
18
  export type DynamicWidgetViewMap = typeof mapViewToComponent;
19
19
  export type SetDynamicWidgetView = <T extends DynamicWidgetViews>(view: T, props?: ComponentProps<DynamicWidgetViewMap[T]>) => void;
@@ -89,6 +89,7 @@ require('../../../../context/PasskeyContext/PasskeyContext.cjs');
89
89
  require('../../components/PasskeyCard/PasskeyCard.cjs');
90
90
  require('../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
91
91
  require('../../../../utils/hooks/useWalletBackup/types.cjs');
92
+ var TextButton = require('../../../../components/TextButton/TextButton.cjs');
92
93
  require('../../../../utils/hooks/useWalletBackup/cloudProviders.cjs');
93
94
  require('../../views/CryptoComOnramp/CryptoComOnramp.cjs');
94
95
  require('../../../../context/OnrampContext/OnrampContext.cjs');
@@ -97,7 +98,6 @@ require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
97
98
  var CopyButton = require('../../../../components/CopyButton/CopyButton.cjs');
98
99
  var QRCode = require('../../../../components/QRCode/QRCode.cjs');
99
100
  require('../../views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
100
- var TextButton = require('../../../../components/TextButton/TextButton.cjs');
101
101
  require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
102
102
  require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
103
103
  require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
@@ -85,6 +85,7 @@ import '../../../../context/PasskeyContext/PasskeyContext.js';
85
85
  import '../../components/PasskeyCard/PasskeyCard.js';
86
86
  import '../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
87
87
  import '../../../../utils/hooks/useWalletBackup/types.js';
88
+ import { TextButton } from '../../../../components/TextButton/TextButton.js';
88
89
  import '../../../../utils/hooks/useWalletBackup/cloudProviders.js';
89
90
  import '../../views/CryptoComOnramp/CryptoComOnramp.js';
90
91
  import '../../../../context/OnrampContext/OnrampContext.js';
@@ -93,7 +94,6 @@ import '../../helpers/convertExchangeKeyAndProviderEnum.js';
93
94
  import { CopyButton } from '../../../../components/CopyButton/CopyButton.js';
94
95
  import { QRCode } from '../../../../components/QRCode/QRCode.js';
95
96
  import '../../views/ReceiveWalletFunds/ReceiveWalletFunds.js';
96
- import { TextButton } from '../../../../components/TextButton/TextButton.js';
97
97
  import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
98
98
  import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
99
99
  import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
@@ -15,11 +15,11 @@ var TypographyButton = require('../../../../../components/TypographyButton/Typog
15
15
  require('../../../../../context/DynamicContext/DynamicContext.cjs');
16
16
  require('../../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
17
17
  require('@dynamic-labs/iconic');
18
+ var backupArrow = require('../../../../../shared/assets/backupArrow.cjs');
18
19
  var chevronLeft = require('../../../../../shared/assets/chevron-left.cjs');
19
20
  var exportPrivateKey = require('../../../../../shared/assets/export-private-key.cjs');
20
21
  var exportRecoveryPhrase = require('../../../../../shared/assets/export-recovery-phrase.cjs');
21
22
  var ViewContext = require('../../../../../context/ViewContext/ViewContext.cjs');
22
- var backupArrow = require('../../../../../shared/assets/backupArrow.cjs');
23
23
  require('../../../../../shared/logger.cjs');
24
24
  require('@dynamic-labs/wallet-book');
25
25
  require('@dynamic-labs/utils');
@@ -171,7 +171,7 @@ const EmbeddedWalletExportSection = () => {
171
171
  const exportButtonStartSlot = React.useMemo(() => (jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(exportPrivateKey.ReactComponent, { className: exportIconClasses }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: isV3WaasWallet
172
172
  ? 'dyn_settings.export_section.export_button'
173
173
  : 'dyn_settings.export_section.private_key_button', children: isV3WaasWallet
174
- ? t('dyn_settings.export_section.export_button', 'Export')
174
+ ? t('dyn_settings.export_section.export_button')
175
175
  : t('dyn_settings.export_section.private_key_button') })] })), [exportIconClasses, isV3WaasWallet, t]);
176
176
  const recoveryPhraseButtonStartSlot = React.useMemo(() => (jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(exportRecoveryPhrase.ReactComponent, { className: exportIconClasses }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.srp_button', children: t('dyn_settings.export_section.srp_button') })] })), [exportIconClasses, t]);
177
177
  if (!isEmbeddedWallet) {
@@ -11,11 +11,11 @@ import { TypographyButton } from '../../../../../components/TypographyButton/Typ
11
11
  import '../../../../../context/DynamicContext/DynamicContext.js';
12
12
  import '../../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
13
13
  import '@dynamic-labs/iconic';
14
+ import { ReactComponent as SvgBackupArrow } from '../../../../../shared/assets/backupArrow.js';
14
15
  import { ReactComponent as SvgChevronLeft } from '../../../../../shared/assets/chevron-left.js';
15
16
  import { ReactComponent as SvgExportPrivateKey } from '../../../../../shared/assets/export-private-key.js';
16
17
  import { ReactComponent as SvgExportRecoveryPhrase } from '../../../../../shared/assets/export-recovery-phrase.js';
17
18
  import { useViewContext } from '../../../../../context/ViewContext/ViewContext.js';
18
- import { ReactComponent as SvgBackupArrow } from '../../../../../shared/assets/backupArrow.js';
19
19
  import '../../../../../shared/logger.js';
20
20
  import '@dynamic-labs/wallet-book';
21
21
  import '@dynamic-labs/utils';
@@ -167,7 +167,7 @@ const EmbeddedWalletExportSection = () => {
167
167
  const exportButtonStartSlot = useMemo(() => (jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgExportPrivateKey, { className: exportIconClasses }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: isV3WaasWallet
168
168
  ? 'dyn_settings.export_section.export_button'
169
169
  : 'dyn_settings.export_section.private_key_button', children: isV3WaasWallet
170
- ? t('dyn_settings.export_section.export_button', 'Export')
170
+ ? t('dyn_settings.export_section.export_button')
171
171
  : t('dyn_settings.export_section.private_key_button') })] })), [exportIconClasses, isV3WaasWallet, t]);
172
172
  const recoveryPhraseButtonStartSlot = useMemo(() => (jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgExportRecoveryPhrase, { className: exportIconClasses }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.srp_button', children: t('dyn_settings.export_section.srp_button') })] })), [exportIconClasses, t]);
173
173
  if (!isEmbeddedWallet) {
@@ -8,24 +8,23 @@ var React = require('react');
8
8
  var reactI18next = require('react-i18next');
9
9
  var Typography = require('../../../../../components/Typography/Typography.cjs');
10
10
  var TypographyButton = require('../../../../../components/TypographyButton/TypographyButton.cjs');
11
+ require('../../../../../context/DynamicContext/DynamicContext.cjs');
12
+ require('../../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
13
+ require('@dynamic-labs/iconic');
14
+ require('@dynamic-labs/wallet-connector-core');
11
15
  var chevronLeft = require('../../../../../shared/assets/chevron-left.cjs');
12
16
  var faceId = require('../../../../../shared/assets/face-id.cjs');
13
17
  var lock = require('../../../../../shared/assets/lock.cjs');
14
- require('@dynamic-labs/iconic');
15
18
  require('../../../../../context/ViewContext/ViewContext.cjs');
16
- require('../../../../../events/dynamicEvents.cjs');
17
- require('../../../../../../../_virtual/_tslib.cjs');
18
- require('@dynamic-labs/utils');
19
- require('../../../../../context/DynamicContext/DynamicContext.cjs');
20
- require('../../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
21
- require('@dynamic-labs/wallet-connector-core');
22
19
  require('../../../../../shared/logger.cjs');
23
20
  require('@dynamic-labs/wallet-book');
21
+ require('@dynamic-labs/utils');
24
22
  require('../../../../../utils/constants/colors.cjs');
25
23
  require('../../../../../utils/constants/values.cjs');
26
24
  require('@dynamic-labs/sdk-api-core');
27
25
  require('../../../../../shared/consts/index.cjs');
28
- require('../../../../../store/state/authMode/authMode.cjs');
26
+ require('../../../../../events/dynamicEvents.cjs');
27
+ require('../../../../../../../_virtual/_tslib.cjs');
29
28
  require('../../../../../context/CaptchaContext/CaptchaContext.cjs');
30
29
  require('../../../../../context/ErrorContext/ErrorContext.cjs');
31
30
  require('@dynamic-labs/multi-wallet');
@@ -35,6 +34,7 @@ require('@dynamic-labs-sdk/client/core');
35
34
  require('../../../../../client/client.cjs');
36
35
  require('@dynamic-labs-sdk/client');
37
36
  require('../../../../../config/ApiEndpoint.cjs');
37
+ var useProjectSettings = require('../../../../../client/extension/projectSettings/useProjectSettings/useProjectSettings.cjs');
38
38
  require('@dynamic-labs/locale');
39
39
  require('../../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
40
40
  require('../../../../../store/state/primaryWalletId/primaryWalletId.cjs');
@@ -43,11 +43,13 @@ require('../../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTy
43
43
  require('../../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
44
44
  require('../../../../../context/AccountExistsContext/AccountExistsContext.cjs');
45
45
  require('../../../../../context/UserWalletsContext/UserWalletsContext.cjs');
46
+ require('../../../../../store/state/authMode/authMode.cjs');
46
47
  require('../../../../../context/VerificationContext/VerificationContext.cjs');
47
48
  require('react-dom');
48
49
  require('../../../../../utils/functions/compareChains/compareChains.cjs');
49
50
  require('../../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
50
51
  require('../../../../../context/ThemeContext/ThemeContext.cjs');
52
+ var useSmartWallets = require('../../../../../utils/hooks/useSmartWallets/useSmartWallets.cjs');
51
53
  require('../../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
52
54
  require('bs58');
53
55
  require('@dynamic-labs/types');
@@ -112,21 +114,40 @@ require('../../../../../store/state/tokenBalances.cjs');
112
114
  require('../../../../../store/state/multichainBalances.cjs');
113
115
  require('../../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
114
116
  var useIsPasskeysMfaEnabled = require('../../../../../utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.cjs');
117
+ var useInternalDynamicContext = require('../../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
115
118
 
116
119
  const MfaSection = ({ isLoading }) => {
120
+ var _a, _b, _c;
117
121
  const { t } = reactI18next.useTranslation();
118
122
  const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
123
+ const { primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
124
+ const { getEOAWallet } = useSmartWallets.useSmartWallets();
125
+ const projectSettings = useProjectSettings.useProjectSettings();
119
126
  const isMfaEnabled = useIsMfaEnabled.useIsMfaEnabled();
120
127
  const isTotpMfaEnabled = useIsTotpMfaEnabled.useIsTotpMfaEnabled();
121
128
  const isPasskeyMfaEnabled = useIsPasskeysMfaEnabled.useIsPasskeysMfaEnabled();
129
+ const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
130
+ const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
131
+ const isWaasWallet = Boolean(wallet && ((_b = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.startsWith('dynamicwaas')));
132
+ const isPasscodeRequired = (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.waas) === null || _c === void 0 ? void 0 : _c.passcodeRequired;
133
+ const shouldShowPasswordSetup = isWaasWallet && isPasscodeRequired;
122
134
  const handleTotpMfaClick = React.useCallback(() => setDynamicWidgetView('manage-totp-mfa'), [setDynamicWidgetView]);
123
135
  const handlePasskeyMfaClick = React.useCallback(() => setDynamicWidgetView('manage-passkeys-mfa'), [setDynamicWidgetView]);
124
- if (!isMfaEnabled) {
136
+ const handlePasscodeClick = React.useCallback(() => {
137
+ setDynamicWidgetView('setup-password', {
138
+ onComplete: () => {
139
+ // Password setup completed
140
+ },
141
+ });
142
+ }, [setDynamicWidgetView]);
143
+ if (!isMfaEnabled && !isWaasWallet) {
125
144
  return null;
126
145
  }
127
146
  return (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: 'settings-view__body__section__title', children: jsxRuntime.jsx(Typography.Typography, { copykey: 'dyn_settings.mfa_section.title', color: 'secondary', weight: 'medium', children: t('dyn_settings.mfa_section.title') }) }), isPasskeyMfaEnabled && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-passkeys-mfa-button', onClick: handlePasskeyMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
128
147
  // eslint-disable-next-line react/jsx-wrap-multilines
129
- jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(faceId.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.mfa_section.passkey_button', children: t('dyn_settings.mfa_section.passkey_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), isTotpMfaEnabled && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-totp-mfa-button', onClick: handleTotpMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
148
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(faceId.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.mfa_section.passkey_button', children: t('dyn_settings.mfa_section.passkey_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), shouldShowPasswordSetup && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'password-setup-button', onClick: handlePasscodeClick, buttonClassName: 'settings-view__body__section__button', startSlot:
149
+ // eslint-disable-next-line react/jsx-wrap-multilines
150
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(lock.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.account_security.password.set_button', children: t('dyn_settings.account_security.password.set_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), isTotpMfaEnabled && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-totp-mfa-button', onClick: handleTotpMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
130
151
  // eslint-disable-next-line react/jsx-wrap-multilines
131
152
  jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(lock.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.mfa_section.totp_button', children: t('dyn_settings.mfa_section.totp_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false }))] }));
132
153
  };
@@ -4,24 +4,23 @@ import { useCallback } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { Typography } from '../../../../../components/Typography/Typography.js';
6
6
  import { TypographyButton } from '../../../../../components/TypographyButton/TypographyButton.js';
7
+ import '../../../../../context/DynamicContext/DynamicContext.js';
8
+ import '../../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
9
+ import '@dynamic-labs/iconic';
10
+ import '@dynamic-labs/wallet-connector-core';
7
11
  import { ReactComponent as SvgChevronLeft } from '../../../../../shared/assets/chevron-left.js';
8
12
  import { ReactComponent as SvgFaceId } from '../../../../../shared/assets/face-id.js';
9
13
  import { ReactComponent as SvgLock } from '../../../../../shared/assets/lock.js';
10
- import '@dynamic-labs/iconic';
11
14
  import '../../../../../context/ViewContext/ViewContext.js';
12
- import '../../../../../events/dynamicEvents.js';
13
- import '../../../../../../../_virtual/_tslib.js';
14
- import '@dynamic-labs/utils';
15
- import '../../../../../context/DynamicContext/DynamicContext.js';
16
- import '../../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
17
- import '@dynamic-labs/wallet-connector-core';
18
15
  import '../../../../../shared/logger.js';
19
16
  import '@dynamic-labs/wallet-book';
17
+ import '@dynamic-labs/utils';
20
18
  import '../../../../../utils/constants/colors.js';
21
19
  import '../../../../../utils/constants/values.js';
22
20
  import '@dynamic-labs/sdk-api-core';
23
21
  import '../../../../../shared/consts/index.js';
24
- import '../../../../../store/state/authMode/authMode.js';
22
+ import '../../../../../events/dynamicEvents.js';
23
+ import '../../../../../../../_virtual/_tslib.js';
25
24
  import '../../../../../context/CaptchaContext/CaptchaContext.js';
26
25
  import '../../../../../context/ErrorContext/ErrorContext.js';
27
26
  import '@dynamic-labs/multi-wallet';
@@ -31,6 +30,7 @@ import '@dynamic-labs-sdk/client/core';
31
30
  import '../../../../../client/client.js';
32
31
  import '@dynamic-labs-sdk/client';
33
32
  import '../../../../../config/ApiEndpoint.js';
33
+ import { useProjectSettings } from '../../../../../client/extension/projectSettings/useProjectSettings/useProjectSettings.js';
34
34
  import '@dynamic-labs/locale';
35
35
  import '../../../../../store/state/dynamicContextProps/dynamicContextProps.js';
36
36
  import '../../../../../store/state/primaryWalletId/primaryWalletId.js';
@@ -39,11 +39,13 @@ import '../../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTyp
39
39
  import '../../../../../context/AccessDeniedContext/AccessDeniedContext.js';
40
40
  import '../../../../../context/AccountExistsContext/AccountExistsContext.js';
41
41
  import '../../../../../context/UserWalletsContext/UserWalletsContext.js';
42
+ import '../../../../../store/state/authMode/authMode.js';
42
43
  import '../../../../../context/VerificationContext/VerificationContext.js';
43
44
  import 'react-dom';
44
45
  import '../../../../../utils/functions/compareChains/compareChains.js';
45
46
  import '../../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
46
47
  import '../../../../../context/ThemeContext/ThemeContext.js';
48
+ import { useSmartWallets } from '../../../../../utils/hooks/useSmartWallets/useSmartWallets.js';
47
49
  import '../../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
48
50
  import 'bs58';
49
51
  import '@dynamic-labs/types';
@@ -108,21 +110,40 @@ import '../../../../../store/state/tokenBalances.js';
108
110
  import '../../../../../store/state/multichainBalances.js';
109
111
  import '../../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
110
112
  import { useIsPasskeysMfaEnabled } from '../../../../../utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.js';
113
+ import { useInternalDynamicContext } from '../../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
111
114
 
112
115
  const MfaSection = ({ isLoading }) => {
116
+ var _a, _b, _c;
113
117
  const { t } = useTranslation();
114
118
  const { setDynamicWidgetView } = useWidgetContext();
119
+ const { primaryWallet } = useInternalDynamicContext();
120
+ const { getEOAWallet } = useSmartWallets();
121
+ const projectSettings = useProjectSettings();
115
122
  const isMfaEnabled = useIsMfaEnabled();
116
123
  const isTotpMfaEnabled = useIsTotpMfaEnabled();
117
124
  const isPasskeyMfaEnabled = useIsPasskeysMfaEnabled();
125
+ const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
126
+ const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
127
+ const isWaasWallet = Boolean(wallet && ((_b = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.startsWith('dynamicwaas')));
128
+ const isPasscodeRequired = (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.waas) === null || _c === void 0 ? void 0 : _c.passcodeRequired;
129
+ const shouldShowPasswordSetup = isWaasWallet && isPasscodeRequired;
118
130
  const handleTotpMfaClick = useCallback(() => setDynamicWidgetView('manage-totp-mfa'), [setDynamicWidgetView]);
119
131
  const handlePasskeyMfaClick = useCallback(() => setDynamicWidgetView('manage-passkeys-mfa'), [setDynamicWidgetView]);
120
- if (!isMfaEnabled) {
132
+ const handlePasscodeClick = useCallback(() => {
133
+ setDynamicWidgetView('setup-password', {
134
+ onComplete: () => {
135
+ // Password setup completed
136
+ },
137
+ });
138
+ }, [setDynamicWidgetView]);
139
+ if (!isMfaEnabled && !isWaasWallet) {
121
140
  return null;
122
141
  }
123
142
  return (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: jsx(Typography, { copykey: 'dyn_settings.mfa_section.title', color: 'secondary', weight: 'medium', children: t('dyn_settings.mfa_section.title') }) }), isPasskeyMfaEnabled && (jsx(TypographyButton, { dataTestId: 'manage-passkeys-mfa-button', onClick: handlePasskeyMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
124
143
  // eslint-disable-next-line react/jsx-wrap-multilines
125
- jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgFaceId, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.mfa_section.passkey_button', children: t('dyn_settings.mfa_section.passkey_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), isTotpMfaEnabled && (jsx(TypographyButton, { dataTestId: 'manage-totp-mfa-button', onClick: handleTotpMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
144
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgFaceId, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.mfa_section.passkey_button', children: t('dyn_settings.mfa_section.passkey_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), shouldShowPasswordSetup && (jsx(TypographyButton, { dataTestId: 'password-setup-button', onClick: handlePasscodeClick, buttonClassName: 'settings-view__body__section__button', startSlot:
145
+ // eslint-disable-next-line react/jsx-wrap-multilines
146
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgLock, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.account_security.password.set_button', children: t('dyn_settings.account_security.password.set_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), isTotpMfaEnabled && (jsx(TypographyButton, { dataTestId: 'manage-totp-mfa-button', onClick: handleTotpMfaClick, buttonClassName: 'settings-view__body__section__button', startSlot:
126
147
  // eslint-disable-next-line react/jsx-wrap-multilines
127
148
  jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgLock, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.mfa_section.totp_button', children: t('dyn_settings.mfa_section.totp_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false }))] }));
128
149
  };
@@ -14,9 +14,9 @@ require('@dynamic-labs/iconic');
14
14
  require('@dynamic-labs/wallet-connector-core');
15
15
  var accountAndSecurity = require('../../../../shared/assets/account-and-security.cjs');
16
16
  var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
17
+ var connect = require('../../../../shared/assets/connect.cjs');
17
18
  var connectedApps = require('../../../../shared/assets/connected-apps.cjs');
18
19
  var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
19
- var connect = require('../../../../shared/assets/connect.cjs');
20
20
  require('../../../../shared/logger.cjs');
21
21
  require('@dynamic-labs/wallet-book');
22
22
  require('@dynamic-labs/utils');