@dynamic-labs/sdk-react-core 4.19.5 → 4.19.6
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 +13 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/lib/components/AppOriginTile/AppOriginTile.cjs +8 -5
- package/src/lib/components/AppOriginTile/AppOriginTile.d.ts +4 -1
- package/src/lib/components/AppOriginTile/AppOriginTile.js +8 -5
- package/src/lib/components/Chip/Chip.cjs +2 -3
- package/src/lib/components/Chip/Chip.d.ts +5 -4
- package/src/lib/components/Chip/Chip.js +2 -3
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +3 -2
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +3 -2
- package/src/lib/context/OnrampContext/useEnabledOnrampProviders/useEnabledOnrampProviders.d.ts +2 -2
- package/src/lib/context/ViewContext/types/index.d.ts +1 -1
- package/src/lib/data/api/exchangeAccounts/exchangeAccounts.d.ts +45 -0
- package/src/lib/data/api/exchangeAccounts/index.d.ts +1 -0
- package/src/lib/data/api/index.d.ts +1 -0
- package/src/lib/data/api/onramp/onramp.d.ts +2 -2
- package/src/lib/locale/en/translation.cjs +16 -0
- package/src/lib/locale/en/translation.d.ts +16 -0
- package/src/lib/locale/en/translation.js +16 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -1
- package/src/lib/modals/ZkSyncApprovalModal/ZkSyncApprovalModal.cjs +22 -0
- package/src/lib/modals/ZkSyncApprovalModal/ZkSyncApprovalModal.d.ts +8 -0
- package/src/lib/modals/ZkSyncApprovalModal/ZkSyncApprovalModal.js +18 -0
- package/src/lib/modals/ZkSyncApprovalModal/index.d.ts +1 -0
- package/src/lib/modals/index.d.ts +1 -0
- package/src/lib/shared/assets/backup.cjs +52 -0
- package/src/lib/shared/assets/backup.js +28 -0
- package/src/lib/shared/assets/clock.cjs +54 -0
- package/src/lib/shared/assets/clock.js +30 -0
- package/src/lib/shared/assets/index.d.ts +2 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/authViewLayoutChecks.cjs +1 -0
- package/src/lib/utils/constants/authViewLayoutChecks.js +1 -0
- package/src/lib/utils/functions/onrampConfigurationToOnrampOption/onrampConfigurationToOnrampOption.d.ts +2 -2
- package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs +25 -18
- package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.js +25 -18
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +4 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +4 -0
- package/src/lib/utils/hooks/useExchangeAccounts/index.d.ts +1 -0
- package/src/lib/utils/hooks/useExchangeAccounts/useExchangeAccounts.d.ts +13 -0
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +4 -2
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +4 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +12 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +12 -1
- package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.cjs +138 -0
- package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.d.ts +3 -0
- package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.js +133 -0
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.js +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +1 -1
- package/src/lib/views/SessionKeyApprovalView/SessionKeyApprovalView.cjs +114 -0
- package/src/lib/views/SessionKeyApprovalView/SessionKeyApprovalView.js +110 -0
- package/src/lib/views/SessionPermissionsView/SessionPermissionsView.cjs +6 -6
- package/src/lib/views/SessionPermissionsView/SessionPermissionsView.js +2 -2
- package/src/lib/views/index.d.ts +1 -0
- package/src/lib/views/viewToComponentMap.cjs +2 -0
- package/src/lib/views/viewToComponentMap.d.ts +1 -0
- package/src/lib/views/viewToComponentMap.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/RevokeAccessView.cjs +6 -4
- package/src/lib/widgets/DynamicWidget/views/SessionManagementView/RevokeAccessView/RevokeAccessView.js +7 -5
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useRef, useEffect } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import '@dynamic-labs/utils';
|
|
6
|
+
import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
7
|
+
import { ReactComponent as SvgExclamation } from '../../shared/assets/exclamation.js';
|
|
8
|
+
import '@dynamic-labs/iconic';
|
|
9
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import { ReactComponent as SvgWarningRed } from '../../shared/assets/warning-red.js';
|
|
11
|
+
import { ReactComponent as SvgBackup } from '../../shared/assets/backup.js';
|
|
12
|
+
import '../../../../_virtual/_tslib.js';
|
|
13
|
+
import '@dynamic-labs/sdk-api-core';
|
|
14
|
+
import '../../shared/logger.js';
|
|
15
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
16
|
+
import '@dynamic-labs/wallet-book';
|
|
17
|
+
import '../../utils/constants/colors.js';
|
|
18
|
+
import '../../utils/constants/values.js';
|
|
19
|
+
import '../../shared/consts/index.js';
|
|
20
|
+
import '../../components/Alert/Alert.js';
|
|
21
|
+
import '../../events/dynamicEvents.js';
|
|
22
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
23
|
+
import '../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
24
|
+
import '../../store/state/authMode/authMode.js';
|
|
25
|
+
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
26
|
+
import '../../context/ErrorContext/ErrorContext.js';
|
|
27
|
+
import '@dynamic-labs/multi-wallet';
|
|
28
|
+
import 'react-international-phone';
|
|
29
|
+
import '../../store/state/nonce/nonce.js';
|
|
30
|
+
import '../../store/state/projectSettings/projectSettings.js';
|
|
31
|
+
import '../../config/ApiEndpoint.js';
|
|
32
|
+
import '../../store/state/user/user.js';
|
|
33
|
+
import '../../locale/locale.js';
|
|
34
|
+
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
35
|
+
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
36
|
+
import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
37
|
+
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
38
|
+
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
39
|
+
import '../../context/UserWalletsContext/UserWalletsContext.js';
|
|
40
|
+
import '../../context/VerificationContext/VerificationContext.js';
|
|
41
|
+
import 'react-dom';
|
|
42
|
+
import '../../utils/functions/compareChains/compareChains.js';
|
|
43
|
+
import '../Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
|
|
44
|
+
import '../../context/ThemeContext/ThemeContext.js';
|
|
45
|
+
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
46
|
+
import 'bs58';
|
|
47
|
+
import '@dynamic-labs/types';
|
|
48
|
+
import '../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
49
|
+
import '../../context/LoadingContext/LoadingContext.js';
|
|
50
|
+
import '../../context/WalletContext/WalletContext.js';
|
|
51
|
+
import '../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
52
|
+
import 'yup';
|
|
53
|
+
import '../../context/MockContext/MockContext.js';
|
|
54
|
+
import '../CollectUserDataView/useFields.js';
|
|
55
|
+
import '../../context/FieldsStateContext/FieldsStateContext.js';
|
|
56
|
+
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
57
|
+
import '@dynamic-labs/rpc-providers';
|
|
58
|
+
import '../../store/state/walletOptions/walletOptions.js';
|
|
59
|
+
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
60
|
+
import '../../context/FooterAnimationContext/index.js';
|
|
61
|
+
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
62
|
+
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
63
|
+
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
64
|
+
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
65
|
+
import '../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
66
|
+
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
67
|
+
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
68
|
+
import 'react-focus-lock';
|
|
69
|
+
import { Icon } from '../../components/Icon/Icon.js';
|
|
70
|
+
import { Typography } from '../../components/Typography/Typography.js';
|
|
71
|
+
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
72
|
+
import '../../components/IconButton/IconButton.js';
|
|
73
|
+
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
74
|
+
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
75
|
+
import 'formik';
|
|
76
|
+
import '../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
77
|
+
import '../../store/state/sendBalances.js';
|
|
78
|
+
import '../../components/Input/Input.js';
|
|
79
|
+
import '../../components/OverlayCard/OverlayCard.js';
|
|
80
|
+
import '../TransactionConfirmationView/TransactionConfirmationView.js';
|
|
81
|
+
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
82
|
+
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
83
|
+
import '../../context/OnrampContext/OnrampContext.js';
|
|
84
|
+
import 'qrcode';
|
|
85
|
+
import '../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
86
|
+
import '../../../index.js';
|
|
87
|
+
import { NeedHelpSection } from '../../components/NeedHelpSection/NeedHelpSection.js';
|
|
88
|
+
import '../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
89
|
+
import '../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
90
|
+
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
91
|
+
import '@hcaptcha/react-hcaptcha';
|
|
92
|
+
import '../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
93
|
+
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
94
|
+
import '../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
95
|
+
import '../../store/state/tokenBalances.js';
|
|
96
|
+
import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
97
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
98
|
+
import '../../components/IsBrowser/IsBrowser.js';
|
|
99
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
100
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
101
|
+
|
|
102
|
+
const BackupUnsuccessfulView = () => {
|
|
103
|
+
const { t } = useTranslation();
|
|
104
|
+
const isProperlyMounted = useRef(false);
|
|
105
|
+
const refreshPage = () => {
|
|
106
|
+
window.location.reload();
|
|
107
|
+
};
|
|
108
|
+
// force refresh on component unmount
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
const timer = setTimeout(() => {
|
|
111
|
+
isProperlyMounted.current = true;
|
|
112
|
+
}, 100);
|
|
113
|
+
return () => {
|
|
114
|
+
clearTimeout(timer);
|
|
115
|
+
// Only refresh if component was properly mounted and is now being unmounted
|
|
116
|
+
if (isProperlyMounted.current) {
|
|
117
|
+
setTimeout(() => {
|
|
118
|
+
refreshPage();
|
|
119
|
+
}, 0);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}, []);
|
|
123
|
+
return (jsxs("div", { className: 'backup-unsuccessful-view', children: [jsxs("div", { className: 'backup-unsuccessful-view__content', children: [jsxs("div", { className: 'backup-icon-container', children: [jsx(Icon, { color: 'brand-primary', children: jsx(SvgBackup, { className: 'backup-icon', width: 64, height: 64 }) }), jsxs("div", { className: 'warning-icon-container', children: [jsx(SvgWarningRed, { className: 'combined-icon', width: 40, height: 40 }), jsx(SvgExclamation, { className: 'exclamation-icon', width: 20, height: 20, style: {
|
|
124
|
+
left: '50%',
|
|
125
|
+
position: 'absolute',
|
|
126
|
+
top: '50%',
|
|
127
|
+
transform: 'translate(-50%, -50%)',
|
|
128
|
+
} })] })] }), jsx(Typography, { variant: 'body_normal', className: 'backup-message', color: 'primary', children: t('dyn_waas.backup_unsuccessful.description') }), jsx("div", { className: 'need-help-section', children: jsx(NeedHelpSection, {}) }), jsx("div", { className: 'button-group', children: jsx(TypographyButton, { buttonClassName: 'retry-button', buttonVariant: 'brand-primary', type: 'submit', onClick: () => refreshPage(), copykey: 'dyn_waas.backup_unsuccessful.try_again', typographyProps: {
|
|
129
|
+
color: 'inherit',
|
|
130
|
+
}, children: t('dyn_waas.backup_unsuccessful.try_again') }) })] }), jsx(PoweredByDynamic, { asFooter: true })] }));
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export { BackupUnsuccessfulView, BackupUnsuccessfulView as default };
|
|
@@ -86,12 +86,12 @@ require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
|
86
86
|
require('qrcode');
|
|
87
87
|
require('../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
88
88
|
require('../../../../index.cjs');
|
|
89
|
+
var NeedHelpSection = require('../../../components/NeedHelpSection/NeedHelpSection.cjs');
|
|
89
90
|
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
90
91
|
require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
91
92
|
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
92
93
|
require('@hcaptcha/react-hcaptcha');
|
|
93
94
|
require('../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
94
|
-
var NeedHelpSection = require('../../../components/NeedHelpSection/NeedHelpSection.cjs');
|
|
95
95
|
require('../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
96
96
|
var EmbeddedAuthChoiceCards = require('../EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.cjs');
|
|
97
97
|
require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
@@ -82,12 +82,12 @@ import '../../../context/OnrampContext/OnrampContext.js';
|
|
|
82
82
|
import 'qrcode';
|
|
83
83
|
import '../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
84
84
|
import '../../../../index.js';
|
|
85
|
+
import { NeedHelpSection } from '../../../components/NeedHelpSection/NeedHelpSection.js';
|
|
85
86
|
import '../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
86
87
|
import '../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
87
88
|
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
88
89
|
import '@hcaptcha/react-hcaptcha';
|
|
89
90
|
import '../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
90
|
-
import { NeedHelpSection } from '../../../components/NeedHelpSection/NeedHelpSection.js';
|
|
91
91
|
import '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
92
92
|
import { EmbeddedAuthChoiceCards } from '../EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.js';
|
|
93
93
|
import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
@@ -94,12 +94,12 @@ require('../../../../context/OnrampContext/OnrampContext.cjs');
|
|
|
94
94
|
require('qrcode');
|
|
95
95
|
require('../../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
96
96
|
require('../../../../../index.cjs');
|
|
97
|
+
var NeedHelpSection = require('../../../../components/NeedHelpSection/NeedHelpSection.cjs');
|
|
97
98
|
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
98
99
|
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
99
100
|
require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
100
101
|
require('@hcaptcha/react-hcaptcha');
|
|
101
102
|
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
102
|
-
var NeedHelpSection = require('../../../../components/NeedHelpSection/NeedHelpSection.cjs');
|
|
103
103
|
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
104
104
|
require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
105
105
|
require('../../../../store/state/tokenBalances.cjs');
|
|
@@ -90,12 +90,12 @@ import '../../../../context/OnrampContext/OnrampContext.js';
|
|
|
90
90
|
import 'qrcode';
|
|
91
91
|
import '../../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
92
92
|
import '../../../../../index.js';
|
|
93
|
+
import { NeedHelpSection } from '../../../../components/NeedHelpSection/NeedHelpSection.js';
|
|
93
94
|
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
94
95
|
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
95
96
|
import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
96
97
|
import '@hcaptcha/react-hcaptcha';
|
|
97
98
|
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
98
|
-
import { NeedHelpSection } from '../../../../components/NeedHelpSection/NeedHelpSection.js';
|
|
99
99
|
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
100
100
|
import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
101
101
|
import '../../../../store/state/tokenBalances.js';
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var reactI18next = require('react-i18next');
|
|
9
|
+
require('@dynamic-labs/utils');
|
|
10
|
+
require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
11
|
+
var close = require('../../shared/assets/close.cjs');
|
|
12
|
+
require('@dynamic-labs/iconic');
|
|
13
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
require('../../../../_virtual/_tslib.cjs');
|
|
15
|
+
require('@dynamic-labs/sdk-api-core');
|
|
16
|
+
require('../../shared/logger.cjs');
|
|
17
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
18
|
+
require('@dynamic-labs/wallet-book');
|
|
19
|
+
require('../../utils/constants/colors.cjs');
|
|
20
|
+
require('../../utils/constants/values.cjs');
|
|
21
|
+
require('../../shared/consts/index.cjs');
|
|
22
|
+
require('../../components/Alert/Alert.cjs');
|
|
23
|
+
require('../../events/dynamicEvents.cjs');
|
|
24
|
+
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
25
|
+
require('../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
26
|
+
require('../../store/state/authMode/authMode.cjs');
|
|
27
|
+
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
28
|
+
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
29
|
+
require('@dynamic-labs/multi-wallet');
|
|
30
|
+
require('react-international-phone');
|
|
31
|
+
require('../../store/state/nonce/nonce.cjs');
|
|
32
|
+
require('../../store/state/projectSettings/projectSettings.cjs');
|
|
33
|
+
require('../../config/ApiEndpoint.cjs');
|
|
34
|
+
require('../../store/state/user/user.cjs');
|
|
35
|
+
require('../../locale/locale.cjs');
|
|
36
|
+
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
37
|
+
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
38
|
+
require('../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
39
|
+
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
40
|
+
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
41
|
+
require('../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
42
|
+
require('../../context/VerificationContext/VerificationContext.cjs');
|
|
43
|
+
require('react-dom');
|
|
44
|
+
require('../../utils/functions/compareChains/compareChains.cjs');
|
|
45
|
+
require('../Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
|
|
46
|
+
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
47
|
+
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
48
|
+
require('bs58');
|
|
49
|
+
require('@dynamic-labs/types');
|
|
50
|
+
require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
51
|
+
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
52
|
+
require('../../context/WalletContext/WalletContext.cjs');
|
|
53
|
+
require('../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
54
|
+
require('yup');
|
|
55
|
+
require('../../context/MockContext/MockContext.cjs');
|
|
56
|
+
require('../CollectUserDataView/useFields.cjs');
|
|
57
|
+
require('../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
58
|
+
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
59
|
+
require('@dynamic-labs/rpc-providers');
|
|
60
|
+
require('../../store/state/walletOptions/walletOptions.cjs');
|
|
61
|
+
var Typography = require('../../components/Typography/Typography.cjs');
|
|
62
|
+
require('../../context/FooterAnimationContext/index.cjs');
|
|
63
|
+
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
64
|
+
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
65
|
+
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
66
|
+
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
67
|
+
require('../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
68
|
+
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
69
|
+
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
70
|
+
require('react-focus-lock');
|
|
71
|
+
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
72
|
+
var IconButton = require('../../components/IconButton/IconButton.cjs');
|
|
73
|
+
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
74
|
+
var TypographyButton = require('../../components/TypographyButton/TypographyButton.cjs');
|
|
75
|
+
require('formik');
|
|
76
|
+
require('../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
77
|
+
var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
|
|
78
|
+
require('../../store/state/sendBalances.cjs');
|
|
79
|
+
require('../../components/Input/Input.cjs');
|
|
80
|
+
require('../../components/OverlayCard/OverlayCard.cjs');
|
|
81
|
+
require('../TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
82
|
+
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
83
|
+
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
84
|
+
var getSessionInformation = require('../../utils/functions/getSessionInformation/getSessionInformation.cjs');
|
|
85
|
+
require('../../context/OnrampContext/OnrampContext.cjs');
|
|
86
|
+
require('qrcode');
|
|
87
|
+
require('../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
88
|
+
var SessionPermissionsView = require('../SessionPermissionsView/SessionPermissionsView.cjs');
|
|
89
|
+
var AppOriginTile = require('../../components/AppOriginTile/AppOriginTile.cjs');
|
|
90
|
+
require('../../../index.cjs');
|
|
91
|
+
require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
92
|
+
require('../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
93
|
+
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
94
|
+
require('@hcaptcha/react-hcaptcha');
|
|
95
|
+
require('../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
96
|
+
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
97
|
+
require('../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
98
|
+
require('../../store/state/tokenBalances.cjs');
|
|
99
|
+
require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
100
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
101
|
+
require('../../components/IsBrowser/IsBrowser.cjs');
|
|
102
|
+
require('../../components/Popper/Popper/Popper.cjs');
|
|
103
|
+
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
104
|
+
|
|
105
|
+
const SessionKeyApprovalView = ({ onApprove, onReject, session, }) => {
|
|
106
|
+
const { t } = reactI18next.useTranslation();
|
|
107
|
+
const sessionName = React.useMemo(() => getSessionInformation.getSessionInformationName(session), [session]);
|
|
108
|
+
const renderCloseButton = React.useCallback(() => (jsxRuntime.jsx(IconButton.IconButton, { onClick: onReject, "aria-label": t('dyn_session_key_approval.aria.close_button_label'), children: jsxRuntime.jsx(close.ReactComponent, {}) })), [onReject, t]);
|
|
109
|
+
return (jsxRuntime.jsxs("div", { className: 'session-key-approval-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: renderCloseButton(), children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_session_key_approval.title', children: t('dyn_session_key_approval.title') }) }), jsxRuntime.jsxs("div", { className: 'session-key-approval-view__body', children: [jsxRuntime.jsx(AppOriginTile.AppOriginTile, { origin: sessionName }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_session_key_approval.description', align: 'center', children: t('dyn_session_key_approval.description') }), jsxRuntime.jsx(SessionPermissionsView.SessionPermissionsView, { showAdvanced: true, session: session })] }), jsxRuntime.jsxs("div", { className: 'session-key-approval-view__footer', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: onApprove, buttonVariant: 'brand-primary', expanded: true, copykey: 'dyn_session_key_approval.approve_button', typographyProps: {
|
|
110
|
+
color: 'white',
|
|
111
|
+
}, children: t('dyn_session_key_approval.approve_button') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: onReject, expanded: true, copykey: 'dyn_session_key_approval.reject_button', children: t('dyn_session_key_approval.reject_button') })] })] }));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
exports.SessionKeyApprovalView = SessionKeyApprovalView;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useMemo, useCallback } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import '@dynamic-labs/utils';
|
|
6
|
+
import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
7
|
+
import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
|
|
8
|
+
import '@dynamic-labs/iconic';
|
|
9
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import '../../../../_virtual/_tslib.js';
|
|
11
|
+
import '@dynamic-labs/sdk-api-core';
|
|
12
|
+
import '../../shared/logger.js';
|
|
13
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
14
|
+
import '@dynamic-labs/wallet-book';
|
|
15
|
+
import '../../utils/constants/colors.js';
|
|
16
|
+
import '../../utils/constants/values.js';
|
|
17
|
+
import '../../shared/consts/index.js';
|
|
18
|
+
import '../../components/Alert/Alert.js';
|
|
19
|
+
import '../../events/dynamicEvents.js';
|
|
20
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
21
|
+
import '../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
22
|
+
import '../../store/state/authMode/authMode.js';
|
|
23
|
+
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
24
|
+
import '../../context/ErrorContext/ErrorContext.js';
|
|
25
|
+
import '@dynamic-labs/multi-wallet';
|
|
26
|
+
import 'react-international-phone';
|
|
27
|
+
import '../../store/state/nonce/nonce.js';
|
|
28
|
+
import '../../store/state/projectSettings/projectSettings.js';
|
|
29
|
+
import '../../config/ApiEndpoint.js';
|
|
30
|
+
import '../../store/state/user/user.js';
|
|
31
|
+
import '../../locale/locale.js';
|
|
32
|
+
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
33
|
+
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
34
|
+
import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
35
|
+
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
36
|
+
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
37
|
+
import '../../context/UserWalletsContext/UserWalletsContext.js';
|
|
38
|
+
import '../../context/VerificationContext/VerificationContext.js';
|
|
39
|
+
import 'react-dom';
|
|
40
|
+
import '../../utils/functions/compareChains/compareChains.js';
|
|
41
|
+
import '../Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
|
|
42
|
+
import '../../context/ThemeContext/ThemeContext.js';
|
|
43
|
+
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
44
|
+
import 'bs58';
|
|
45
|
+
import '@dynamic-labs/types';
|
|
46
|
+
import '../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
47
|
+
import '../../context/LoadingContext/LoadingContext.js';
|
|
48
|
+
import '../../context/WalletContext/WalletContext.js';
|
|
49
|
+
import '../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
50
|
+
import 'yup';
|
|
51
|
+
import '../../context/MockContext/MockContext.js';
|
|
52
|
+
import '../CollectUserDataView/useFields.js';
|
|
53
|
+
import '../../context/FieldsStateContext/FieldsStateContext.js';
|
|
54
|
+
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
55
|
+
import '@dynamic-labs/rpc-providers';
|
|
56
|
+
import '../../store/state/walletOptions/walletOptions.js';
|
|
57
|
+
import { Typography } from '../../components/Typography/Typography.js';
|
|
58
|
+
import '../../context/FooterAnimationContext/index.js';
|
|
59
|
+
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
60
|
+
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
61
|
+
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
62
|
+
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
63
|
+
import '../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
64
|
+
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
65
|
+
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
66
|
+
import 'react-focus-lock';
|
|
67
|
+
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
68
|
+
import { IconButton } from '../../components/IconButton/IconButton.js';
|
|
69
|
+
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
70
|
+
import { TypographyButton } from '../../components/TypographyButton/TypographyButton.js';
|
|
71
|
+
import 'formik';
|
|
72
|
+
import '../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
73
|
+
import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
|
|
74
|
+
import '../../store/state/sendBalances.js';
|
|
75
|
+
import '../../components/Input/Input.js';
|
|
76
|
+
import '../../components/OverlayCard/OverlayCard.js';
|
|
77
|
+
import '../TransactionConfirmationView/TransactionConfirmationView.js';
|
|
78
|
+
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
79
|
+
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
80
|
+
import { getSessionInformationName } from '../../utils/functions/getSessionInformation/getSessionInformation.js';
|
|
81
|
+
import '../../context/OnrampContext/OnrampContext.js';
|
|
82
|
+
import 'qrcode';
|
|
83
|
+
import '../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
84
|
+
import { SessionPermissionsView } from '../SessionPermissionsView/SessionPermissionsView.js';
|
|
85
|
+
import { AppOriginTile } from '../../components/AppOriginTile/AppOriginTile.js';
|
|
86
|
+
import '../../../index.js';
|
|
87
|
+
import '../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
88
|
+
import '../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
89
|
+
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
90
|
+
import '@hcaptcha/react-hcaptcha';
|
|
91
|
+
import '../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
92
|
+
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
93
|
+
import '../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
94
|
+
import '../../store/state/tokenBalances.js';
|
|
95
|
+
import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
96
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
97
|
+
import '../../components/IsBrowser/IsBrowser.js';
|
|
98
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
99
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
100
|
+
|
|
101
|
+
const SessionKeyApprovalView = ({ onApprove, onReject, session, }) => {
|
|
102
|
+
const { t } = useTranslation();
|
|
103
|
+
const sessionName = useMemo(() => getSessionInformationName(session), [session]);
|
|
104
|
+
const renderCloseButton = useCallback(() => (jsx(IconButton, { onClick: onReject, "aria-label": t('dyn_session_key_approval.aria.close_button_label'), children: jsx(SvgClose, {}) })), [onReject, t]);
|
|
105
|
+
return (jsxs("div", { className: 'session-key-approval-view', children: [jsx(ModalHeader, { trailing: renderCloseButton(), children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_session_key_approval.title', children: t('dyn_session_key_approval.title') }) }), jsxs("div", { className: 'session-key-approval-view__body', children: [jsx(AppOriginTile, { origin: sessionName }), jsx(Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_session_key_approval.description', align: 'center', children: t('dyn_session_key_approval.description') }), jsx(SessionPermissionsView, { showAdvanced: true, session: session })] }), jsxs("div", { className: 'session-key-approval-view__footer', children: [jsx(TypographyButton, { onClick: onApprove, buttonVariant: 'brand-primary', expanded: true, copykey: 'dyn_session_key_approval.approve_button', typographyProps: {
|
|
106
|
+
color: 'white',
|
|
107
|
+
}, children: t('dyn_session_key_approval.approve_button') }), jsx(TypographyButton, { onClick: onReject, expanded: true, copykey: 'dyn_session_key_approval.reject_button', children: t('dyn_session_key_approval.reject_button') })] })] }));
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export { SessionKeyApprovalView };
|
|
@@ -13,24 +13,24 @@ var Textarea = require('../../components/Textarea/Textarea.cjs');
|
|
|
13
13
|
require('@dynamic-labs/utils');
|
|
14
14
|
require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
15
15
|
var AccordionToggle = require('../../components/Accordion/components/AccordionToggle/AccordionToggle.cjs');
|
|
16
|
+
var clock = require('../../shared/assets/clock.cjs');
|
|
16
17
|
var profileOutline = require('../../shared/assets/profile-outline.cjs');
|
|
17
|
-
var session = require('../../shared/assets/session.cjs');
|
|
18
18
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
19
19
|
var getSessionInformation = require('../../utils/functions/getSessionInformation/getSessionInformation.cjs');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* A view component to render SessionInformation permissions
|
|
23
23
|
*/
|
|
24
|
-
const SessionPermissionsView = ({ session
|
|
24
|
+
const SessionPermissionsView = ({ session, showAdvanced = false, }) => {
|
|
25
25
|
const { t } = reactI18next.useTranslation();
|
|
26
26
|
const [isAdvancedExpanded, setIsAdvancedExpanded] = React.useState(false);
|
|
27
27
|
const toggleAdvancedExpanded = React.useCallback(() => {
|
|
28
28
|
setIsAdvancedExpanded(!isAdvancedExpanded);
|
|
29
29
|
}, [isAdvancedExpanded]);
|
|
30
|
-
const timeToExpire = React.useMemo(() => getSessionInformation.getSessionInformationExpiration(session
|
|
31
|
-
const spendingLimit = React.useMemo(() => getSessionInformation.getSessionInformationSpendingLimit(session
|
|
32
|
-
const sessionString = React.useMemo(() => getSessionInformation.getSessionInformationJson(session
|
|
33
|
-
return (jsxRuntime.jsxs("div", { className: 'session-permissions-view', children: [jsxRuntime.jsx("div", { className: 'session-permissions-view__header', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'bold', children: t('dyn_session_permissions.permissions_label') }) }), jsxRuntime.jsxs("div", { className: 'session-permissions-view__card', children: [jsxRuntime.jsxs("div", { className: 'session-permissions-view__card-permission', children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(profileOutline.ReactComponent, {}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', children: t('dyn_session_permissions.permissions.ownership') })] }), jsxRuntime.jsxs("div", { className: 'session-permissions-view__card-permission', children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(
|
|
30
|
+
const timeToExpire = React.useMemo(() => getSessionInformation.getSessionInformationExpiration(session), [session]);
|
|
31
|
+
const spendingLimit = React.useMemo(() => getSessionInformation.getSessionInformationSpendingLimit(session), [session]);
|
|
32
|
+
const sessionString = React.useMemo(() => getSessionInformation.getSessionInformationJson(session), [session]);
|
|
33
|
+
return (jsxRuntime.jsxs("div", { className: 'session-permissions-view', children: [jsxRuntime.jsx("div", { className: 'session-permissions-view__header', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'bold', children: t('dyn_session_permissions.permissions_label') }) }), jsxRuntime.jsxs("div", { className: 'session-permissions-view__card', children: [jsxRuntime.jsxs("div", { className: 'session-permissions-view__card-permission', children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(profileOutline.ReactComponent, {}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', children: t('dyn_session_permissions.permissions.ownership') })] }), jsxRuntime.jsxs("div", { className: 'session-permissions-view__card-permission', children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(clock.ReactComponent, {}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', children: t('dyn_session_permissions.permissions.access', {
|
|
34
34
|
time: timeToExpire,
|
|
35
35
|
}) })] })] }), jsxRuntime.jsx("div", { className: 'session-permissions-view__header', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'bold', children: t('dyn_session_permissions.spending_label') }) }), jsxRuntime.jsxs("div", { className: 'session-permissions-view__card session-permissions-view__token-card', children: [jsxRuntime.jsxs("div", { className: 'session-permissions-view__token', children: [jsxRuntime.jsx(Icon.Icon, { size: 'medium', children: jsxRuntime.jsx(iconic.EthereumIcon, {}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', children: "ETH" })] }), jsxRuntime.jsxs("div", { className: 'session-permissions-view__spending', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: t('dyn_session_permissions.spending_limit') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', children: spendingLimit })] })] }), showAdvanced && (jsxRuntime.jsxs("div", { className: 'session-permissions-view__panel', children: [jsxRuntime.jsxs(AccordionToggle.AccordionToggle, { className: 'session-permissions-view__panel-toggle', isOpen: isAdvancedExpanded, onClick: toggleAdvancedExpanded, labelClassName: 'session-permissions-view__panel-toggle-label', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'bold', children: t('dyn_session_permissions.advanced_label') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: t('dyn_session_permissions.advanced_description') })] }), isAdvancedExpanded && (jsxRuntime.jsx("div", { className: 'session-permissions-view__panel-content', children: jsxRuntime.jsx(Textarea.Textarea, { value: sessionString, readOnly: true, rows: 8, id: 'session-permissions-view__raw-json', "data-testid": 'session-permissions-view__raw-json', label: '' }) }))] }))] }));
|
|
36
36
|
};
|
|
@@ -9,8 +9,8 @@ import { Textarea } from '../../components/Textarea/Textarea.js';
|
|
|
9
9
|
import '@dynamic-labs/utils';
|
|
10
10
|
import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
11
11
|
import { AccordionToggle } from '../../components/Accordion/components/AccordionToggle/AccordionToggle.js';
|
|
12
|
+
import { ReactComponent as SvgClock } from '../../shared/assets/clock.js';
|
|
12
13
|
import { ReactComponent as SvgProfileOutline } from '../../shared/assets/profile-outline.js';
|
|
13
|
-
import { ReactComponent as SvgSession } from '../../shared/assets/session.js';
|
|
14
14
|
import '../../context/ViewContext/ViewContext.js';
|
|
15
15
|
import { getSessionInformationExpiration, getSessionInformationSpendingLimit, getSessionInformationJson } from '../../utils/functions/getSessionInformation/getSessionInformation.js';
|
|
16
16
|
|
|
@@ -26,7 +26,7 @@ const SessionPermissionsView = ({ session, showAdvanced = false, }) => {
|
|
|
26
26
|
const timeToExpire = useMemo(() => getSessionInformationExpiration(session), [session]);
|
|
27
27
|
const spendingLimit = useMemo(() => getSessionInformationSpendingLimit(session), [session]);
|
|
28
28
|
const sessionString = useMemo(() => getSessionInformationJson(session), [session]);
|
|
29
|
-
return (jsxs("div", { className: 'session-permissions-view', children: [jsx("div", { className: 'session-permissions-view__header', children: jsx(Typography, { variant: 'body_small', weight: 'bold', children: t('dyn_session_permissions.permissions_label') }) }), jsxs("div", { className: 'session-permissions-view__card', children: [jsxs("div", { className: 'session-permissions-view__card-permission', children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgProfileOutline, {}) }), jsx(Typography, { variant: 'body_small', children: t('dyn_session_permissions.permissions.ownership') })] }), jsxs("div", { className: 'session-permissions-view__card-permission', children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(
|
|
29
|
+
return (jsxs("div", { className: 'session-permissions-view', children: [jsx("div", { className: 'session-permissions-view__header', children: jsx(Typography, { variant: 'body_small', weight: 'bold', children: t('dyn_session_permissions.permissions_label') }) }), jsxs("div", { className: 'session-permissions-view__card', children: [jsxs("div", { className: 'session-permissions-view__card-permission', children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgProfileOutline, {}) }), jsx(Typography, { variant: 'body_small', children: t('dyn_session_permissions.permissions.ownership') })] }), jsxs("div", { className: 'session-permissions-view__card-permission', children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgClock, {}) }), jsx(Typography, { variant: 'body_small', children: t('dyn_session_permissions.permissions.access', {
|
|
30
30
|
time: timeToExpire,
|
|
31
31
|
}) })] })] }), jsx("div", { className: 'session-permissions-view__header', children: jsx(Typography, { variant: 'body_small', weight: 'bold', children: t('dyn_session_permissions.spending_label') }) }), jsxs("div", { className: 'session-permissions-view__card session-permissions-view__token-card', children: [jsxs("div", { className: 'session-permissions-view__token', children: [jsx(Icon, { size: 'medium', children: jsx(EthereumIcon, {}) }), jsx(Typography, { variant: 'body_normal', children: "ETH" })] }), jsxs("div", { className: 'session-permissions-view__spending', children: [jsx(Typography, { variant: 'body_small', color: 'secondary', children: t('dyn_session_permissions.spending_limit') }), jsx(Typography, { variant: 'body_small', children: spendingLimit })] })] }), showAdvanced && (jsxs("div", { className: 'session-permissions-view__panel', children: [jsxs(AccordionToggle, { className: 'session-permissions-view__panel-toggle', isOpen: isAdvancedExpanded, onClick: toggleAdvancedExpanded, labelClassName: 'session-permissions-view__panel-toggle-label', children: [jsx(Typography, { variant: 'body_small', weight: 'bold', children: t('dyn_session_permissions.advanced_label') }), jsx(Typography, { variant: 'body_small', color: 'secondary', children: t('dyn_session_permissions.advanced_description') })] }), isAdvancedExpanded && (jsx("div", { className: 'session-permissions-view__panel-content', children: jsx(Textarea, { value: sessionString, readOnly: true, rows: 8, id: 'session-permissions-view__raw-json', "data-testid": 'session-permissions-view__raw-json', label: '' }) }))] }))] }));
|
|
32
32
|
};
|
package/src/lib/views/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { NoQrNotInstalledView } from './/NoQrNotInstalledView';
|
|
2
|
+
export { BackupUnsuccessfulView } from './BackupUnsuccessfulView/BackupUnsuccessfulView';
|
|
2
3
|
export { CollectUserDataView } from './CollectUserDataView';
|
|
3
4
|
export { EmailConfirmationWaitingView } from './EmailConfirmationWaitingView';
|
|
4
5
|
export { NoAccess } from './NoAccess';
|
|
@@ -7,6 +7,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var UserDeleteAccountView = require('./UserDeleteAccountView/UserDeleteAccountView.cjs');
|
|
8
8
|
var AccessBlockedView = require('./AccessBlockedView/AccessBlockedView.cjs');
|
|
9
9
|
var AccountExistsView = require('./AccountExistsView/AccountExistsView.cjs');
|
|
10
|
+
var BackupUnsuccessfulView = require('./BackupUnsuccessfulView/BackupUnsuccessfulView.cjs');
|
|
10
11
|
var BridgeNextWalletConnectionView = require('./BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs');
|
|
11
12
|
var BridgeSummaryView = require('./BridgeSummaryView/BridgeSummaryView.cjs');
|
|
12
13
|
var BridgeWelcomeView = require('./BridgeWelcomeView/BridgeWelcomeView.cjs');
|
|
@@ -152,6 +153,7 @@ var PasskeyNewDomainDetectedView = require('./Passkey/PasskeyNewDomainDetectedVi
|
|
|
152
153
|
const viewToComponentMap = {
|
|
153
154
|
'access-blocked': AccessBlockedView.AccessBlockedView,
|
|
154
155
|
'account-exists': AccountExistsView.AccountExistsView,
|
|
156
|
+
'backup-unsuccessful': BackupUnsuccessfulView.BackupUnsuccessfulView,
|
|
155
157
|
'bridge-next-wallet-connection': BridgeNextWalletConnectionView.BridgeNextWalletConnectionView,
|
|
156
158
|
'bridge-summary': BridgeSummaryView.BridgeSummaryView,
|
|
157
159
|
'bridge-welcome': BridgeWelcomeView.BridgeWelcomeView,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare const viewToComponentMap: {
|
|
3
3
|
'access-blocked': import("react").FC;
|
|
4
4
|
'account-exists': () => JSX.Element;
|
|
5
|
+
'backup-unsuccessful': import("react").FC<{}>;
|
|
5
6
|
'bridge-next-wallet-connection': import("react").FC;
|
|
6
7
|
'bridge-summary': () => JSX.Element;
|
|
7
8
|
'bridge-welcome': () => JSX.Element;
|
|
@@ -3,6 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { UserDeleteAccountView } from './UserDeleteAccountView/UserDeleteAccountView.js';
|
|
4
4
|
import { AccessBlockedView } from './AccessBlockedView/AccessBlockedView.js';
|
|
5
5
|
import { AccountExistsView } from './AccountExistsView/AccountExistsView.js';
|
|
6
|
+
import { BackupUnsuccessfulView } from './BackupUnsuccessfulView/BackupUnsuccessfulView.js';
|
|
6
7
|
import { BridgeNextWalletConnectionView } from './BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js';
|
|
7
8
|
import { BridgeSummaryView } from './BridgeSummaryView/BridgeSummaryView.js';
|
|
8
9
|
import { BridgeWelcomeView } from './BridgeWelcomeView/BridgeWelcomeView.js';
|
|
@@ -148,6 +149,7 @@ import { PasskeyNewDomainDetectedView } from './Passkey/PasskeyNewDomainDetected
|
|
|
148
149
|
const viewToComponentMap = {
|
|
149
150
|
'access-blocked': AccessBlockedView,
|
|
150
151
|
'account-exists': AccountExistsView,
|
|
152
|
+
'backup-unsuccessful': BackupUnsuccessfulView,
|
|
151
153
|
'bridge-next-wallet-connection': BridgeNextWalletConnectionView,
|
|
152
154
|
'bridge-summary': BridgeSummaryView,
|
|
153
155
|
'bridge-welcome': BridgeWelcomeView,
|
|
@@ -89,11 +89,11 @@ var CopyButton = require('../../../../components/CopyButton/CopyButton.cjs');
|
|
|
89
89
|
var QRCode = require('../../../../components/QRCode/QRCode.cjs');
|
|
90
90
|
require('../../views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
91
91
|
require('../../../../../index.cjs');
|
|
92
|
+
var TextButton = require('../../../../components/TextButton/TextButton.cjs');
|
|
92
93
|
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
93
94
|
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
94
95
|
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
95
96
|
require('@hcaptcha/react-hcaptcha');
|
|
96
|
-
var TextButton = require('../../../../components/TextButton/TextButton.cjs');
|
|
97
97
|
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
98
98
|
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
99
99
|
require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
@@ -85,11 +85,11 @@ import { CopyButton } from '../../../../components/CopyButton/CopyButton.js';
|
|
|
85
85
|
import { QRCode } from '../../../../components/QRCode/QRCode.js';
|
|
86
86
|
import '../../views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
87
87
|
import '../../../../../index.js';
|
|
88
|
+
import { TextButton } from '../../../../components/TextButton/TextButton.js';
|
|
88
89
|
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
89
90
|
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
90
91
|
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
91
92
|
import '@hcaptcha/react-hcaptcha';
|
|
92
|
-
import { TextButton } from '../../../../components/TextButton/TextButton.js';
|
|
93
93
|
import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
94
94
|
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
95
95
|
import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
|