@dynamic-labs/sdk-react-core 4.18.6 → 4.18.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/lib/components/Button/Button.d.ts +1 -1
- package/src/lib/components/ModalHeader/ModalHeader.cjs +2 -1
- package/src/lib/components/ModalHeader/ModalHeader.js +2 -1
- package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +3 -1
- package/src/lib/components/TypographyButton/TypographyButton.cjs +2 -0
- package/src/lib/components/TypographyButton/TypographyButton.js +2 -0
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.cjs +7 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.js +8 -2
- package/src/lib/context/UserWalletsContext/UserWalletsContext.cjs +26 -3
- package/src/lib/context/UserWalletsContext/UserWalletsContext.js +27 -4
- package/src/lib/locale/en/translation.cjs +92 -0
- package/src/lib/locale/en/translation.d.ts +92 -0
- package/src/lib/locale/en/translation.js +92 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/assets/session.cjs +54 -0
- package/src/lib/shared/assets/session.js +30 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/index.d.ts +1 -0
- package/src/lib/utils/functions/isZKSyncEnabled/index.d.ts +1 -0
- package/src/lib/utils/functions/isZKSyncEnabled/isZKSyncEnabled.cjs +11 -0
- package/src/lib/utils/functions/isZKSyncEnabled/isZKSyncEnabled.d.ts +2 -0
- package/src/lib/utils/functions/isZKSyncEnabled/isZKSyncEnabled.js +7 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +2 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +2 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.cjs +92 -4
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.js +92 -4
- package/src/lib/utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs +3 -90
- package/src/lib/utils/hooks/useSubdomainCheck/useSubdomainCheck.js +3 -90
- package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.cjs +1 -3
- package/src/lib/views/UserDeleteAccountView/UserDeleteAccountView.js +1 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +6 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +3 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +6 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +3 -1
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs +5 -1
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.js +6 -2
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/EmptySessionsView.cjs +15 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/EmptySessionsView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/EmptySessionsView.js +11 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/EmptySessionsView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/RevokeAccessView.cjs +37 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/RevokeAccessView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/RevokeAccessView.js +33 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionListItem/SessionListItem.cjs +30 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionListItem/SessionListItem.d.ts +10 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionListItem/SessionListItem.js +26 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionListItem/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.cjs +28 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.js +24 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementInfoView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementView.cjs +56 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementView.d.ts +8 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/SessionManagementView.js +52 -0
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +5 -1
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +5 -1
- package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './isZKSyncEnabled';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
7
|
+
var isProviderEnabled = require('../isProviderEnabled/isProviderEnabled.cjs');
|
|
8
|
+
|
|
9
|
+
const isZKSyncEnabled = (projectSettings) => { var _a; return isProviderEnabled.isProviderEnabled((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _a !== void 0 ? _a : [], sdkApiCore.ProviderEnum.Zksync); };
|
|
10
|
+
|
|
11
|
+
exports.isZKSyncEnabled = isZKSyncEnabled;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { ProviderEnum } from '@dynamic-labs/sdk-api-core';
|
|
3
|
+
import { isProviderEnabled } from '../isProviderEnabled/isProviderEnabled.js';
|
|
4
|
+
|
|
5
|
+
const isZKSyncEnabled = (projectSettings) => { var _a; return isProviderEnabled((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _a !== void 0 ? _a : [], ProviderEnum.Zksync); };
|
|
6
|
+
|
|
7
|
+
export { isZKSyncEnabled };
|
|
@@ -159,6 +159,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
159
159
|
var _b;
|
|
160
160
|
try {
|
|
161
161
|
// Lock the variable that indicates that the login wallet verification is in progress
|
|
162
|
+
// Read UserWalletsContext.tsx explanation for more context
|
|
162
163
|
loadingAndLifecycle.setIsInitialWalletVerificationInProgress(true);
|
|
163
164
|
yield showPendingConnectView.showPendingConnectView(walletConnector, pushView);
|
|
164
165
|
if (walletConnectorCore.isEmailWalletConnector(walletConnector)) {
|
|
@@ -225,6 +226,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
225
226
|
handleWalletVerifyError(err);
|
|
226
227
|
}
|
|
227
228
|
finally {
|
|
229
|
+
// Read UserWalletsContext.tsx explanation for more context
|
|
228
230
|
// This will unlock the variable that indicates "verification in progress"
|
|
229
231
|
// by calling setIsInitialWalletVerificationInProgress(false).
|
|
230
232
|
// However, we do not want to do so immediately, as some routines of wallet verification process
|
|
@@ -155,6 +155,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
155
155
|
var _b;
|
|
156
156
|
try {
|
|
157
157
|
// Lock the variable that indicates that the login wallet verification is in progress
|
|
158
|
+
// Read UserWalletsContext.tsx explanation for more context
|
|
158
159
|
setIsInitialWalletVerificationInProgress(true);
|
|
159
160
|
yield showPendingConnectView(walletConnector, pushView);
|
|
160
161
|
if (isEmailWalletConnector(walletConnector)) {
|
|
@@ -221,6 +222,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
221
222
|
handleWalletVerifyError(err);
|
|
222
223
|
}
|
|
223
224
|
finally {
|
|
225
|
+
// Read UserWalletsContext.tsx explanation for more context
|
|
224
226
|
// This will unlock the variable that indicates "verification in progress"
|
|
225
227
|
// by calling setIsInitialWalletVerificationInProgress(false).
|
|
226
228
|
// However, we do not want to do so immediately, as some routines of wallet verification process
|
|
@@ -3,22 +3,110 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
+
require('react');
|
|
7
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
8
|
+
require('../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
9
|
+
require('@dynamic-labs/sdk-api-core');
|
|
10
|
+
require('../../../../shared/logger.cjs');
|
|
11
|
+
require('@dynamic-labs/iconic');
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
|
+
require('react/jsx-runtime');
|
|
6
14
|
var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
|
|
7
|
-
|
|
8
|
-
var user = require('../../../../store/state/user/user.cjs');
|
|
15
|
+
require('@dynamic-labs/wallet-book');
|
|
9
16
|
require('@dynamic-labs/utils');
|
|
17
|
+
require('../../../constants/colors.cjs');
|
|
10
18
|
require('../../../constants/values.cjs');
|
|
11
|
-
require('
|
|
19
|
+
var hasPendingMfaAction = require('../../../../shared/utils/functions/hasPendingMfaAction/hasPendingMfaAction.cjs');
|
|
20
|
+
require('../../../../shared/consts/index.cjs');
|
|
21
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
22
|
+
require('../../../../../../_virtual/_tslib.cjs');
|
|
23
|
+
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
24
|
+
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
25
|
+
require('@dynamic-labs/multi-wallet');
|
|
26
|
+
require('react-international-phone');
|
|
27
|
+
require('../../../../store/state/nonce/nonce.cjs');
|
|
12
28
|
require('../../../../store/state/projectSettings/projectSettings.cjs');
|
|
29
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
30
|
+
var user = require('../../../../store/state/user/user.cjs');
|
|
31
|
+
require('../../../../locale/locale.cjs');
|
|
32
|
+
require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
33
|
+
require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
34
|
+
require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
35
|
+
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
36
|
+
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
37
|
+
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
38
|
+
require('../../../../store/state/authMode/authMode.cjs');
|
|
39
|
+
require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
40
|
+
require('react-dom');
|
|
41
|
+
require('../../../functions/compareChains/compareChains.cjs');
|
|
42
|
+
require('../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
|
|
43
|
+
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
44
|
+
require('../../useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
45
|
+
require('bs58');
|
|
46
|
+
require('@dynamic-labs/types');
|
|
47
|
+
require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
48
|
+
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
49
|
+
require('../../../../context/WalletContext/WalletContext.cjs');
|
|
50
|
+
require('../../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
51
|
+
require('yup');
|
|
52
|
+
require('../../../../context/MockContext/MockContext.cjs');
|
|
53
|
+
require('../../../../views/CollectUserDataView/useFields.cjs');
|
|
54
|
+
require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
55
|
+
require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
56
|
+
require('@dynamic-labs/rpc-providers');
|
|
57
|
+
require('../../../../store/state/walletOptions/walletOptions.cjs');
|
|
58
|
+
require('react-i18next');
|
|
59
|
+
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
60
|
+
require('../../../../components/Alert/Alert.cjs');
|
|
61
|
+
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
62
|
+
require('../../../../components/IconButton/IconButton.cjs');
|
|
63
|
+
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
64
|
+
require('../../../../components/Input/Input.cjs');
|
|
65
|
+
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
66
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
67
|
+
require('../../../../components/OverlayCard/OverlayCard.cjs');
|
|
68
|
+
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
69
|
+
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
70
|
+
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
71
|
+
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
72
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
73
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
74
|
+
require('react-focus-lock');
|
|
13
75
|
var authViewLayoutChecks = require('../../../constants/authViewLayoutChecks.cjs');
|
|
76
|
+
require('qrcode');
|
|
77
|
+
require('formik');
|
|
78
|
+
require('../../useSubdomainCheck/useSubdomainCheck.cjs');
|
|
79
|
+
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
80
|
+
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
81
|
+
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
82
|
+
require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
83
|
+
require('@hcaptcha/react-hcaptcha');
|
|
84
|
+
require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
85
|
+
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
86
|
+
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
87
|
+
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
88
|
+
require('../../../../store/state/sendBalances.cjs');
|
|
89
|
+
require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
90
|
+
require('../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
91
|
+
require('../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
92
|
+
require('../../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
93
|
+
require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
94
|
+
require('../../../../context/OnrampContext/OnrampContext.cjs');
|
|
95
|
+
require('../../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
96
|
+
require('../../../../../index.cjs');
|
|
97
|
+
require('../../../../store/state/tokenBalances.cjs');
|
|
98
|
+
require('../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
99
|
+
var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
|
|
14
100
|
|
|
15
101
|
const useAllowClose = () => {
|
|
16
102
|
const { view } = ViewContext.useViewContext();
|
|
17
103
|
const user$1 = user.useUserCoalesced();
|
|
104
|
+
const { showAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
18
105
|
const isMfaPreventingClose = user$1 &&
|
|
19
106
|
hasPendingMfaAction.hasPendingMfaAction(user$1) &&
|
|
20
107
|
authViewLayoutChecks.mfaViewsThatPreventModalClose.includes(view.type);
|
|
21
|
-
const allowsClosing = !isMfaPreventingClose &&
|
|
108
|
+
const allowsClosing = !isMfaPreventingClose &&
|
|
109
|
+
(!showAuthFlow || !authViewLayoutChecks.viewsThatPreventModalClose.includes(view.type));
|
|
22
110
|
const showCloseButton = allowsClosing && !authViewLayoutChecks.viewsThatHideCloseButton.includes(view.type);
|
|
23
111
|
return {
|
|
24
112
|
/**
|
|
@@ -1,20 +1,108 @@
|
|
|
1
1
|
'use client'
|
|
2
|
+
import 'react';
|
|
3
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
4
|
+
import '../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
5
|
+
import '@dynamic-labs/sdk-api-core';
|
|
6
|
+
import '../../../../shared/logger.js';
|
|
7
|
+
import '@dynamic-labs/iconic';
|
|
8
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
2
10
|
import { useViewContext } from '../../../../context/ViewContext/ViewContext.js';
|
|
3
|
-
import
|
|
4
|
-
import { useUserCoalesced } from '../../../../store/state/user/user.js';
|
|
11
|
+
import '@dynamic-labs/wallet-book';
|
|
5
12
|
import '@dynamic-labs/utils';
|
|
13
|
+
import '../../../constants/colors.js';
|
|
6
14
|
import '../../../constants/values.js';
|
|
7
|
-
import '
|
|
15
|
+
import { hasPendingMfaAction } from '../../../../shared/utils/functions/hasPendingMfaAction/hasPendingMfaAction.js';
|
|
16
|
+
import '../../../../shared/consts/index.js';
|
|
17
|
+
import '../../../../events/dynamicEvents.js';
|
|
18
|
+
import '../../../../../../_virtual/_tslib.js';
|
|
19
|
+
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
20
|
+
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
21
|
+
import '@dynamic-labs/multi-wallet';
|
|
22
|
+
import 'react-international-phone';
|
|
23
|
+
import '../../../../store/state/nonce/nonce.js';
|
|
8
24
|
import '../../../../store/state/projectSettings/projectSettings.js';
|
|
25
|
+
import '../../../../config/ApiEndpoint.js';
|
|
26
|
+
import { useUserCoalesced } from '../../../../store/state/user/user.js';
|
|
27
|
+
import '../../../../locale/locale.js';
|
|
28
|
+
import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
29
|
+
import '../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
30
|
+
import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
31
|
+
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
32
|
+
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
33
|
+
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
34
|
+
import '../../../../store/state/authMode/authMode.js';
|
|
35
|
+
import '../../../../context/VerificationContext/VerificationContext.js';
|
|
36
|
+
import 'react-dom';
|
|
37
|
+
import '../../../functions/compareChains/compareChains.js';
|
|
38
|
+
import '../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
|
|
39
|
+
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
40
|
+
import '../../useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
41
|
+
import 'bs58';
|
|
42
|
+
import '@dynamic-labs/types';
|
|
43
|
+
import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
44
|
+
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
45
|
+
import '../../../../context/WalletContext/WalletContext.js';
|
|
46
|
+
import '../../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
47
|
+
import 'yup';
|
|
48
|
+
import '../../../../context/MockContext/MockContext.js';
|
|
49
|
+
import '../../../../views/CollectUserDataView/useFields.js';
|
|
50
|
+
import '../../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
51
|
+
import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
52
|
+
import '@dynamic-labs/rpc-providers';
|
|
53
|
+
import '../../../../store/state/walletOptions/walletOptions.js';
|
|
54
|
+
import 'react-i18next';
|
|
55
|
+
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
56
|
+
import '../../../../components/Alert/Alert.js';
|
|
57
|
+
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
58
|
+
import '../../../../components/IconButton/IconButton.js';
|
|
59
|
+
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
60
|
+
import '../../../../components/Input/Input.js';
|
|
61
|
+
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
62
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
63
|
+
import '../../../../components/OverlayCard/OverlayCard.js';
|
|
64
|
+
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
65
|
+
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
66
|
+
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
67
|
+
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
68
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
69
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
70
|
+
import 'react-focus-lock';
|
|
9
71
|
import { mfaViewsThatPreventModalClose, viewsThatPreventModalClose, viewsThatHideCloseButton } from '../../../constants/authViewLayoutChecks.js';
|
|
72
|
+
import 'qrcode';
|
|
73
|
+
import 'formik';
|
|
74
|
+
import '../../useSubdomainCheck/useSubdomainCheck.js';
|
|
75
|
+
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
76
|
+
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
77
|
+
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
78
|
+
import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
79
|
+
import '@hcaptcha/react-hcaptcha';
|
|
80
|
+
import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
81
|
+
import '../../../../context/FooterAnimationContext/index.js';
|
|
82
|
+
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
83
|
+
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
84
|
+
import '../../../../store/state/sendBalances.js';
|
|
85
|
+
import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
86
|
+
import '../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
87
|
+
import '../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
88
|
+
import '../../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
89
|
+
import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
90
|
+
import '../../../../context/OnrampContext/OnrampContext.js';
|
|
91
|
+
import '../../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
92
|
+
import '../../../../../index.js';
|
|
93
|
+
import '../../../../store/state/tokenBalances.js';
|
|
94
|
+
import '../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
95
|
+
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
|
|
10
96
|
|
|
11
97
|
const useAllowClose = () => {
|
|
12
98
|
const { view } = useViewContext();
|
|
13
99
|
const user = useUserCoalesced();
|
|
100
|
+
const { showAuthFlow } = useInternalDynamicContext();
|
|
14
101
|
const isMfaPreventingClose = user &&
|
|
15
102
|
hasPendingMfaAction(user) &&
|
|
16
103
|
mfaViewsThatPreventModalClose.includes(view.type);
|
|
17
|
-
const allowsClosing = !isMfaPreventingClose &&
|
|
104
|
+
const allowsClosing = !isMfaPreventingClose &&
|
|
105
|
+
(!showAuthFlow || !viewsThatPreventModalClose.includes(view.type));
|
|
18
106
|
const showCloseButton = allowsClosing && !viewsThatHideCloseButton.includes(view.type);
|
|
19
107
|
return {
|
|
20
108
|
/**
|
|
@@ -6,95 +6,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
9
|
-
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
10
|
-
require('../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
11
|
-
require('../../../shared/logger.cjs');
|
|
12
|
-
require('@dynamic-labs/iconic');
|
|
13
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
14
|
-
require('react/jsx-runtime');
|
|
15
|
-
require('../../../context/ViewContext/ViewContext.cjs');
|
|
16
|
-
require('@dynamic-labs/wallet-book');
|
|
17
|
-
require('@dynamic-labs/utils');
|
|
18
|
-
require('../../constants/colors.cjs');
|
|
19
|
-
require('../../constants/values.cjs');
|
|
20
|
-
require('../../../shared/consts/index.cjs');
|
|
21
|
-
require('../../../events/dynamicEvents.cjs');
|
|
22
|
-
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
23
|
-
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
24
|
-
require('@dynamic-labs/multi-wallet');
|
|
25
|
-
require('react-international-phone');
|
|
26
|
-
require('../../../store/state/nonce/nonce.cjs');
|
|
27
|
-
require('../../../store/state/projectSettings/projectSettings.cjs');
|
|
28
|
-
require('../../../config/ApiEndpoint.cjs');
|
|
29
|
-
require('../../../store/state/user/user.cjs');
|
|
30
|
-
require('../../../locale/locale.cjs');
|
|
31
9
|
var user = require('../../../data/api/user/user.cjs');
|
|
32
|
-
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
33
|
-
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
34
|
-
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
35
|
-
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
36
|
-
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
37
|
-
require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
38
|
-
require('../../../store/state/authMode/authMode.cjs');
|
|
39
|
-
require('../../../context/VerificationContext/VerificationContext.cjs');
|
|
40
|
-
require('react-dom');
|
|
41
|
-
require('../../functions/compareChains/compareChains.cjs');
|
|
42
|
-
require('../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
|
|
43
|
-
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
44
|
-
require('../useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
45
|
-
require('bs58');
|
|
46
|
-
require('@dynamic-labs/types');
|
|
47
|
-
require('../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
48
|
-
require('../../../context/LoadingContext/LoadingContext.cjs');
|
|
49
|
-
require('../../../context/WalletContext/WalletContext.cjs');
|
|
50
|
-
require('../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
51
|
-
require('yup');
|
|
52
|
-
require('../../../context/MockContext/MockContext.cjs');
|
|
53
|
-
require('../../../views/CollectUserDataView/useFields.cjs');
|
|
54
|
-
require('../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
55
|
-
require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
56
|
-
require('@dynamic-labs/rpc-providers');
|
|
57
|
-
require('../../../store/state/walletOptions/walletOptions.cjs');
|
|
58
|
-
require('react-i18next');
|
|
59
|
-
require('../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
60
|
-
require('../../../components/Alert/Alert.cjs');
|
|
61
|
-
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
62
|
-
require('../../../components/IconButton/IconButton.cjs');
|
|
63
|
-
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
64
|
-
require('../../../components/Input/Input.cjs');
|
|
65
|
-
require('../../../components/IsBrowser/IsBrowser.cjs');
|
|
66
|
-
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
67
|
-
require('../../../components/OverlayCard/OverlayCard.cjs');
|
|
68
|
-
require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
69
|
-
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
70
|
-
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
71
|
-
require('../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
72
|
-
require('../../../components/Popper/Popper/Popper.cjs');
|
|
73
|
-
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
74
|
-
require('react-focus-lock');
|
|
75
|
-
require('qrcode');
|
|
76
|
-
require('formik');
|
|
77
|
-
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
78
|
-
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
79
|
-
require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
80
|
-
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
81
|
-
require('@hcaptcha/react-hcaptcha');
|
|
82
|
-
require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
83
|
-
require('../../../context/FooterAnimationContext/index.cjs');
|
|
84
|
-
require('../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
85
|
-
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
86
|
-
require('../../../store/state/sendBalances.cjs');
|
|
87
|
-
require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
88
|
-
require('../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
89
|
-
require('../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
90
|
-
require('../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
91
|
-
require('../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
92
|
-
require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
93
|
-
require('../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
94
|
-
require('../../../../index.cjs');
|
|
95
|
-
require('../../../store/state/tokenBalances.cjs');
|
|
96
|
-
require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
97
|
-
var useInternalDynamicContext = require('../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
|
|
10
|
+
var dynamicContextProps = require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
98
11
|
|
|
99
12
|
exports.SubdomainCheckResponseError = void 0;
|
|
100
13
|
(function (SubdomainCheckResponseError) {
|
|
@@ -102,9 +15,9 @@ exports.SubdomainCheckResponseError = void 0;
|
|
|
102
15
|
})(exports.SubdomainCheckResponseError || (exports.SubdomainCheckResponseError = {}));
|
|
103
16
|
/** Hook to check if a subdomain is available */
|
|
104
17
|
const useSubdomainCheck = () => {
|
|
105
|
-
const { environmentId } = useInternalDynamicContext.useInternalDynamicContext();
|
|
106
18
|
const checkSubdomain = React.useCallback((_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ subdomain, }) {
|
|
107
19
|
var _b;
|
|
20
|
+
const environmentId = dynamicContextProps.getEnvironmentId();
|
|
108
21
|
const response = yield user.getUserFieldsCheck({
|
|
109
22
|
environmentId,
|
|
110
23
|
filter: {
|
|
@@ -122,7 +35,7 @@ const useSubdomainCheck = () => {
|
|
|
122
35
|
available: (_b = response === null || response === void 0 ? void 0 : response.available) !== null && _b !== void 0 ? _b : false,
|
|
123
36
|
error: undefined,
|
|
124
37
|
};
|
|
125
|
-
}), [
|
|
38
|
+
}), []);
|
|
126
39
|
return checkSubdomain;
|
|
127
40
|
};
|
|
128
41
|
|
|
@@ -2,95 +2,8 @@
|
|
|
2
2
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import { UserFieldsCheckEnum } from '@dynamic-labs/sdk-api-core';
|
|
5
|
-
import '../../../context/DynamicContext/DynamicContext.js';
|
|
6
|
-
import '../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
7
|
-
import '../../../shared/logger.js';
|
|
8
|
-
import '@dynamic-labs/iconic';
|
|
9
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
10
|
-
import 'react/jsx-runtime';
|
|
11
|
-
import '../../../context/ViewContext/ViewContext.js';
|
|
12
|
-
import '@dynamic-labs/wallet-book';
|
|
13
|
-
import '@dynamic-labs/utils';
|
|
14
|
-
import '../../constants/colors.js';
|
|
15
|
-
import '../../constants/values.js';
|
|
16
|
-
import '../../../shared/consts/index.js';
|
|
17
|
-
import '../../../events/dynamicEvents.js';
|
|
18
|
-
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
19
|
-
import '../../../context/ErrorContext/ErrorContext.js';
|
|
20
|
-
import '@dynamic-labs/multi-wallet';
|
|
21
|
-
import 'react-international-phone';
|
|
22
|
-
import '../../../store/state/nonce/nonce.js';
|
|
23
|
-
import '../../../store/state/projectSettings/projectSettings.js';
|
|
24
|
-
import '../../../config/ApiEndpoint.js';
|
|
25
|
-
import '../../../store/state/user/user.js';
|
|
26
|
-
import '../../../locale/locale.js';
|
|
27
5
|
import { getUserFieldsCheck } from '../../../data/api/user/user.js';
|
|
28
|
-
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
29
|
-
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
30
|
-
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
31
|
-
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
32
|
-
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
33
|
-
import '../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
34
|
-
import '../../../store/state/authMode/authMode.js';
|
|
35
|
-
import '../../../context/VerificationContext/VerificationContext.js';
|
|
36
|
-
import 'react-dom';
|
|
37
|
-
import '../../functions/compareChains/compareChains.js';
|
|
38
|
-
import '../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
|
|
39
|
-
import '../../../context/ThemeContext/ThemeContext.js';
|
|
40
|
-
import '../useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
41
|
-
import 'bs58';
|
|
42
|
-
import '@dynamic-labs/types';
|
|
43
|
-
import '../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
44
|
-
import '../../../context/LoadingContext/LoadingContext.js';
|
|
45
|
-
import '../../../context/WalletContext/WalletContext.js';
|
|
46
|
-
import '../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
47
|
-
import 'yup';
|
|
48
|
-
import '../../../context/MockContext/MockContext.js';
|
|
49
|
-
import '../../../views/CollectUserDataView/useFields.js';
|
|
50
|
-
import '../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
51
|
-
import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
52
|
-
import '@dynamic-labs/rpc-providers';
|
|
53
|
-
import '../../../store/state/walletOptions/walletOptions.js';
|
|
54
|
-
import 'react-i18next';
|
|
55
|
-
import '../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
56
|
-
import '../../../components/Alert/Alert.js';
|
|
57
|
-
import '../../../components/ShadowDOM/ShadowDOM.js';
|
|
58
|
-
import '../../../components/IconButton/IconButton.js';
|
|
59
|
-
import '../../../components/InlineWidget/InlineWidget.js';
|
|
60
|
-
import '../../../components/Input/Input.js';
|
|
61
|
-
import '../../../components/IsBrowser/IsBrowser.js';
|
|
62
|
-
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
63
|
-
import '../../../components/OverlayCard/OverlayCard.js';
|
|
64
|
-
import '../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
65
|
-
import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
66
|
-
import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
67
|
-
import '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
68
|
-
import '../../../components/Popper/Popper/Popper.js';
|
|
69
|
-
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
70
|
-
import 'react-focus-lock';
|
|
71
|
-
import 'qrcode';
|
|
72
|
-
import 'formik';
|
|
73
|
-
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
74
|
-
import '../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
75
|
-
import '../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
76
|
-
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
77
|
-
import '@hcaptcha/react-hcaptcha';
|
|
78
|
-
import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
79
|
-
import '../../../context/FooterAnimationContext/index.js';
|
|
80
|
-
import '../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
81
|
-
import '../../../context/PasskeyContext/PasskeyContext.js';
|
|
82
|
-
import '../../../store/state/sendBalances.js';
|
|
83
|
-
import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
84
|
-
import '../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
85
|
-
import '../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
86
|
-
import '../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
87
|
-
import '../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
88
|
-
import '../../../context/OnrampContext/OnrampContext.js';
|
|
89
|
-
import '../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
90
|
-
import '../../../../index.js';
|
|
91
|
-
import '../../../store/state/tokenBalances.js';
|
|
92
|
-
import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
93
|
-
import { useInternalDynamicContext } from '../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
|
|
6
|
+
import { getEnvironmentId } from '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
94
7
|
|
|
95
8
|
var SubdomainCheckResponseError;
|
|
96
9
|
(function (SubdomainCheckResponseError) {
|
|
@@ -98,9 +11,9 @@ var SubdomainCheckResponseError;
|
|
|
98
11
|
})(SubdomainCheckResponseError || (SubdomainCheckResponseError = {}));
|
|
99
12
|
/** Hook to check if a subdomain is available */
|
|
100
13
|
const useSubdomainCheck = () => {
|
|
101
|
-
const { environmentId } = useInternalDynamicContext();
|
|
102
14
|
const checkSubdomain = useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ subdomain, }) {
|
|
103
15
|
var _b;
|
|
16
|
+
const environmentId = getEnvironmentId();
|
|
104
17
|
const response = yield getUserFieldsCheck({
|
|
105
18
|
environmentId,
|
|
106
19
|
filter: {
|
|
@@ -118,7 +31,7 @@ const useSubdomainCheck = () => {
|
|
|
118
31
|
available: (_b = response === null || response === void 0 ? void 0 : response.available) !== null && _b !== void 0 ? _b : false,
|
|
119
32
|
error: undefined,
|
|
120
33
|
};
|
|
121
|
-
}), [
|
|
34
|
+
}), []);
|
|
122
35
|
return checkSubdomain;
|
|
123
36
|
};
|
|
124
37
|
|
|
@@ -125,9 +125,7 @@ const UserDeleteAccountView = () => {
|
|
|
125
125
|
const hasEmbeddedWallet = React.useMemo(() => user === null || user === void 0 ? void 0 : user.verifiedCredentials.some((wallet) => wallet.walletProvider === sdkApiCore.WalletProviderEnum.EmbeddedWallet), [user]);
|
|
126
126
|
return (jsxRuntime.jsx("div", { className: 'delete-account-view', children: jsxRuntime.jsxs("div", { className: 'delete-account-view__content', children: [jsxRuntime.jsx("div", { className: 'warning-section', children: jsxRuntime.jsxs("div", { className: 'warning-icon-container', children: [jsxRuntime.jsx(warningRed.ReactComponent, { className: 'warning-icon' }), jsxRuntime.jsx(exclamation.ReactComponent, { className: 'exclamation-icon' })] }) }), jsxRuntime.jsx("div", { className: 'message-box', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', children: t('dyn_settings.delete_account.description') }) }), jsxRuntime.jsxs("div", { className: 'confirmation-section', children: [jsxRuntime.jsxs("div", { className: 'checkbox-container', children: [jsxRuntime.jsx("input", { type: 'checkbox', checked: isBackupConfirmed, onChange: handleBackupConfirmChange, "data-testid": 'delete-account-checkbox' }), jsxRuntime.jsx(Typography.Typography, { className: 'checkbox-text', variant: 'body_small', children: hasEmbeddedWallet
|
|
127
127
|
? t('dyn_settings.delete_account.backup_confirmation_embedded')
|
|
128
|
-
: t('dyn_settings.delete_account.backup_confirmation_no_embedded') })] }), jsxRuntime.jsxs("div", { className: 'input-section', children: [jsxRuntime.jsx(Typography.Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsxRuntime.jsx(Input.Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxRuntime.jsxs("div", { className: 'button-group', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'delete-button', buttonVariant: '
|
|
129
|
-
color: isDeleteEnabled ? 'white' : 'tertiary',
|
|
130
|
-
}, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
|
|
128
|
+
: t('dyn_settings.delete_account.backup_confirmation_no_embedded') })] }), jsxRuntime.jsxs("div", { className: 'input-section', children: [jsxRuntime.jsx(Typography.Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsxRuntime.jsx(Input.Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxRuntime.jsxs("div", { className: 'button-group', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'danger', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
|
|
131
129
|
? t('dyn_settings.delete_account.deleting')
|
|
132
130
|
: t('dyn_settings.delete_account.confirm') })] })] }) }));
|
|
133
131
|
};
|
|
@@ -121,9 +121,7 @@ const UserDeleteAccountView = () => {
|
|
|
121
121
|
const hasEmbeddedWallet = useMemo(() => user === null || user === void 0 ? void 0 : user.verifiedCredentials.some((wallet) => wallet.walletProvider === WalletProviderEnum.EmbeddedWallet), [user]);
|
|
122
122
|
return (jsx("div", { className: 'delete-account-view', children: jsxs("div", { className: 'delete-account-view__content', children: [jsx("div", { className: 'warning-section', children: jsxs("div", { className: 'warning-icon-container', children: [jsx(SvgWarningRed, { className: 'warning-icon' }), jsx(SvgExclamation, { className: 'exclamation-icon' })] }) }), jsx("div", { className: 'message-box', children: jsx(Typography, { variant: 'body_normal', weight: 'bold', children: t('dyn_settings.delete_account.description') }) }), jsxs("div", { className: 'confirmation-section', children: [jsxs("div", { className: 'checkbox-container', children: [jsx("input", { type: 'checkbox', checked: isBackupConfirmed, onChange: handleBackupConfirmChange, "data-testid": 'delete-account-checkbox' }), jsx(Typography, { className: 'checkbox-text', variant: 'body_small', children: hasEmbeddedWallet
|
|
123
123
|
? t('dyn_settings.delete_account.backup_confirmation_embedded')
|
|
124
|
-
: t('dyn_settings.delete_account.backup_confirmation_no_embedded') })] }), jsxs("div", { className: 'input-section', children: [jsx(Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsx(Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsx(Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxs("div", { className: 'button-group', children: [jsx(TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsx(TypographyButton, { buttonClassName: 'delete-button', buttonVariant: '
|
|
125
|
-
color: isDeleteEnabled ? 'white' : 'tertiary',
|
|
126
|
-
}, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
|
|
124
|
+
: t('dyn_settings.delete_account.backup_confirmation_no_embedded') })] }), jsxs("div", { className: 'input-section', children: [jsx(Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsx(Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsx(Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxs("div", { className: 'button-group', children: [jsx(TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsx(TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'danger', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
|
|
127
125
|
? t('dyn_settings.delete_account.deleting')
|
|
128
126
|
: t('dyn_settings.delete_account.confirm') })] })] }) }));
|
|
129
127
|
};
|
|
@@ -10,6 +10,7 @@ var SendBalanceWidgetView = require('../../views/SendBalanceWidgetView/SendBalan
|
|
|
10
10
|
var ManagePasskeysWidgetView = require('../../views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs');
|
|
11
11
|
var SettingsView = require('../../views/SettingsView/SettingsView.cjs');
|
|
12
12
|
var AccountAndSecuritySettingsView = require('../../views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs');
|
|
13
|
+
var SessionManagementView = require('../../views/SessionManagementView/SessionManagementView.cjs');
|
|
13
14
|
var ChooseLinkedWalletView = require('../../views/ChooseLinkedWalletView/ChooseLinkedWalletView.cjs');
|
|
14
15
|
var ChooseOnrampProviderView = require('../../views/ChooseOnrampProviderView/ChooseOnrampProviderView.cjs');
|
|
15
16
|
var ChooseWalletFundingMethod = require('../../views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.cjs');
|
|
@@ -18,6 +19,8 @@ var DepositView = require('../../views/DepositView/DepositView.cjs');
|
|
|
18
19
|
var GlobalWalletView = require('../../views/GlobalWalletView/GlobalWalletView.cjs');
|
|
19
20
|
var ManageMfaWidgetView = require('../../views/ManageMfaWidgetView/ManageMfaWidgetView.cjs');
|
|
20
21
|
var ReceiveWalletFunds = require('../../views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
22
|
+
var RevokeAccessView = require('../../views/SessionManagementView/RevokeAccessView/RevokeAccessView.cjs');
|
|
23
|
+
var SessionManagementInfoView = require('../../views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.cjs');
|
|
21
24
|
|
|
22
25
|
const mapViewToComponent = {
|
|
23
26
|
'account-and-security-settings': AccountAndSecuritySettingsView.AccountAndSecuritySettingsView,
|
|
@@ -34,6 +37,9 @@ const mapViewToComponent = {
|
|
|
34
37
|
profile: ProfileView.ProfileView,
|
|
35
38
|
'receive-wallet-funds': ReceiveWalletFunds.ReceiveWalletFunds,
|
|
36
39
|
'send-balance': SendBalanceWidgetView.SendBalanceWidgetView,
|
|
40
|
+
'session-management': SessionManagementView.SessionManagementView,
|
|
41
|
+
'session-management-info': SessionManagementInfoView.SessionManagementInfoView,
|
|
42
|
+
'session-management-revoke-access': RevokeAccessView.RevokeAccessView,
|
|
37
43
|
settings: SettingsView.SettingsView,
|
|
38
44
|
wallets: WalletsView.WalletsView,
|
|
39
45
|
};
|
|
@@ -18,6 +18,9 @@ export declare const mapViewToComponent: {
|
|
|
18
18
|
profile: import("react").FC;
|
|
19
19
|
'receive-wallet-funds': import("react").FC<import("../../views/ReceiveWalletFunds/types").ReceiveWalletFundsProps>;
|
|
20
20
|
'send-balance': import("react").FC;
|
|
21
|
+
'session-management': import("react").FC<import("../../views/SessionManagementView").SessionManagementViewProps>;
|
|
22
|
+
'session-management-info': import("react").FC;
|
|
23
|
+
'session-management-revoke-access': import("react").FC;
|
|
21
24
|
settings: import("react").FC;
|
|
22
25
|
wallets: import("react").FC;
|
|
23
26
|
};
|