@dynamic-labs/sdk-react-core 4.71.0 → 4.73.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 (148) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +13 -13
  5. package/src/lib/client/extension/functions/generateChainingSignature/generateChainingSignature.cjs +15 -0
  6. package/src/lib/client/extension/functions/generateChainingSignature/generateChainingSignature.d.ts +1 -0
  7. package/src/lib/client/extension/functions/generateChainingSignature/generateChainingSignature.js +11 -0
  8. package/src/lib/client/extension/functions/generateSessionKeys/generateSessionKeys.cjs +11 -0
  9. package/src/lib/client/extension/functions/generateSessionKeys/generateSessionKeys.d.ts +1 -0
  10. package/src/lib/client/extension/functions/generateSessionKeys/generateSessionKeys.js +7 -0
  11. package/src/lib/client/extension/functions/getClientSessionNonceHeaders/getClientSessionNonceHeaders.cjs +33 -0
  12. package/src/lib/client/extension/functions/getClientSessionNonceHeaders/getClientSessionNonceHeaders.d.ts +16 -0
  13. package/src/lib/client/extension/functions/getClientSessionNonceHeaders/getClientSessionNonceHeaders.js +29 -0
  14. package/src/lib/client/extension/functions/getSessionKeys/getSessionKeys.d.ts +1 -0
  15. package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.cjs +5 -9
  16. package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.d.ts +4 -0
  17. package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.js +6 -10
  18. package/src/lib/client/extension/functions/migrateClientSessionKey/migrateClientSessionKey.cjs +51 -0
  19. package/src/lib/client/extension/functions/migrateClientSessionKey/migrateClientSessionKey.d.ts +1 -0
  20. package/src/lib/client/extension/functions/migrateClientSessionKey/migrateClientSessionKey.js +47 -0
  21. package/src/lib/client/extension/hooks/useInitializeSdkClient/getApiHeaders/getApiHeaders.cjs +5 -6
  22. package/src/lib/client/extension/hooks/useInitializeSdkClient/getApiHeaders/getApiHeaders.js +5 -6
  23. package/src/lib/client/extension/hooks/useInitializeSdkClient/syncEvents/syncEvents.cjs +2 -2
  24. package/src/lib/client/extension/hooks/useInitializeSdkClient/syncEvents/syncEvents.js +2 -2
  25. package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.cjs +2 -0
  26. package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.js +2 -0
  27. package/src/lib/client/extension/index.d.ts +4 -0
  28. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +2 -2
  29. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +2 -2
  30. package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.cjs +2 -2
  31. package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.js +2 -2
  32. package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +2 -2
  33. package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +2 -2
  34. package/src/lib/context/DynamicContext/DynamicContext.cjs +0 -3
  35. package/src/lib/context/DynamicContext/DynamicContext.js +0 -3
  36. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +10 -9
  37. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.d.ts +2 -1
  38. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +10 -9
  39. package/src/lib/context/DynamicContext/types/DynamicContextProps.d.ts +10 -0
  40. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +0 -2
  41. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +0 -2
  42. package/src/lib/data/api/api.cjs +1 -1
  43. package/src/lib/data/api/api.js +1 -1
  44. package/src/lib/data/api/embeddedWallets/embeddedWallets.cjs +2 -4
  45. package/src/lib/data/api/embeddedWallets/embeddedWallets.js +2 -4
  46. package/src/lib/events/auth.d.ts +2 -1
  47. package/src/lib/shared/assets/backupArrow.cjs +1 -1
  48. package/src/lib/shared/assets/backupArrow.js +1 -1
  49. package/src/lib/shared/assets/export-private-key.cjs +1 -2
  50. package/src/lib/shared/assets/export-private-key.js +1 -2
  51. package/src/lib/shared/assets/export-recovery-phrase.cjs +1 -2
  52. package/src/lib/shared/assets/export-recovery-phrase.js +1 -2
  53. package/src/lib/shared/assets/face-id.cjs +1 -1
  54. package/src/lib/shared/assets/face-id.js +1 -1
  55. package/src/lib/shared/assets/lock.cjs +1 -2
  56. package/src/lib/shared/assets/lock.js +1 -2
  57. package/src/lib/store/state/dynamicContextProps/defaultDynamicSettings.cjs +2 -0
  58. package/src/lib/store/state/dynamicContextProps/defaultDynamicSettings.d.ts +3 -3
  59. package/src/lib/store/state/dynamicContextProps/defaultDynamicSettings.js +2 -0
  60. package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.cjs +0 -88
  61. package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.d.ts +0 -25
  62. package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.js +2 -83
  63. package/src/lib/utils/functions/index.d.ts +0 -1
  64. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +0 -2
  65. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +0 -2
  66. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +0 -2
  67. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +0 -2
  68. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +0 -2
  69. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +0 -2
  70. package/src/lib/utils/hooks/index.d.ts +0 -1
  71. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +4 -12
  72. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +4 -12
  73. package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.cjs +1 -1
  74. package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.js +1 -1
  75. package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.cjs +2 -2
  76. package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.js +2 -2
  77. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +2 -3
  78. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +2 -3
  79. package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.cjs +14 -14
  80. package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.js +14 -14
  81. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +3 -3
  82. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +3 -3
  83. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.cjs +14 -38
  84. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.js +14 -38
  85. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.types.d.ts +8 -3
  86. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpOtp.cjs +6 -10
  87. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpOtp.d.ts +2 -2
  88. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpOtp.js +6 -10
  89. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpPromptMfa.cjs +4 -1
  90. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpPromptMfa.js +4 -1
  91. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpPromptReauth.cjs +22 -6
  92. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpPromptReauth.js +22 -6
  93. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpWallet.cjs +9 -3
  94. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpWallet.d.ts +1 -1
  95. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpWallet.js +9 -3
  96. package/src/lib/utils/hooks/useSyncDeviceRegistrationFlow/useSyncDeviceRegistrationFlow.cjs +5 -1
  97. package/src/lib/utils/hooks/useSyncDeviceRegistrationFlow/useSyncDeviceRegistrationFlow.js +5 -1
  98. package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.cjs +1 -1
  99. package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.d.ts +2 -1
  100. package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.js +1 -1
  101. package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +2 -2
  102. package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +2 -1
  103. package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +2 -2
  104. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +0 -2
  105. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +0 -2
  106. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
  107. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
  108. package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -2
  109. package/src/lib/views/EmailVerification/EmailVerification.js +2 -2
  110. package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +2 -2
  111. package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +2 -2
  112. package/src/lib/views/StepUpReauthOtpView/StepUpReauthOtpView.cjs +1 -109
  113. package/src/lib/views/StepUpReauthOtpView/StepUpReauthOtpView.js +1 -109
  114. package/src/lib/views/StepUpReauthSocialView/StepUpReauthSocialView.cjs +1 -2
  115. package/src/lib/views/StepUpReauthSocialView/StepUpReauthSocialView.js +1 -2
  116. package/src/lib/views/StepUpReauthWalletView/StepUpReauthWalletView.cjs +2 -96
  117. package/src/lib/views/StepUpReauthWalletView/StepUpReauthWalletView.js +2 -96
  118. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +2 -2
  119. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +1 -0
  120. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +2 -2
  121. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -1
  122. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -1
  123. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -1
  124. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -1
  125. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -1
  126. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -1
  127. package/src/lib/widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs +1 -1
  128. package/src/lib/widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js +1 -1
  129. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -1
  130. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -1
  131. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.cjs +62 -8
  132. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.js +63 -9
  133. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.cjs +12 -54
  134. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.js +12 -54
  135. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -1
  136. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -1
  137. package/src/lib/widgets/DynamicWidget/views/ExportAndRecoveryView/ExportAndRecoveryView.cjs +2 -3
  138. package/src/lib/widgets/DynamicWidget/views/ExportAndRecoveryView/ExportAndRecoveryView.js +2 -3
  139. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysMfaWidgetView/ManagePasskeysMfaWidgetView.cjs +1 -1
  140. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysMfaWidgetView/ManagePasskeysMfaWidgetView.js +1 -1
  141. package/src/lib/widgets/DynamicWidget/views/ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.cjs +2 -2
  142. package/src/lib/widgets/DynamicWidget/views/ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.js +2 -2
  143. package/src/lib/utils/functions/clientSessionKeys/constants.cjs +0 -8
  144. package/src/lib/utils/functions/clientSessionKeys/constants.js +0 -4
  145. package/src/lib/utils/hooks/useClientSessionKeys/index.d.ts +0 -1
  146. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +0 -101
  147. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.d.ts +0 -4
  148. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +0 -97
@@ -3,7 +3,7 @@ import { __awaiter } from '../../../../../../../_virtual/_tslib.js';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { useCallback, useMemo } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
- import { TokenScope, WaasBackupOptionsEnum } from '@dynamic-labs/sdk-api-core';
6
+ import { TokenScope, MFAAction, WaasBackupOptionsEnum } from '@dynamic-labs/sdk-api-core';
7
7
  import { isSessionKeyCompatibleWallet } from '@dynamic-labs/wallet-connector-core';
8
8
  import { Badge } from '../../../../../components/Badge/Badge.js';
9
9
  import { Typography } from '../../../../../components/Typography/Typography.js';
@@ -15,8 +15,9 @@ import { ReactComponent as SvgBackupArrow } from '../../../../../shared/assets/b
15
15
  import { ReactComponent as SvgChevronLeft } from '../../../../../shared/assets/chevron-left.js';
16
16
  import { ReactComponent as SvgExportPrivateKey } from '../../../../../shared/assets/export-private-key.js';
17
17
  import { ReactComponent as SvgExportRecoveryPhrase } from '../../../../../shared/assets/export-recovery-phrase.js';
18
+ import { ReactComponent as SvgLock } from '../../../../../shared/assets/lock.js';
18
19
  import { useViewContext } from '../../../../../context/ViewContext/ViewContext.js';
19
- import '../../../../../shared/logger.js';
20
+ import { logger } from '../../../../../shared/logger.js';
20
21
  import '@dynamic-labs/wallet-book';
21
22
  import '@dynamic-labs/utils';
22
23
  import '../../../../../utils/constants/colors.js';
@@ -45,7 +46,7 @@ import '../../../../../context/VerificationContext/VerificationContext.js';
45
46
  import 'react-dom';
46
47
  import '../../../../../utils/functions/compareChains/compareChains.js';
47
48
  import '../../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
48
- import { useThemeContext } from '../../../../../context/ThemeContext/ThemeContext.js';
49
+ import '../../../../../context/ThemeContext/ThemeContext.js';
49
50
  import { useSmartWallets } from '../../../../../utils/hooks/useSmartWallets/useSmartWallets.js';
50
51
  import '../../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
51
52
  import { usePasskeyRecovery } from '../../../../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js';
@@ -82,7 +83,7 @@ import 'qrcode';
82
83
  import 'formik';
83
84
  import '../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
84
85
  import '../../../../../context/WalletGroupContext/WalletGroupContext.js';
85
- import '../../../context/DynamicWidgetContext.js';
86
+ import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
86
87
  import '../../../../../utils/hooks/useGetMfaToken/useGetMfaToken.js';
87
88
  import { useWalletBackup } from '../../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
88
89
  import '../../../../../utils/hooks/useWalletBackup/types.js';
@@ -98,6 +99,7 @@ import '../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
98
99
  import '../../../../../context/FooterAnimationContext/index.js';
99
100
  import '../../../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
100
101
  import '../../../../../context/PasskeyContext/PasskeyContext.js';
102
+ import { useWalletPassword } from '../../../../../utils/hooks/useWalletPassword/useWalletPassword.js';
101
103
  import '../../../../../context/OnrampContext/OnrampContext.js';
102
104
  import '../../../../../store/state/sendBalances.js';
103
105
  import '../../../../../store/state/connectorsInitializing/connectorsInitializing.js';
@@ -106,6 +108,7 @@ import '../../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
106
108
  import '../../../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
107
109
  import '../../../components/PasskeyCard/PasskeyCard.js';
108
110
  import { useEmbeddedReveal } from '../../../../../utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js';
111
+ import { useIsPasswordEncrypted } from '../../../../../utils/hooks/useIsPasswordEncrypted/useIsPasswordEncrypted.js';
109
112
  import '../../CryptoComOnramp/CryptoComOnramp.js';
110
113
  import '../../../../../../index.js';
111
114
  import '../../ManagePasskeysMfaWidgetView/ManagePasskeysMfaWidgetView.js';
@@ -114,18 +117,22 @@ import '../../ReceiveWalletFunds/ReceiveWalletFunds.js';
114
117
  import '../../../../../store/state/tokenBalances.js';
115
118
  import '../../../../../store/state/multichainBalances.js';
116
119
  import '../../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
120
+ import { useIsMfaRequiredForAction } from '../../../../../utils/hooks/useIsMfaRequiredForAction/useIsMfaRequiredForAction.js';
117
121
  import { useInternalDynamicContext } from '../../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
118
122
 
119
123
  const EmbeddedWalletExportSection = () => {
120
124
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
121
125
  const { t } = useTranslation();
122
- const { theme } = useThemeContext();
126
+ const { setDynamicWidgetView } = useWidgetContext();
123
127
  const { primaryWallet, user, projectSettings, setShowAuthFlow } = useInternalDynamicContext();
124
128
  const { pushView } = useViewContext();
125
129
  const { getEOAWallet } = useSmartWallets();
130
+ const { setPassword } = useWalletPassword();
131
+ const isPasswordEncrypted = useIsPasswordEncrypted();
126
132
  const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery();
127
133
  const { initExportProcess } = useEmbeddedReveal();
128
- const { isStepUpRequired, promptStepUpAuth } = useStepUpAuthentication();
134
+ const { isStepUpRequired, promptMfa, promptStepUpAuth } = useStepUpAuthentication();
135
+ const isMfaRequiredForAction = useIsMfaRequiredForAction();
129
136
  const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
130
137
  const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
131
138
  const isEmbeddedWallet = Boolean(wallet &&
@@ -137,8 +144,34 @@ const EmbeddedWalletExportSection = () => {
137
144
  const isSessionKeyCompatible = (primaryWallet && isSessionKeyCompatibleWallet(primaryWallet)) ||
138
145
  (eoaWallet && isSessionKeyCompatibleWallet(eoaWallet));
139
146
  const isV3WaasWallet = Boolean(wallet && ((_h = (_g = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _g === void 0 ? void 0 : _g.key) === null || _h === void 0 ? void 0 : _h.startsWith('dynamicwaas')));
147
+ const shouldShowPasswordSetup = isV3WaasWallet;
148
+ const handlePasscodeClick = useCallback(() => {
149
+ setDynamicWidgetView('setup-password', {
150
+ onComplete: (password) => __awaiter(void 0, void 0, void 0, function* () {
151
+ if (!(wallet === null || wallet === void 0 ? void 0 : wallet.address) || !(wallet === null || wallet === void 0 ? void 0 : wallet.chain)) {
152
+ logger.error('No wallet address or chain available for password setup');
153
+ return;
154
+ }
155
+ yield setPassword({
156
+ accountAddress: wallet.address,
157
+ chainName: wallet.chain,
158
+ newPassword: password,
159
+ });
160
+ }),
161
+ });
162
+ }, [setDynamicWidgetView, wallet, setPassword]);
163
+ const handleResetPasswordClick = useCallback(() => {
164
+ setShowAuthFlow(true, {
165
+ ignoreIfIsEmbeddedWidget: false,
166
+ performMultiWalletChecks: false,
167
+ });
168
+ pushView('reset-password-flow');
169
+ }, [setShowAuthFlow, pushView]);
140
170
  const handleExportClick = useCallback((recoveryPhrase) => __awaiter(void 0, void 0, void 0, function* () {
141
- if (isStepUpRequired({ scope: TokenScope.Walletexport })) {
171
+ const stepUpRequired = yield isStepUpRequired({
172
+ scope: TokenScope.Walletexport,
173
+ });
174
+ if (stepUpRequired) {
142
175
  try {
143
176
  yield promptStepUpAuth({
144
177
  requestedScopes: [TokenScope.Walletexport],
@@ -148,6 +181,19 @@ const EmbeddedWalletExportSection = () => {
148
181
  return;
149
182
  }
150
183
  }
184
+ else {
185
+ const isMfaRequired = yield isMfaRequiredForAction({
186
+ mfaAction: MFAAction.WalletWaasExport,
187
+ });
188
+ if (isMfaRequired) {
189
+ try {
190
+ yield promptMfa({ createMfaToken: true });
191
+ }
192
+ catch (_m) {
193
+ return;
194
+ }
195
+ }
196
+ }
151
197
  if (!isSessionKeyCompatible) {
152
198
  if (yield shouldInitRecovery()) {
153
199
  yield initPasskeyRecoveryProcess(undefined, {
@@ -159,6 +205,8 @@ const EmbeddedWalletExportSection = () => {
159
205
  }), [
160
206
  isStepUpRequired,
161
207
  promptStepUpAuth,
208
+ isMfaRequiredForAction,
209
+ promptMfa,
162
210
  shouldInitRecovery,
163
211
  initPasskeyRecoveryProcess,
164
212
  initExportProcess,
@@ -168,7 +216,7 @@ const EmbeddedWalletExportSection = () => {
168
216
  handleExportClick();
169
217
  }, [handleExportClick]);
170
218
  const handleExportWithPhraseClick = useCallback(() => handleExportClick(true), [handleExportClick]);
171
- const exportIconClasses = useMemo(() => `settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}`, [theme.theme.name]);
219
+ const exportIconClasses = 'settings-view__body__section__button__icon';
172
220
  const backupOptions = (_k = (_j = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _j === void 0 ? void 0 : _j.waas) === null || _k === void 0 ? void 0 : _k.backupOptions;
173
221
  const isCloudBackupEnabled = Boolean((backupOptions === null || backupOptions === void 0 ? void 0 : backupOptions.includes(WaasBackupOptionsEnum.GoogleDrive)) ||
174
222
  (backupOptions === null || backupOptions === void 0 ? void 0 : backupOptions.includes(WaasBackupOptionsEnum.ICloud)));
@@ -190,7 +238,13 @@ const EmbeddedWalletExportSection = () => {
190
238
  if (!isEmbeddedWallet) {
191
239
  return null;
192
240
  }
193
- return (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: jsx(Typography, { copykey: 'dyn_settings.export_section.title', color: 'secondary', weight: 'medium', children: t('dyn_settings.export_section.title') }) }), jsx(TypographyButton, { dataTestId: 'embedded-reveal-account-button', onClick: handleExportButtonClick, buttonClassName: 'settings-view__body__section__button', startSlot: exportButtonStartSlot, endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && !isV3WaasWallet && (jsx(TypographyButton, { dataTestId: 'embedded-reveal-button', onClick: handleExportWithPhraseClick, buttonClassName: 'settings-view__body__section__button', startSlot: recoveryPhraseButtonStartSlot, endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false })), shouldShowBackupOption && (jsx(TypographyButton, { dataTestId: 'backup-button', onClick: handleBackupClick, buttonClassName: 'settings-view__body__section__button', startSlot:
241
+ return (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: jsx(Typography, { copykey: 'dyn_settings.wallet_security_section.title', color: 'secondary', weight: 'medium', children: t('dyn_settings.wallet_security_section.title') }) }), shouldShowPasswordSetup && (jsx(TypographyButton, { dataTestId: 'password-setup-button', onClick: isPasswordEncrypted ? handleResetPasswordClick : handlePasscodeClick, buttonClassName: 'settings-view__body__section__button', startSlot:
242
+ // eslint-disable-next-line react/jsx-wrap-multilines
243
+ 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: isPasswordEncrypted
244
+ ? 'dyn_settings.account_security.password.reset_button'
245
+ : 'dyn_settings.account_security.password.set_button', children: isPasswordEncrypted
246
+ ? t('dyn_settings.account_security.password.reset_button')
247
+ : t('dyn_settings.account_security.password.set_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false })), jsx(TypographyButton, { dataTestId: 'embedded-reveal-account-button', onClick: handleExportButtonClick, buttonClassName: 'settings-view__body__section__button', startSlot: exportButtonStartSlot, endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && !isV3WaasWallet && (jsx(TypographyButton, { dataTestId: 'embedded-reveal-button', onClick: handleExportWithPhraseClick, buttonClassName: 'settings-view__body__section__button', startSlot: recoveryPhraseButtonStartSlot, endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false })), shouldShowBackupOption && (jsx(TypographyButton, { dataTestId: 'backup-button', onClick: handleBackupClick, buttonClassName: 'settings-view__body__section__button', startSlot:
194
248
  // eslint-disable-next-line react/jsx-wrap-multilines
195
249
  jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgBackupArrow, { className: exportIconClasses }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.backup_button', children: t('dyn_settings.export_section.backup_button') })] }), endSlot: areAllWalletsBackedUp ? (jsx(Badge, { variant: 'primary', text: t('dyn_waas.backup.backed_up'), copykey: 'dyn_waas.backup.backed_up' })) : (jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' })), showInternalLoading: false }))] }));
196
250
  };
@@ -3,28 +3,29 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var _tslib = require('../../../../../../../_virtual/_tslib.cjs');
7
6
  var jsxRuntime = require('react/jsx-runtime');
8
7
  var React = require('react');
9
8
  var reactI18next = require('react-i18next');
10
9
  var Typography = require('../../../../../components/Typography/Typography.cjs');
11
10
  var TypographyButton = require('../../../../../components/TypographyButton/TypographyButton.cjs');
12
- require('../../../../../context/DynamicContext/DynamicContext.cjs');
13
- require('../../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
14
- require('@dynamic-labs/iconic');
15
- require('@dynamic-labs/wallet-connector-core');
16
11
  var chevronLeft = require('../../../../../shared/assets/chevron-left.cjs');
17
12
  var faceId = require('../../../../../shared/assets/face-id.cjs');
18
13
  var lock = require('../../../../../shared/assets/lock.cjs');
19
- var ViewContext = require('../../../../../context/ViewContext/ViewContext.cjs');
20
- var logger = require('../../../../../shared/logger.cjs');
21
- require('@dynamic-labs/wallet-book');
14
+ require('@dynamic-labs/iconic');
15
+ require('../../../../../context/ViewContext/ViewContext.cjs');
16
+ require('../../../../../events/dynamicEvents.cjs');
17
+ require('../../../../../../../_virtual/_tslib.cjs');
22
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
+ require('../../../../../shared/logger.cjs');
23
+ require('@dynamic-labs/wallet-book');
23
24
  require('../../../../../utils/constants/colors.cjs');
24
25
  require('../../../../../utils/constants/values.cjs');
25
26
  require('@dynamic-labs/sdk-api-core');
26
27
  require('../../../../../shared/consts/index.cjs');
27
- require('../../../../../events/dynamicEvents.cjs');
28
+ require('../../../../../store/state/authMode/authMode.cjs');
28
29
  require('../../../../../context/CaptchaContext/CaptchaContext.cjs');
29
30
  require('../../../../../context/ErrorContext/ErrorContext.cjs');
30
31
  require('@dynamic-labs/multi-wallet');
@@ -42,13 +43,11 @@ require('../../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTy
42
43
  require('../../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
43
44
  require('../../../../../context/AccountExistsContext/AccountExistsContext.cjs');
44
45
  require('../../../../../context/UserWalletsContext/UserWalletsContext.cjs');
45
- require('../../../../../store/state/authMode/authMode.cjs');
46
46
  require('../../../../../context/VerificationContext/VerificationContext.cjs');
47
47
  require('react-dom');
48
48
  require('../../../../../utils/functions/compareChains/compareChains.cjs');
49
49
  require('../../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
50
50
  require('../../../../../context/ThemeContext/ThemeContext.cjs');
51
- var useSmartWallets = require('../../../../../utils/hooks/useSmartWallets/useSmartWallets.cjs');
52
51
  require('../../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
53
52
  require('bs58');
54
53
  require('@dynamic-labs/types');
@@ -98,7 +97,6 @@ require('../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs
98
97
  require('../../../../../context/FooterAnimationContext/index.cjs');
99
98
  require('../../../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
100
99
  require('../../../../../context/PasskeyContext/PasskeyContext.cjs');
101
- var useWalletPassword = require('../../../../../utils/hooks/useWalletPassword/useWalletPassword.cjs');
102
100
  require('../../../../../context/OnrampContext/OnrampContext.cjs');
103
101
  require('../../../../../store/state/sendBalances.cjs');
104
102
  require('../../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
@@ -106,7 +104,6 @@ require('../../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCard
106
104
  require('../../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
107
105
  require('../../../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
108
106
  require('../../../components/PasskeyCard/PasskeyCard.cjs');
109
- var useIsPasswordEncrypted = require('../../../../../utils/hooks/useIsPasswordEncrypted/useIsPasswordEncrypted.cjs');
110
107
  require('../../CryptoComOnramp/CryptoComOnramp.cjs');
111
108
  require('../../../../../../index.cjs');
112
109
  require('../../ManagePasskeysMfaWidgetView/ManagePasskeysMfaWidgetView.cjs');
@@ -118,60 +115,21 @@ require('../../../../../store/state/tokenBalances.cjs');
118
115
  require('../../../../../store/state/multichainBalances.cjs');
119
116
  require('../../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
120
117
  var useIsPasskeysMfaEnabled = require('../../../../../utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.cjs');
121
- var useInternalDynamicContext = require('../../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
122
118
 
123
119
  const MfaSection = ({ isLoading }) => {
124
- var _a, _b;
125
120
  const { t } = reactI18next.useTranslation();
126
121
  const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
127
- const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
128
- const { pushView } = ViewContext.useViewContext();
129
- const { getEOAWallet } = useSmartWallets.useSmartWallets();
130
- const { setPassword } = useWalletPassword.useWalletPassword();
131
- const isPasswordEncrypted = useIsPasswordEncrypted.useIsPasswordEncrypted();
132
122
  const isMfaEnabled = useIsMfaEnabled.useIsMfaEnabled();
133
123
  const isTotpMfaEnabled = useIsTotpMfaEnabled.useIsTotpMfaEnabled();
134
124
  const isPasskeyMfaEnabled = useIsPasskeysMfaEnabled.useIsPasskeysMfaEnabled();
135
- const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
136
- const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
137
- 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')));
138
- const shouldShowPasswordSetup = isWaasWallet;
139
125
  const handleTotpMfaClick = React.useCallback(() => setDynamicWidgetView('manage-totp-mfa'), [setDynamicWidgetView]);
140
126
  const handlePasskeyMfaClick = React.useCallback(() => setDynamicWidgetView('manage-passkeys-mfa'), [setDynamicWidgetView]);
141
- const handlePasscodeClick = React.useCallback(() => {
142
- setDynamicWidgetView('setup-password', {
143
- onComplete: (password) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
144
- if (!(wallet === null || wallet === void 0 ? void 0 : wallet.address) || !(wallet === null || wallet === void 0 ? void 0 : wallet.chain)) {
145
- logger.logger.error('No wallet address or chain available for password setup');
146
- return;
147
- }
148
- yield setPassword({
149
- accountAddress: wallet.address,
150
- chainName: wallet.chain,
151
- newPassword: password,
152
- });
153
- }),
154
- });
155
- }, [setDynamicWidgetView, wallet, setPassword]);
156
- const handleResetPasswordClick = React.useCallback(() => {
157
- setShowAuthFlow(true, {
158
- ignoreIfIsEmbeddedWidget: false,
159
- performMultiWalletChecks: false,
160
- });
161
- pushView('reset-password-flow');
162
- }, [setShowAuthFlow, pushView]);
163
- if (!isMfaEnabled && !isWaasWallet) {
127
+ if (!isMfaEnabled) {
164
128
  return null;
165
129
  }
166
130
  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:
167
131
  // eslint-disable-next-line react/jsx-wrap-multilines
168
- 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: isPasswordEncrypted ? handleResetPasswordClick : handlePasscodeClick, buttonClassName: 'settings-view__body__section__button', startSlot:
169
- // eslint-disable-next-line react/jsx-wrap-multilines
170
- 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: isPasswordEncrypted
171
- ? 'dyn_settings.account_security.password.reset_button'
172
- : 'dyn_settings.account_security.password.set_button', children: isPasswordEncrypted
173
- ? t('dyn_settings.account_security.password.reset_button')
174
- : 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:
132
+ 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:
175
133
  // eslint-disable-next-line react/jsx-wrap-multilines
176
134
  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 }))] }));
177
135
  };
@@ -1,26 +1,27 @@
1
1
  'use client'
2
- import { __awaiter } from '../../../../../../../_virtual/_tslib.js';
3
2
  import { jsxs, jsx } from 'react/jsx-runtime';
4
3
  import { useCallback } from 'react';
5
4
  import { useTranslation } from 'react-i18next';
6
5
  import { Typography } from '../../../../../components/Typography/Typography.js';
7
6
  import { TypographyButton } from '../../../../../components/TypographyButton/TypographyButton.js';
8
- import '../../../../../context/DynamicContext/DynamicContext.js';
9
- import '../../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
10
- import '@dynamic-labs/iconic';
11
- import '@dynamic-labs/wallet-connector-core';
12
7
  import { ReactComponent as SvgChevronLeft } from '../../../../../shared/assets/chevron-left.js';
13
8
  import { ReactComponent as SvgFaceId } from '../../../../../shared/assets/face-id.js';
14
9
  import { ReactComponent as SvgLock } from '../../../../../shared/assets/lock.js';
15
- import { useViewContext } from '../../../../../context/ViewContext/ViewContext.js';
16
- import { logger } from '../../../../../shared/logger.js';
17
- import '@dynamic-labs/wallet-book';
10
+ import '@dynamic-labs/iconic';
11
+ import '../../../../../context/ViewContext/ViewContext.js';
12
+ import '../../../../../events/dynamicEvents.js';
13
+ import '../../../../../../../_virtual/_tslib.js';
18
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
+ import '../../../../../shared/logger.js';
19
+ import '@dynamic-labs/wallet-book';
19
20
  import '../../../../../utils/constants/colors.js';
20
21
  import '../../../../../utils/constants/values.js';
21
22
  import '@dynamic-labs/sdk-api-core';
22
23
  import '../../../../../shared/consts/index.js';
23
- import '../../../../../events/dynamicEvents.js';
24
+ import '../../../../../store/state/authMode/authMode.js';
24
25
  import '../../../../../context/CaptchaContext/CaptchaContext.js';
25
26
  import '../../../../../context/ErrorContext/ErrorContext.js';
26
27
  import '@dynamic-labs/multi-wallet';
@@ -38,13 +39,11 @@ import '../../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTyp
38
39
  import '../../../../../context/AccessDeniedContext/AccessDeniedContext.js';
39
40
  import '../../../../../context/AccountExistsContext/AccountExistsContext.js';
40
41
  import '../../../../../context/UserWalletsContext/UserWalletsContext.js';
41
- import '../../../../../store/state/authMode/authMode.js';
42
42
  import '../../../../../context/VerificationContext/VerificationContext.js';
43
43
  import 'react-dom';
44
44
  import '../../../../../utils/functions/compareChains/compareChains.js';
45
45
  import '../../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
46
46
  import '../../../../../context/ThemeContext/ThemeContext.js';
47
- import { useSmartWallets } from '../../../../../utils/hooks/useSmartWallets/useSmartWallets.js';
48
47
  import '../../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
49
48
  import 'bs58';
50
49
  import '@dynamic-labs/types';
@@ -94,7 +93,6 @@ import '../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
94
93
  import '../../../../../context/FooterAnimationContext/index.js';
95
94
  import '../../../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
96
95
  import '../../../../../context/PasskeyContext/PasskeyContext.js';
97
- import { useWalletPassword } from '../../../../../utils/hooks/useWalletPassword/useWalletPassword.js';
98
96
  import '../../../../../context/OnrampContext/OnrampContext.js';
99
97
  import '../../../../../store/state/sendBalances.js';
100
98
  import '../../../../../store/state/connectorsInitializing/connectorsInitializing.js';
@@ -102,7 +100,6 @@ import '../../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardT
102
100
  import '../../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
103
101
  import '../../../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
104
102
  import '../../../components/PasskeyCard/PasskeyCard.js';
105
- import { useIsPasswordEncrypted } from '../../../../../utils/hooks/useIsPasswordEncrypted/useIsPasswordEncrypted.js';
106
103
  import '../../CryptoComOnramp/CryptoComOnramp.js';
107
104
  import '../../../../../../index.js';
108
105
  import '../../ManagePasskeysMfaWidgetView/ManagePasskeysMfaWidgetView.js';
@@ -114,60 +111,21 @@ import '../../../../../store/state/tokenBalances.js';
114
111
  import '../../../../../store/state/multichainBalances.js';
115
112
  import '../../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
116
113
  import { useIsPasskeysMfaEnabled } from '../../../../../utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.js';
117
- import { useInternalDynamicContext } from '../../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
118
114
 
119
115
  const MfaSection = ({ isLoading }) => {
120
- var _a, _b;
121
116
  const { t } = useTranslation();
122
117
  const { setDynamicWidgetView } = useWidgetContext();
123
- const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext();
124
- const { pushView } = useViewContext();
125
- const { getEOAWallet } = useSmartWallets();
126
- const { setPassword } = useWalletPassword();
127
- const isPasswordEncrypted = useIsPasswordEncrypted();
128
118
  const isMfaEnabled = useIsMfaEnabled();
129
119
  const isTotpMfaEnabled = useIsTotpMfaEnabled();
130
120
  const isPasskeyMfaEnabled = useIsPasskeysMfaEnabled();
131
- const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
132
- const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
133
- 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')));
134
- const shouldShowPasswordSetup = isWaasWallet;
135
121
  const handleTotpMfaClick = useCallback(() => setDynamicWidgetView('manage-totp-mfa'), [setDynamicWidgetView]);
136
122
  const handlePasskeyMfaClick = useCallback(() => setDynamicWidgetView('manage-passkeys-mfa'), [setDynamicWidgetView]);
137
- const handlePasscodeClick = useCallback(() => {
138
- setDynamicWidgetView('setup-password', {
139
- onComplete: (password) => __awaiter(void 0, void 0, void 0, function* () {
140
- if (!(wallet === null || wallet === void 0 ? void 0 : wallet.address) || !(wallet === null || wallet === void 0 ? void 0 : wallet.chain)) {
141
- logger.error('No wallet address or chain available for password setup');
142
- return;
143
- }
144
- yield setPassword({
145
- accountAddress: wallet.address,
146
- chainName: wallet.chain,
147
- newPassword: password,
148
- });
149
- }),
150
- });
151
- }, [setDynamicWidgetView, wallet, setPassword]);
152
- const handleResetPasswordClick = useCallback(() => {
153
- setShowAuthFlow(true, {
154
- ignoreIfIsEmbeddedWidget: false,
155
- performMultiWalletChecks: false,
156
- });
157
- pushView('reset-password-flow');
158
- }, [setShowAuthFlow, pushView]);
159
- if (!isMfaEnabled && !isWaasWallet) {
123
+ if (!isMfaEnabled) {
160
124
  return null;
161
125
  }
162
126
  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:
163
127
  // eslint-disable-next-line react/jsx-wrap-multilines
164
- 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: isPasswordEncrypted ? handleResetPasswordClick : handlePasscodeClick, buttonClassName: 'settings-view__body__section__button', startSlot:
165
- // eslint-disable-next-line react/jsx-wrap-multilines
166
- 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: isPasswordEncrypted
167
- ? 'dyn_settings.account_security.password.reset_button'
168
- : 'dyn_settings.account_security.password.set_button', children: isPasswordEncrypted
169
- ? t('dyn_settings.account_security.password.reset_button')
170
- : 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:
128
+ 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:
171
129
  // eslint-disable-next-line react/jsx-wrap-multilines
172
130
  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 }))] }));
173
131
  };
@@ -127,7 +127,7 @@ const EditProfileView = ({ rootClassName, }) => {
127
127
  const hasPhoneChange = formValues.phoneNumber !== undefined &&
128
128
  formValues.phoneNumber !== (user === null || user === void 0 ? void 0 : user.phoneNumber);
129
129
  if ((hasEmailChange || hasPhoneChange) &&
130
- isStepUpRequired({ scope: sdkApiCore.TokenScope.Credentiallink })) {
130
+ (yield isStepUpRequired({ scope: sdkApiCore.TokenScope.Credentiallink }))) {
131
131
  try {
132
132
  yield promptStepUpAuth({
133
133
  requestedScopes: [sdkApiCore.TokenScope.Credentiallink],
@@ -123,7 +123,7 @@ const EditProfileView = ({ rootClassName, }) => {
123
123
  const hasPhoneChange = formValues.phoneNumber !== undefined &&
124
124
  formValues.phoneNumber !== (user === null || user === void 0 ? void 0 : user.phoneNumber);
125
125
  if ((hasEmailChange || hasPhoneChange) &&
126
- isStepUpRequired({ scope: TokenScope.Credentiallink })) {
126
+ (yield isStepUpRequired({ scope: TokenScope.Credentiallink }))) {
127
127
  try {
128
128
  yield promptStepUpAuth({
129
129
  requestedScopes: [TokenScope.Credentiallink],
@@ -49,7 +49,7 @@ require('../../../../context/VerificationContext/VerificationContext.cjs');
49
49
  require('react-dom');
50
50
  require('../../../../utils/functions/compareChains/compareChains.cjs');
51
51
  require('../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
52
- var ThemeContext = require('../../../../context/ThemeContext/ThemeContext.cjs');
52
+ require('../../../../context/ThemeContext/ThemeContext.cjs');
53
53
  var useSmartWallets = require('../../../../utils/hooks/useSmartWallets/useSmartWallets.cjs');
54
54
  require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
55
55
  var usePasskeyRecovery = require('../../../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs');
@@ -122,7 +122,6 @@ var useInternalDynamicContext = require('../../../../context/DynamicContext/useD
122
122
  const ExportAndRecoveryView = () => {
123
123
  var _a, _b;
124
124
  const { t } = reactI18next.useTranslation();
125
- const { theme } = ThemeContext.useThemeContext();
126
125
  const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
127
126
  const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
128
127
  const { pushView } = ViewContext.useViewContext();
@@ -163,7 +162,7 @@ const ExportAndRecoveryView = () => {
163
162
  pushView('export-shares-view');
164
163
  }
165
164
  }, [isPasswordEncrypted, setDynamicWidgetView, setShowAuthFlow, pushView]);
166
- const exportIconClasses = React.useMemo(() => `settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}`, [theme.theme.name]);
165
+ const exportIconClasses = 'settings-view__body__section__button__icon';
167
166
  const privateKeyButtonStartSlot = 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: 'dyn_export_and_recovery.private_key', children: t('dyn_export_and_recovery.private_key') })] })), [exportIconClasses, t]);
168
167
  const exportSharesButtonStartSlot = React.useMemo(() => (jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(exportRecoveryPhrase.ReactComponent, { className: exportIconClasses }), jsxRuntime.jsxs("div", { className: 'export-and-recovery-view__export-shares-label', children: [jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_export_and_recovery.export_shares', children: t('dyn_export_and_recovery.export_shares') }), jsxRuntime.jsx("span", { className: 'export-and-recovery-view__advanced-badge', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'inherit', weight: 'medium', copykey: 'dyn_export_and_recovery.advanced', children: t('dyn_export_and_recovery.advanced') }) })] })] })), [exportIconClasses, t]);
169
168
  const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
@@ -45,7 +45,7 @@ import '../../../../context/VerificationContext/VerificationContext.js';
45
45
  import 'react-dom';
46
46
  import '../../../../utils/functions/compareChains/compareChains.js';
47
47
  import '../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
48
- import { useThemeContext } from '../../../../context/ThemeContext/ThemeContext.js';
48
+ import '../../../../context/ThemeContext/ThemeContext.js';
49
49
  import { useSmartWallets } from '../../../../utils/hooks/useSmartWallets/useSmartWallets.js';
50
50
  import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
51
51
  import { usePasskeyRecovery } from '../../../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js';
@@ -118,7 +118,6 @@ import { useInternalDynamicContext } from '../../../../context/DynamicContext/us
118
118
  const ExportAndRecoveryView = () => {
119
119
  var _a, _b;
120
120
  const { t } = useTranslation();
121
- const { theme } = useThemeContext();
122
121
  const { setDynamicWidgetView } = useWidgetContext();
123
122
  const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext();
124
123
  const { pushView } = useViewContext();
@@ -159,7 +158,7 @@ const ExportAndRecoveryView = () => {
159
158
  pushView('export-shares-view');
160
159
  }
161
160
  }, [isPasswordEncrypted, setDynamicWidgetView, setShowAuthFlow, pushView]);
162
- const exportIconClasses = useMemo(() => `settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}`, [theme.theme.name]);
161
+ const exportIconClasses = 'settings-view__body__section__button__icon';
163
162
  const privateKeyButtonStartSlot = useMemo(() => (jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgExportPrivateKey, { className: exportIconClasses }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_export_and_recovery.private_key', children: t('dyn_export_and_recovery.private_key') })] })), [exportIconClasses, t]);
164
163
  const exportSharesButtonStartSlot = useMemo(() => (jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgExportRecoveryPhrase, { className: exportIconClasses }), jsxs("div", { className: 'export-and-recovery-view__export-shares-label', children: [jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_export_and_recovery.export_shares', children: t('dyn_export_and_recovery.export_shares') }), jsx("span", { className: 'export-and-recovery-view__advanced-badge', children: jsx(Typography, { variant: 'body_small', color: 'inherit', weight: 'medium', copykey: 'dyn_export_and_recovery.advanced', children: t('dyn_export_and_recovery.advanced') }) })] })] })), [exportIconClasses, t]);
165
164
  const backButton = (jsx(IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
@@ -150,7 +150,7 @@ const ManagePasskeysMfaWidgetView = () => {
150
150
  return passkeys.map((passkey) => (jsxRuntime.jsx(PasskeyCard.PasskeyCard, { passkey: passkey, onUpdate: retrigger }, passkey.id)));
151
151
  };
152
152
  return (jsxRuntime.jsxs("div", { className: 'manage-totp-mfa-widget-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx("div", { className: 'send-balance-page-layout__header-content', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_manage_passkeys_mfa.title', children: t('dyn_manage_passkeys_mfa.title') }) }) }), jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', messageKey: registerPasskeyError ? errorMessage : undefined, className: 'manage-totp-mfa-widget-view__header-banner' }), jsxRuntime.jsx("div", { className: 'manage-totp-mfa-widget-view__scroll-container', children: getPasskeysContent() }), jsxRuntime.jsx("div", { className: 'manage-totp-mfa-widget-view__add-mfa-button-container', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'manage-totp-mfa-widget-view__add-mfa-button-container__button', onClick: () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
153
- if (isStepUpRequired({ scope: CREDENTIAL_LINK_SCOPE })) {
153
+ if (yield isStepUpRequired({ scope: CREDENTIAL_LINK_SCOPE })) {
154
154
  try {
155
155
  yield promptStepUpAuth({
156
156
  requestedScopes: [CREDENTIAL_LINK_SCOPE],
@@ -146,7 +146,7 @@ const ManagePasskeysMfaWidgetView = () => {
146
146
  return passkeys.map((passkey) => (jsx(PasskeyCard, { passkey: passkey, onUpdate: retrigger }, passkey.id)));
147
147
  };
148
148
  return (jsxs("div", { className: 'manage-totp-mfa-widget-view', children: [jsx(ModalHeader, { leading: backButton, children: jsx("div", { className: 'send-balance-page-layout__header-content', children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_manage_passkeys_mfa.title', children: t('dyn_manage_passkeys_mfa.title') }) }) }), jsx(ModalHeaderBanner, { type: 'error', messageKey: registerPasskeyError ? errorMessage : undefined, className: 'manage-totp-mfa-widget-view__header-banner' }), jsx("div", { className: 'manage-totp-mfa-widget-view__scroll-container', children: getPasskeysContent() }), jsx("div", { className: 'manage-totp-mfa-widget-view__add-mfa-button-container', children: jsx(TypographyButton, { buttonClassName: 'manage-totp-mfa-widget-view__add-mfa-button-container__button', onClick: () => __awaiter(void 0, void 0, void 0, function* () {
149
- if (isStepUpRequired({ scope: CREDENTIAL_LINK_SCOPE })) {
149
+ if (yield isStepUpRequired({ scope: CREDENTIAL_LINK_SCOPE })) {
150
150
  try {
151
151
  yield promptStepUpAuth({
152
152
  requestedScopes: [CREDENTIAL_LINK_SCOPE],
@@ -158,7 +158,7 @@ const ManageTotpMfaWidgetView = () => {
158
158
  }));
159
159
  // delete device — use elevated token if step-up is available, else fall back to OTP flow
160
160
  const deleteDevice = (id) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
161
- if (isStepUpRequired({ scope: MFA_DEVICE_DELETE_SCOPE })) {
161
+ if (yield isStepUpRequired({ scope: MFA_DEVICE_DELETE_SCOPE })) {
162
162
  try {
163
163
  yield promptStepUpAuth({ requestedScopes: [MFA_DEVICE_DELETE_SCOPE] });
164
164
  }
@@ -184,7 +184,7 @@ const ManageTotpMfaWidgetView = () => {
184
184
  clearStackAndPush('mfa-display-backup-codes', { regenerateCodes: true });
185
185
  });
186
186
  return (jsxRuntime.jsxs("div", { className: 'manage-totp-mfa-widget-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx("div", { className: 'send-balance-page-layout__header-content', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_manage_mfa.title', children: t('dyn_manage_mfa.title') }) }) }), jsxRuntime.jsxs("div", { className: 'manage-totp-mfa-widget-view__scroll-container', children: [loading && jsxRuntime.jsx(MfaDeviceTileSkeleton.MfaDeviceTileSkeleton, {}), !loading && userDevices.length === 0 && (jsxRuntime.jsx(Typography.Typography, { className: 'manage-totp-mfa-widget-view__no-devices', variant: 'body_normal', color: 'secondary', copykey: 'dyn_manage_mfa.no_devices', children: t('dyn_manage_mfa.no_devices') })), userDevices.map((device, index) => (jsxRuntime.jsx(UserDeviceTile.UserDeviceTile, { isMfaRequired: isMfaRequired, userDevice: device, index: index, deleteDevice: deleteDevice }, device.id)))] }), jsxRuntime.jsx("div", { className: 'manage-totp-mfa-widget-view__add-mfa-button-container', children: userDevices.length > 0 ? (jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'manage-totp-mfa-widget-view__add-mfa-button-container__button', onClick: handleGenerateBackupCodes, copykey: 'dyn_manage_mfa.generate_backup_codes_button', children: t('dyn_manage_mfa.generate_backup_codes_button') })) : (jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'manage-totp-mfa-widget-view__add-mfa-button-container__button', onClick: () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
187
- if (isStepUpRequired({ scope: CREDENTIAL_LINK_SCOPE })) {
187
+ if (yield isStepUpRequired({ scope: CREDENTIAL_LINK_SCOPE })) {
188
188
  try {
189
189
  yield promptStepUpAuth({
190
190
  requestedScopes: [CREDENTIAL_LINK_SCOPE],
@@ -154,7 +154,7 @@ const ManageTotpMfaWidgetView = () => {
154
154
  }));
155
155
  // delete device — use elevated token if step-up is available, else fall back to OTP flow
156
156
  const deleteDevice = (id) => __awaiter(void 0, void 0, void 0, function* () {
157
- if (isStepUpRequired({ scope: MFA_DEVICE_DELETE_SCOPE })) {
157
+ if (yield isStepUpRequired({ scope: MFA_DEVICE_DELETE_SCOPE })) {
158
158
  try {
159
159
  yield promptStepUpAuth({ requestedScopes: [MFA_DEVICE_DELETE_SCOPE] });
160
160
  }
@@ -180,7 +180,7 @@ const ManageTotpMfaWidgetView = () => {
180
180
  clearStackAndPush('mfa-display-backup-codes', { regenerateCodes: true });
181
181
  });
182
182
  return (jsxs("div", { className: 'manage-totp-mfa-widget-view', children: [jsx(ModalHeader, { leading: backButton, children: jsx("div", { className: 'send-balance-page-layout__header-content', children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_manage_mfa.title', children: t('dyn_manage_mfa.title') }) }) }), jsxs("div", { className: 'manage-totp-mfa-widget-view__scroll-container', children: [loading && jsx(MfaDeviceTileSkeleton, {}), !loading && userDevices.length === 0 && (jsx(Typography, { className: 'manage-totp-mfa-widget-view__no-devices', variant: 'body_normal', color: 'secondary', copykey: 'dyn_manage_mfa.no_devices', children: t('dyn_manage_mfa.no_devices') })), userDevices.map((device, index) => (jsx(UserDeviceTile, { isMfaRequired: isMfaRequired, userDevice: device, index: index, deleteDevice: deleteDevice }, device.id)))] }), jsx("div", { className: 'manage-totp-mfa-widget-view__add-mfa-button-container', children: userDevices.length > 0 ? (jsx(TypographyButton, { buttonClassName: 'manage-totp-mfa-widget-view__add-mfa-button-container__button', onClick: handleGenerateBackupCodes, copykey: 'dyn_manage_mfa.generate_backup_codes_button', children: t('dyn_manage_mfa.generate_backup_codes_button') })) : (jsx(TypographyButton, { buttonClassName: 'manage-totp-mfa-widget-view__add-mfa-button-container__button', onClick: () => __awaiter(void 0, void 0, void 0, function* () {
183
- if (isStepUpRequired({ scope: CREDENTIAL_LINK_SCOPE })) {
183
+ if (yield isStepUpRequired({ scope: CREDENTIAL_LINK_SCOPE })) {
184
184
  try {
185
185
  yield promptStepUpAuth({
186
186
  requestedScopes: [CREDENTIAL_LINK_SCOPE],
@@ -1,8 +0,0 @@
1
- 'use client'
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- const clientSessionKeyLogScope = 'client-session-key';
7
-
8
- exports.clientSessionKeyLogScope = clientSessionKeyLogScope;
@@ -1,4 +0,0 @@
1
- 'use client'
2
- const clientSessionKeyLogScope = 'client-session-key';
3
-
4
- export { clientSessionKeyLogScope };