@dynamic-labs/sdk-react-core 4.0.0-alpha.21 → 4.0.0-alpha.23
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 +19 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +1 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -1
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/ViewContext/types/index.d.ts +1 -1
- package/src/lib/data/api/embeddedWallets/embeddedWallets.cjs +29 -0
- package/src/lib/data/api/embeddedWallets/embeddedWallets.d.ts +14 -0
- package/src/lib/data/api/embeddedWallets/embeddedWallets.js +28 -1
- package/src/lib/locale/en/translation.cjs +52 -1
- package/src/lib/locale/en/translation.d.ts +52 -1
- package/src/lib/locale/en/translation.js +52 -1
- package/src/lib/shared/assets/delete-embedded-hero.cjs +57 -0
- package/src/lib/shared/assets/delete-embedded-hero.js +33 -0
- package/src/lib/shared/assets/eye-outline.cjs +54 -0
- package/src/lib/shared/assets/eye-outline.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/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +4 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +4 -0
- package/src/lib/views/EmbeddedDeleteView/EmbeddedDeleteView.cjs +154 -0
- package/src/lib/views/EmbeddedDeleteView/EmbeddedDeleteView.d.ts +2 -0
- package/src/lib/views/EmbeddedDeleteView/EmbeddedDeleteView.js +150 -0
- package/src/lib/views/EmbeddedDeleteView/index.d.ts +1 -0
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +9 -3
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +9 -3
- 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/components/ActiveWalletInformation/ActiveWalletInformation.cjs +20 -11
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +20 -11
- package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.cjs +99 -0
- package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.d.ts +12 -0
- package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.js +95 -0
- package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/index.d.ts +1 -0
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -15,6 +15,10 @@ import { logger } from '../../../../shared/logger.js';
|
|
|
15
15
|
import '@dynamic-labs/iconic';
|
|
16
16
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
17
17
|
import { ReactComponent as SvgChevronDown } from '../../../../shared/assets/chevron-down.js';
|
|
18
|
+
import { ReactComponent as SvgCopy } from '../../../../shared/assets/copy.js';
|
|
19
|
+
import { ReactComponent as SvgEyeOutline } from '../../../../shared/assets/eye-outline.js';
|
|
20
|
+
import { ReactComponent as SvgKey } from '../../../../shared/assets/key.js';
|
|
21
|
+
import { ReactComponent as SvgWalletV2 } from '../../../../shared/assets/wallet-v2.js';
|
|
18
22
|
import '@dynamic-labs/wallet-book';
|
|
19
23
|
import '../../../../utils/constants/colors.js';
|
|
20
24
|
import '../../../../utils/constants/values.js';
|
|
@@ -91,17 +95,20 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
91
95
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
92
96
|
import 'qrcode';
|
|
93
97
|
import { isMultiAssetSupportedNetwork } from '../../../../utils/functions/isMultiAssetSupportedNetwork/isMultiAssetSupportedNetwork.js';
|
|
98
|
+
import { WalletDetailsCard } from '../WalletDetailsCard/WalletDetailsCard.js';
|
|
94
99
|
import { ActiveBitcoinWalletAddresses } from './ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js';
|
|
95
100
|
import { ActiveWalletAddress } from './ActiveWalletAddress/ActiveWalletAddress.js';
|
|
96
101
|
import { TokenBalanceList } from './TokenBalanceList/TokenBalanceList.js';
|
|
97
102
|
|
|
98
103
|
const ICON_SIZE = 28;
|
|
104
|
+
const DROPDOWN_ICON_SIZE = 16;
|
|
99
105
|
const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
100
106
|
var _a, _b, _c, _d, _e;
|
|
101
107
|
const { t } = useTranslation();
|
|
102
108
|
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = useState(false);
|
|
103
109
|
const [balanceIsExpanded, setBalanceIsExpanded] = useState(false);
|
|
104
110
|
const [hasShadow, setHasShadow] = useState(false);
|
|
111
|
+
const [detailsCardOpen, setDetailsCardOpen] = useState(false);
|
|
105
112
|
const contentRef = useRef(null);
|
|
106
113
|
const { primaryWallet, network, projectSettings, user, authMode, showFiat, multiAsset, } = useInternalDynamicContext();
|
|
107
114
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
@@ -126,30 +133,32 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
126
133
|
((_e = (_d = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _d === void 0 ? void 0 : _d.key) === null || _e === void 0 ? void 0 : _e.startsWith('coinbasempc'))));
|
|
127
134
|
const options = [
|
|
128
135
|
{
|
|
129
|
-
Icon:
|
|
136
|
+
Icon: jsx(SvgCopy, { width: DROPDOWN_ICON_SIZE, height: DROPDOWN_ICON_SIZE }),
|
|
130
137
|
callback: () => (nameService === null || nameService === void 0 ? void 0 : nameService.name) && navigator.clipboard.writeText(nameService === null || nameService === void 0 ? void 0 : nameService.name),
|
|
131
138
|
hide: !(nameService === null || nameService === void 0 ? void 0 : nameService.name),
|
|
132
|
-
text: '
|
|
139
|
+
text: t('dyn_active_wallet_info.options.copy_ens'),
|
|
133
140
|
},
|
|
134
141
|
{
|
|
135
|
-
Icon:
|
|
136
|
-
callback: () =>
|
|
142
|
+
Icon: (jsx(SvgEyeOutline, { width: DROPDOWN_ICON_SIZE, height: DROPDOWN_ICON_SIZE })),
|
|
143
|
+
callback: () => {
|
|
144
|
+
setDetailsCardOpen(true);
|
|
145
|
+
},
|
|
137
146
|
hide: !address,
|
|
138
|
-
text: '
|
|
147
|
+
text: t('dyn_active_wallet_info.options.view_address'),
|
|
139
148
|
},
|
|
140
149
|
{
|
|
141
|
-
Icon:
|
|
150
|
+
Icon: (jsx(SvgWalletV2, { width: DROPDOWN_ICON_SIZE, height: DROPDOWN_ICON_SIZE })),
|
|
142
151
|
callback: () => setDynamicWidgetView('settings'),
|
|
143
152
|
endSlot: showAlert() ? jsx(StatusDot, { variant: 'yellow' }) : undefined,
|
|
144
153
|
hide: !isEmbeddedWallet,
|
|
145
|
-
text: '
|
|
154
|
+
text: t('dyn_active_wallet_info.options.settings'),
|
|
146
155
|
},
|
|
147
156
|
{
|
|
148
|
-
Icon:
|
|
157
|
+
Icon: (jsx(SvgKey, { width: DROPDOWN_ICON_SIZE, height: DROPDOWN_ICON_SIZE })),
|
|
149
158
|
callback: exportKeysOption ||
|
|
150
159
|
(() => logger.info('No option to export private keys')),
|
|
151
160
|
hide: !exportKeysOption,
|
|
152
|
-
text: '
|
|
161
|
+
text: t('dyn_active_wallet_info.options.export'),
|
|
153
162
|
},
|
|
154
163
|
];
|
|
155
164
|
const evmNetworks = ((primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) &&
|
|
@@ -185,7 +194,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
185
194
|
if (!isLoadingTokenBalances) {
|
|
186
195
|
setBalanceIsExpanded(!balanceIsExpanded);
|
|
187
196
|
}
|
|
188
|
-
}, className: 'balance-header', children: [jsxs("div", { className: 'balance-header__title', children: [
|
|
197
|
+
}, className: 'balance-header', children: [jsxs("div", { className: 'balance-header__title', children: [jsxs(Typography, { color: 'secondary', variant: 'body_small', style: { marginRight: '8px' }, children: [t('dyn_active_wallet_info.balance'), ":"] }), showFiat ? (jsx(Typography, { variant: 'body_normal', color: 'primary', children: totalValue === 0 || totalValue >= 0.01
|
|
189
198
|
? currencyFormatter.format(parseFloat(totalValue.toFixed(2)))
|
|
190
199
|
: '<$0.01' })) : (primaryWalletNativeBalance())] }), jsx("div", { className: balanceIsExpanded ? 'balance-header__chevron' : '', children: jsx(SvgChevronDown, {}) })] }) }), jsx(AccordionItem, { isOpen: balanceIsExpanded, className: `multi-asset-balance-container__accordion ${'multi-asset-balance-container__accordion' +
|
|
191
200
|
(balanceIsExpanded ? '--expanded' : '--collapsed')}`, handleScroll: handleScroll, ref: contentRef, children: jsx(TokenBalanceList, { tokenBalances: filteredTokenBalances }) })] }));
|
|
@@ -194,7 +203,7 @@ const ActiveWalletInformation = ({ isLoading = false, }) => {
|
|
|
194
203
|
}
|
|
195
204
|
return (jsxs("div", { className: 'active-wallet-information-container', "data-testid": 'active-wallet-information', children: [jsxs("div", { className: 'active-wallet-information', children: [jsxs("div", { className: 'active-wallet-information__header', children: [jsx("div", { className: 'active-wallet-information__avatar', children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("div", { className: 'active-wallet-information__avatar__name-service', children: jsx("img", { src: nameService === null || nameService === void 0 ? void 0 : nameService.avatar, alt: '' }) })) : (jsx("div", { className: 'active-wallet-information__wallet-img', children: jsx(AuthProviderIcon, { iconSize: ICON_SIZE }) })) }), jsxs("div", { className: 'active-wallet-information__details', children: [jsx("div", { className: classNames('active-wallet-information__addresses-container', {
|
|
196
205
|
'active-wallet-information__addresses-container--centered': !(nameService === null || nameService === void 0 ? void 0 : nameService.name),
|
|
197
|
-
}), children: activeWalletAddress() }), !shouldHideNetwork && (jsx(NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true, isLoading: isLoading }))] })] }), showTestnetAlert && (jsx(Alert, { variant: 'warning', copykey: 'dyn_active_wallet_info.testnet_warning', children: t('dyn_active_wallet_info.testnet_warning') }))] }), showMultiAsset ? (jsx("div", { className: 'multi-asset-balance-container', children: multiAssetHeader() })) : (jsxs("div", { className: 'balance-container', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children:
|
|
206
|
+
}), children: activeWalletAddress() }), address && (jsx(WalletDetailsCard, { open: detailsCardOpen, address: address, onClose: () => setDetailsCardOpen(false) })), !shouldHideNetwork && (jsx(NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true, isLoading: isLoading }))] })] }), showTestnetAlert && (jsx(Alert, { variant: 'warning', copykey: 'dyn_active_wallet_info.testnet_warning', children: t('dyn_active_wallet_info.testnet_warning') }))] }), showMultiAsset ? (jsx("div", { className: 'multi-asset-balance-container', children: multiAssetHeader() })) : (jsxs("div", { className: 'balance-container', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_active_wallet_info.balance') }), primaryWalletNativeBalance()] }))] }));
|
|
198
207
|
};
|
|
199
208
|
|
|
200
209
|
export { ActiveWalletInformation };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
8
|
+
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
9
|
+
require('../../../../components/Alert/Alert.cjs');
|
|
10
|
+
require('react');
|
|
11
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
12
|
+
require('../../../../../../_virtual/_tslib.cjs');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
15
|
+
require('@dynamic-labs/sdk-api-core');
|
|
16
|
+
require('../../../../shared/logger.cjs');
|
|
17
|
+
require('@dynamic-labs/iconic');
|
|
18
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
19
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
20
|
+
var close = require('../../../../shared/assets/close.cjs');
|
|
21
|
+
var copy = require('../../../../shared/assets/copy.cjs');
|
|
22
|
+
require('@dynamic-labs/wallet-book');
|
|
23
|
+
require('../../../../utils/constants/colors.cjs');
|
|
24
|
+
require('../../../../utils/constants/values.cjs');
|
|
25
|
+
require('../../../../store/state/loadingAndLifecycle.cjs');
|
|
26
|
+
require('../../../../shared/consts/index.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('../../../../config/ApiEndpoint.cjs');
|
|
32
|
+
require('../../../../store/state/user/user.cjs');
|
|
33
|
+
require('../../../../locale/locale.cjs');
|
|
34
|
+
require('../../../../store/state/projectSettings/projectSettings.cjs');
|
|
35
|
+
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
36
|
+
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
37
|
+
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
38
|
+
require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
39
|
+
require('react-dom');
|
|
40
|
+
require('../../../../context/WalletContext/WalletContext.cjs');
|
|
41
|
+
require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
42
|
+
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
43
|
+
require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
44
|
+
require('@dynamic-labs/types');
|
|
45
|
+
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
46
|
+
require('yup');
|
|
47
|
+
require('../../../../context/MockContext/MockContext.cjs');
|
|
48
|
+
require('../../../../views/CollectUserDataView/useFields.cjs');
|
|
49
|
+
require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
50
|
+
require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
51
|
+
require('@dynamic-labs/rpc-providers');
|
|
52
|
+
require('../../../../store/state/environmentId.cjs');
|
|
53
|
+
require('../../../../store/state/walletConnectorOptions.cjs');
|
|
54
|
+
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
55
|
+
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
56
|
+
var OverlayCard = require('../../../../components/OverlayCard/OverlayCard.cjs');
|
|
57
|
+
require('../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
58
|
+
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
59
|
+
require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
60
|
+
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
61
|
+
require('../DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
62
|
+
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
63
|
+
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
64
|
+
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
65
|
+
require('react-focus-lock');
|
|
66
|
+
var Icon = require('../../../../components/Icon/Icon.cjs');
|
|
67
|
+
require('../../context/DynamicWidgetContext.cjs');
|
|
68
|
+
var IconButton = require('../../../../components/IconButton/IconButton.cjs');
|
|
69
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
70
|
+
require('formik');
|
|
71
|
+
var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
|
|
72
|
+
require('../../../../store/state/sendBalances.cjs');
|
|
73
|
+
require('../../../../components/Input/Input.cjs');
|
|
74
|
+
require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
75
|
+
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
76
|
+
require('../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
77
|
+
require('../../../../../index.cjs');
|
|
78
|
+
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
79
|
+
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
80
|
+
require('@hcaptcha/react-hcaptcha');
|
|
81
|
+
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
82
|
+
require('../../../../store/state/tokenBalances.cjs');
|
|
83
|
+
require('../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
84
|
+
var CopyButton = require('../../../../components/CopyButton/CopyButton.cjs');
|
|
85
|
+
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
86
|
+
require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
87
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
88
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
89
|
+
require('qrcode');
|
|
90
|
+
|
|
91
|
+
/** Component for wallet detail overlays */
|
|
92
|
+
const WalletDetailsCard = ({ address, open, onClose, }) => {
|
|
93
|
+
const { t } = reactI18next.useTranslation();
|
|
94
|
+
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { onClick: onClose, type: 'button', id: 'close-button', "data-testid": 'close-button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
95
|
+
const copyIcon = (jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-secondary', children: jsxRuntime.jsx(copy.ReactComponent, {}) }));
|
|
96
|
+
return (jsxRuntime.jsxs(OverlayCard.OverlayCard, { isOpen: open, onClickOverlay: onClose, children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, children: jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', variant: 'body_normal', children: t('dyn_wallet_details_card.header') }) }), jsxRuntime.jsxs("div", { className: 'wallet-details-card__body', children: [jsxRuntime.jsx(Typography.Typography, { className: 'wallet-details-card__text', color: 'primary', weight: 'bold', variant: 'body_small', children: t('dyn_wallet_details_card.address') }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-details-card__text', color: 'secondary', weight: 'regular', variant: 'body_small', children: address }), jsxRuntime.jsx(CopyButton.CopyButton, { textToCopy: address, variant: 'button', startSlot: copyIcon, children: t('dyn_wallet_details_card.copy') })] })] }));
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
exports.WalletDetailsCard = WalletDetailsCard;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type WalletDetailsCardProps = {
|
|
3
|
+
/** String representation of a wallet address */
|
|
4
|
+
address: string;
|
|
5
|
+
/** Whether the overview should be open or closed */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Callback when the overlay is closed */
|
|
8
|
+
onClose: VoidFunction;
|
|
9
|
+
};
|
|
10
|
+
/** Component for wallet detail overlays */
|
|
11
|
+
export declare const WalletDetailsCard: ({ address, open, onClose, }: WalletDetailsCardProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
5
|
+
import '../../../../components/Alert/Alert.js';
|
|
6
|
+
import 'react';
|
|
7
|
+
import '../../../../events/dynamicEvents.js';
|
|
8
|
+
import '../../../../../../_virtual/_tslib.js';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
10
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
11
|
+
import '@dynamic-labs/sdk-api-core';
|
|
12
|
+
import '../../../../shared/logger.js';
|
|
13
|
+
import '@dynamic-labs/iconic';
|
|
14
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
15
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
16
|
+
import { ReactComponent as SvgClose } from '../../../../shared/assets/close.js';
|
|
17
|
+
import { ReactComponent as SvgCopy } from '../../../../shared/assets/copy.js';
|
|
18
|
+
import '@dynamic-labs/wallet-book';
|
|
19
|
+
import '../../../../utils/constants/colors.js';
|
|
20
|
+
import '../../../../utils/constants/values.js';
|
|
21
|
+
import '../../../../store/state/loadingAndLifecycle.js';
|
|
22
|
+
import '../../../../shared/consts/index.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 '../../../../config/ApiEndpoint.js';
|
|
28
|
+
import '../../../../store/state/user/user.js';
|
|
29
|
+
import '../../../../locale/locale.js';
|
|
30
|
+
import '../../../../store/state/projectSettings/projectSettings.js';
|
|
31
|
+
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
32
|
+
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
33
|
+
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
34
|
+
import '../../../../context/VerificationContext/VerificationContext.js';
|
|
35
|
+
import 'react-dom';
|
|
36
|
+
import '../../../../context/WalletContext/WalletContext.js';
|
|
37
|
+
import '../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
38
|
+
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
39
|
+
import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
40
|
+
import '@dynamic-labs/types';
|
|
41
|
+
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
42
|
+
import 'yup';
|
|
43
|
+
import '../../../../context/MockContext/MockContext.js';
|
|
44
|
+
import '../../../../views/CollectUserDataView/useFields.js';
|
|
45
|
+
import '../../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
46
|
+
import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
47
|
+
import '@dynamic-labs/rpc-providers';
|
|
48
|
+
import '../../../../store/state/environmentId.js';
|
|
49
|
+
import '../../../../store/state/walletConnectorOptions.js';
|
|
50
|
+
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
51
|
+
import '../../../../context/FooterAnimationContext/index.js';
|
|
52
|
+
import { OverlayCard } from '../../../../components/OverlayCard/OverlayCard.js';
|
|
53
|
+
import '../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
|
|
54
|
+
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
55
|
+
import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
56
|
+
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
57
|
+
import '../DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
58
|
+
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
59
|
+
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
60
|
+
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
61
|
+
import 'react-focus-lock';
|
|
62
|
+
import { Icon } from '../../../../components/Icon/Icon.js';
|
|
63
|
+
import '../../context/DynamicWidgetContext.js';
|
|
64
|
+
import { IconButton } from '../../../../components/IconButton/IconButton.js';
|
|
65
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
66
|
+
import 'formik';
|
|
67
|
+
import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
|
|
68
|
+
import '../../../../store/state/sendBalances.js';
|
|
69
|
+
import '../../../../components/Input/Input.js';
|
|
70
|
+
import '../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
71
|
+
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
72
|
+
import '../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
73
|
+
import '../../../../../index.js';
|
|
74
|
+
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
75
|
+
import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
76
|
+
import '@hcaptcha/react-hcaptcha';
|
|
77
|
+
import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
78
|
+
import '../../../../store/state/tokenBalances.js';
|
|
79
|
+
import '../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
80
|
+
import { CopyButton } from '../../../../components/CopyButton/CopyButton.js';
|
|
81
|
+
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
82
|
+
import '../../../../components/IsBrowser/IsBrowser.js';
|
|
83
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
84
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
85
|
+
import 'qrcode';
|
|
86
|
+
|
|
87
|
+
/** Component for wallet detail overlays */
|
|
88
|
+
const WalletDetailsCard = ({ address, open, onClose, }) => {
|
|
89
|
+
const { t } = useTranslation();
|
|
90
|
+
const closeButton = (jsx(IconButton, { onClick: onClose, type: 'button', id: 'close-button', "data-testid": 'close-button', children: jsx(SvgClose, {}) }));
|
|
91
|
+
const copyIcon = (jsx(Icon, { size: 'small', color: 'text-secondary', children: jsx(SvgCopy, {}) }));
|
|
92
|
+
return (jsxs(OverlayCard, { isOpen: open, onClickOverlay: onClose, children: [jsx(ModalHeader, { trailing: closeButton, children: jsx(Typography, { color: 'primary', weight: 'medium', variant: 'body_normal', children: t('dyn_wallet_details_card.header') }) }), jsxs("div", { className: 'wallet-details-card__body', children: [jsx(Typography, { className: 'wallet-details-card__text', color: 'primary', weight: 'bold', variant: 'body_small', children: t('dyn_wallet_details_card.address') }), jsx(Typography, { className: 'wallet-details-card__text', color: 'secondary', weight: 'regular', variant: 'body_small', children: address }), jsx(CopyButton, { textToCopy: address, variant: 'button', startSlot: copyIcon, children: t('dyn_wallet_details_card.copy') })] })] }));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export { WalletDetailsCard };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WalletDetailsCard';
|