@dynamic-labs/sdk-react-core 0.19.0-alpha.18 → 0.19.0-alpha.19
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 +2 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/index.cjs +6 -0
- package/src/index.js +3 -0
- package/src/lib/components/Button/Button.cjs +2 -7
- package/src/lib/components/Button/Button.d.ts +0 -2
- package/src/lib/components/Button/Button.js +2 -7
- package/src/lib/components/CopyButton/CopyButton.cjs +1 -3
- package/src/lib/components/CopyButton/CopyButton.js +1 -3
- package/src/lib/components/DynamicFooter/DynamicFooter.cjs +10 -0
- package/src/lib/components/DynamicFooter/DynamicFooter.d.ts +2 -0
- package/src/lib/components/DynamicFooter/DynamicFooter.js +6 -0
- package/src/lib/components/DynamicFooter/index.d.ts +1 -0
- package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -1
- package/src/lib/components/LogoutButton/LogoutButton.js +1 -1
- package/src/lib/components/ModalHeader/ModalHeader.cjs +3 -3
- package/src/lib/components/ModalHeader/ModalHeader.js +3 -3
- package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +3 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +7 -5
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +0 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +7 -5
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +1 -1
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +1 -1
- package/src/lib/components/SelectNetworkButton/SelectNetworkButton.cjs +1 -1
- package/src/lib/components/SelectNetworkButton/SelectNetworkButton.js +1 -1
- package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.cjs +1 -2
- package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.js +1 -2
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +1 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +1 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -1
- package/src/lib/components/Tooltip/Tooltip.js +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +2 -2
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +2 -2
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
- package/src/lib/components/Typography/Typography.cjs +0 -1
- package/src/lib/components/Typography/Typography.js +0 -1
- package/src/lib/components/Typography/Typography.types.d.ts +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -1
- package/src/lib/components/UserProfileForm/UserProfileForm.cjs +1 -1
- package/src/lib/components/UserProfileForm/UserProfileForm.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +7 -7
- package/src/lib/context/DynamicContext/DynamicContext.js +7 -7
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +7 -20
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +7 -20
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +6 -4
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +6 -4
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -2
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -1
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -1
- package/src/lib/locale/en/translation.cjs +13 -1
- package/src/lib/locale/en/translation.js +13 -1
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -2
- package/src/lib/shared/assets/arrow-left.cjs +53 -0
- package/src/lib/shared/assets/arrow-left.js +29 -0
- package/src/lib/shared/assets/arrow-right-circle.cjs +53 -0
- package/src/lib/shared/assets/arrow-right-circle.js +29 -0
- package/src/lib/shared/assets/check-connection.cjs +53 -0
- package/src/lib/shared/assets/check-connection.js +29 -0
- package/src/lib/shared/assets/index.d.ts +3 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/index.d.ts +1 -1
- package/src/lib/utils/constants/typography.d.ts +0 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +22 -5
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +2 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +22 -5
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +24 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +24 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +12 -5
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +12 -5
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +3 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +3 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +6 -7
- package/src/lib/views/EmailUpdate/EmailUpdate.js +7 -8
- package/src/lib/views/EmailVerification/EmailVerification.cjs +12 -18
- package/src/lib/views/EmailVerification/EmailVerification.js +13 -19
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -3
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -3
- package/src/lib/views/LoginView/LoginView.cjs +3 -5
- package/src/lib/views/LoginView/LoginView.js +4 -6
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +2 -2
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +2 -2
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +4 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +4 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
- package/src/lib/views/NoAccess/NoAccess.js +1 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -3
- package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -3
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +5 -6
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +5 -6
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +5 -2
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +2 -1
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +5 -2
- package/src/lib/views/QrCodeView/QrCodeView.cjs +22 -23
- package/src/lib/views/QrCodeView/QrCodeView.js +23 -24
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -1
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -1
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
- package/src/lib/views/WalletList/WalletList.cjs +7 -3
- package/src/lib/views/WalletList/WalletList.js +8 -4
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +2 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +2 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +2 -2
|
@@ -6,12 +6,13 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
7
7
|
var ThemeContext = require('../../context/ThemeContext/ThemeContext.cjs');
|
|
8
8
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
9
|
-
require('
|
|
9
|
+
var QrCodeContext = require('../../context/QrCodeContext/QrCodeContext.cjs');
|
|
10
10
|
require('@dynamic-labs/sdk-api');
|
|
11
11
|
require('../../shared/logger.cjs');
|
|
12
12
|
require('@dynamic-labs/iconic');
|
|
13
13
|
require('@dynamic-labs/wallet-connector-core');
|
|
14
14
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
15
|
+
require('react');
|
|
15
16
|
require('@dynamic-labs/utils');
|
|
16
17
|
require('../../utils/constants/colors.cjs');
|
|
17
18
|
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
@@ -19,22 +20,29 @@ require('viem');
|
|
|
19
20
|
require('../../shared/consts/index.cjs');
|
|
20
21
|
require('@dynamic-labs/multi-wallet');
|
|
21
22
|
var pixelToRem = require('../../utils/functions/pixelToRem/pixelToRem.cjs');
|
|
22
|
-
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
23
|
-
require('react-dom');
|
|
24
|
-
require('react-focus-lock');
|
|
25
|
-
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
26
|
-
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
27
|
-
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
28
23
|
require('../../config/ApiEndpoint.cjs');
|
|
29
24
|
require('@dynamic-labs/rpc-providers');
|
|
30
25
|
require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
31
26
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
32
27
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
28
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
29
|
+
require('react-dom');
|
|
30
|
+
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
31
|
+
require('react-focus-lock');
|
|
32
|
+
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
33
|
+
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
34
|
+
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
35
|
+
require('../../components/IconButton/IconButton.cjs');
|
|
36
|
+
require('../../components/Alert/Alert.cjs');
|
|
37
|
+
require('../../components/Popper/Popper/Popper.cjs');
|
|
38
|
+
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
39
|
+
require('formik');
|
|
40
|
+
require('yup');
|
|
41
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
42
|
+
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
34
43
|
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
35
44
|
require('../../context/FooterAnimationContext/index.cjs');
|
|
36
45
|
require('../../context/MockContext/MockContext.cjs');
|
|
37
|
-
var QrCodeContext = require('../../context/QrCodeContext/QrCodeContext.cjs');
|
|
38
46
|
require('react-i18next');
|
|
39
47
|
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
40
48
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
@@ -48,23 +56,14 @@ require('../../components/UserProfile/parts/UserProfileField/components/Verified
|
|
|
48
56
|
require('@dynamic-labs/types');
|
|
49
57
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
50
58
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
51
|
-
require('formik');
|
|
52
|
-
require('yup');
|
|
53
|
-
require('../../components/IconButton/IconButton.cjs');
|
|
54
|
-
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
55
|
-
require('../../components/Alert/Alert.cjs');
|
|
56
59
|
var useTimeout = require('../../utils/hooks/useTimeout/useTimeout.cjs');
|
|
57
|
-
require('../../components/Popper/Popper/Popper.cjs');
|
|
58
|
-
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
59
|
-
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
60
|
-
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
61
60
|
var QrCodeContainer = require('./QrCodeContainer/QrCodeContainer.cjs');
|
|
62
61
|
|
|
63
62
|
const QrCodeView = () => {
|
|
64
63
|
var _a;
|
|
65
64
|
const { theme: { theme }, } = ThemeContext.useThemeContext();
|
|
66
65
|
const { name } = theme;
|
|
67
|
-
const { setShowQrCodeMessage } = QrCodeContext.useQrCodeContext();
|
|
66
|
+
const { setShowQrCodeMessage, showQrCodeMessage } = QrCodeContext.useQrCodeContext();
|
|
68
67
|
const { qrcodeUri, desktopUri, selectedWalletConnector: walletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
69
68
|
const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
|
|
70
69
|
useTimeout.useTimeout(() => setShowQrCodeMessage(true), 5000);
|
|
@@ -72,11 +71,11 @@ const QrCodeView = () => {
|
|
|
72
71
|
return null;
|
|
73
72
|
}
|
|
74
73
|
const icon = (jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector.key, style: { height: pixelToRem.pixelToRem(32), width: pixelToRem.pixelToRem(32) } }));
|
|
75
|
-
return (jsxRuntime.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
return (jsxRuntime.jsx("div", { className: 'qr-code-view__container', "data-testid": 'qr-code-view', children: jsxRuntime.jsx(QrCodeContainer.QrCodeContainer, { showQrCodeMessage: showQrCodeMessage, desktopUri: desktopUri, accentColor:
|
|
75
|
+
/* istanbul ignore next */
|
|
76
|
+
name === 'dark'
|
|
77
|
+
? theme.colors.textPrimary
|
|
78
|
+
: (_a = walletBook.getWalletPrimaryColor(walletBook$1, walletConnector.key)) !== null && _a !== void 0 ? _a : '', walletKey: walletConnector.key, walletName: walletConnector.name, qrcodeValue: qrcodeUri, Icon: icon, showCopyToClipboardButton: walletConnector.isWalletConnect }) }));
|
|
80
79
|
};
|
|
81
80
|
|
|
82
81
|
exports.QrCodeView = QrCodeView;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useWalletBookContext, WalletIcon, getWalletPrimaryColor } from '@dynamic-labs/wallet-book';
|
|
3
3
|
import { useThemeContext } from '../../context/ThemeContext/ThemeContext.js';
|
|
4
4
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
5
|
-
import '
|
|
5
|
+
import { useQrCodeContext } from '../../context/QrCodeContext/QrCodeContext.js';
|
|
6
6
|
import '@dynamic-labs/sdk-api';
|
|
7
7
|
import '../../shared/logger.js';
|
|
8
8
|
import '@dynamic-labs/iconic';
|
|
9
9
|
import '@dynamic-labs/wallet-connector-core';
|
|
10
10
|
import '../../context/ViewContext/ViewContext.js';
|
|
11
|
+
import 'react';
|
|
11
12
|
import '@dynamic-labs/utils';
|
|
12
13
|
import '../../utils/constants/colors.js';
|
|
13
14
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
@@ -15,22 +16,29 @@ import 'viem';
|
|
|
15
16
|
import '../../shared/consts/index.js';
|
|
16
17
|
import '@dynamic-labs/multi-wallet';
|
|
17
18
|
import { pixelToRem } from '../../utils/functions/pixelToRem/pixelToRem.js';
|
|
18
|
-
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
19
|
-
import 'react-dom';
|
|
20
|
-
import 'react-focus-lock';
|
|
21
|
-
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
22
|
-
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
23
|
-
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
24
19
|
import '../../config/ApiEndpoint.js';
|
|
25
20
|
import '@dynamic-labs/rpc-providers';
|
|
26
21
|
import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
27
22
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
28
23
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
24
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
25
|
+
import 'react-dom';
|
|
26
|
+
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
27
|
+
import 'react-focus-lock';
|
|
28
|
+
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
29
|
+
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
30
|
+
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
31
|
+
import '../../components/IconButton/IconButton.js';
|
|
32
|
+
import '../../components/Alert/Alert.js';
|
|
33
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
34
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
35
|
+
import 'formik';
|
|
36
|
+
import 'yup';
|
|
37
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
38
|
+
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
30
39
|
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
31
40
|
import '../../context/FooterAnimationContext/index.js';
|
|
32
41
|
import '../../context/MockContext/MockContext.js';
|
|
33
|
-
import { useQrCodeContext } from '../../context/QrCodeContext/QrCodeContext.js';
|
|
34
42
|
import 'react-i18next';
|
|
35
43
|
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
36
44
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
@@ -44,23 +52,14 @@ import '../../components/UserProfile/parts/UserProfileField/components/VerifiedE
|
|
|
44
52
|
import '@dynamic-labs/types';
|
|
45
53
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
46
54
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
47
|
-
import 'formik';
|
|
48
|
-
import 'yup';
|
|
49
|
-
import '../../components/IconButton/IconButton.js';
|
|
50
|
-
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
51
|
-
import '../../components/Alert/Alert.js';
|
|
52
55
|
import { useTimeout } from '../../utils/hooks/useTimeout/useTimeout.js';
|
|
53
|
-
import '../../components/Popper/Popper/Popper.js';
|
|
54
|
-
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
55
|
-
import '../../components/InlineWidget/InlineWidget.js';
|
|
56
|
-
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
57
56
|
import { QrCodeContainer } from './QrCodeContainer/QrCodeContainer.js';
|
|
58
57
|
|
|
59
58
|
const QrCodeView = () => {
|
|
60
59
|
var _a;
|
|
61
60
|
const { theme: { theme }, } = useThemeContext();
|
|
62
61
|
const { name } = theme;
|
|
63
|
-
const { setShowQrCodeMessage } = useQrCodeContext();
|
|
62
|
+
const { setShowQrCodeMessage, showQrCodeMessage } = useQrCodeContext();
|
|
64
63
|
const { qrcodeUri, desktopUri, selectedWalletConnector: walletConnector, } = useInternalDynamicContext();
|
|
65
64
|
const { walletBook } = useWalletBookContext();
|
|
66
65
|
useTimeout(() => setShowQrCodeMessage(true), 5000);
|
|
@@ -68,11 +67,11 @@ const QrCodeView = () => {
|
|
|
68
67
|
return null;
|
|
69
68
|
}
|
|
70
69
|
const icon = (jsx(WalletIcon, { walletKey: walletConnector.key, style: { height: pixelToRem(32), width: pixelToRem(32) } }));
|
|
71
|
-
return (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
return (jsx("div", { className: 'qr-code-view__container', "data-testid": 'qr-code-view', children: jsx(QrCodeContainer, { showQrCodeMessage: showQrCodeMessage, desktopUri: desktopUri, accentColor:
|
|
71
|
+
/* istanbul ignore next */
|
|
72
|
+
name === 'dark'
|
|
73
|
+
? theme.colors.textPrimary
|
|
74
|
+
: (_a = getWalletPrimaryColor(walletBook, walletConnector.key)) !== null && _a !== void 0 ? _a : '', walletKey: walletConnector.key, walletName: walletConnector.name, qrcodeValue: qrcodeUri, Icon: icon, showCopyToClipboardButton: walletConnector.isWalletConnect }) }));
|
|
76
75
|
};
|
|
77
76
|
|
|
78
77
|
export { QrCodeView };
|
|
@@ -37,6 +37,7 @@ require('../../context/FooterAnimationContext/index.cjs');
|
|
|
37
37
|
require('../../context/MockContext/MockContext.cjs');
|
|
38
38
|
require('../../context/QrCodeContext/QrCodeContext.cjs');
|
|
39
39
|
require('react-i18next');
|
|
40
|
+
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
40
41
|
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
41
42
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
42
43
|
var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
@@ -53,7 +54,6 @@ require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
|
53
54
|
require('formik');
|
|
54
55
|
require('yup');
|
|
55
56
|
require('../../components/IconButton/IconButton.cjs');
|
|
56
|
-
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
57
57
|
require('../../components/Alert/Alert.cjs');
|
|
58
58
|
var useFindSocialIcon = require('../../utils/hooks/useFindSocialIcon/useFindSocialIcon.cjs');
|
|
59
59
|
require('../../components/Popper/Popper/Popper.cjs');
|
|
@@ -33,6 +33,7 @@ import '../../context/FooterAnimationContext/index.js';
|
|
|
33
33
|
import '../../context/MockContext/MockContext.js';
|
|
34
34
|
import '../../context/QrCodeContext/QrCodeContext.js';
|
|
35
35
|
import 'react-i18next';
|
|
36
|
+
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
36
37
|
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
37
38
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
38
39
|
import { IconWithSpinner } from '../../components/IconWithSpinner/IconWithSpinner.js';
|
|
@@ -49,7 +50,6 @@ import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
|
49
50
|
import 'formik';
|
|
50
51
|
import 'yup';
|
|
51
52
|
import '../../components/IconButton/IconButton.js';
|
|
52
|
-
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
53
53
|
import '../../components/Alert/Alert.js';
|
|
54
54
|
import { useFindSocialIcon } from '../../utils/hooks/useFindSocialIcon/useFindSocialIcon.js';
|
|
55
55
|
import '../../components/Popper/Popper/Popper.js';
|
|
@@ -68,7 +68,7 @@ const SocialWrongAccountView = () => {
|
|
|
68
68
|
const findSocialIcon = useFindSocialIcon.useFindSocialIcon();
|
|
69
69
|
if (!socialAccount || !socialWalletConnector)
|
|
70
70
|
return null;
|
|
71
|
-
return (jsxRuntime.jsxs("div", { className: classNames.classNames('social-wrong-account-view__container'), children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: classNames.classNames('social-wrong-account-view__title'), children: "Whoops. Wrong Account" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), children: "You must connect with the same account you originally signed in with." }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), children: ["Please connect with: ", jsxRuntime.jsx("b", { children: socialAccount.oauthUsername })] }), jsxRuntime.jsx(Button.Button, { buttonClassName: 'social-wrong-account-view__button',
|
|
71
|
+
return (jsxRuntime.jsxs("div", { className: classNames.classNames('social-wrong-account-view__container'), children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: classNames.classNames('social-wrong-account-view__title'), children: "Whoops. Wrong Account" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), children: "You must connect with the same account you originally signed in with." }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), children: ["Please connect with: ", jsxRuntime.jsx("b", { children: socialAccount.oauthUsername })] }), jsxRuntime.jsx(Button.Button, { buttonClassName: 'social-wrong-account-view__button', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
|
|
72
72
|
variant: 'button_primary',
|
|
73
73
|
weight: 'medium',
|
|
74
74
|
}, disabled: tryAgainClicked, onClick: () => {
|
|
@@ -64,7 +64,7 @@ const SocialWrongAccountView = () => {
|
|
|
64
64
|
const findSocialIcon = useFindSocialIcon();
|
|
65
65
|
if (!socialAccount || !socialWalletConnector)
|
|
66
66
|
return null;
|
|
67
|
-
return (jsxs("div", { className: classNames('social-wrong-account-view__container'), children: [jsx(IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsx(Typography, { weight: 'medium', variant: 'title', className: classNames('social-wrong-account-view__title'), children: "Whoops. Wrong Account" }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), children: "You must connect with the same account you originally signed in with." }), jsxs(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), children: ["Please connect with: ", jsx("b", { children: socialAccount.oauthUsername })] }), jsx(Button, { buttonClassName: 'social-wrong-account-view__button',
|
|
67
|
+
return (jsxs("div", { className: classNames('social-wrong-account-view__container'), children: [jsx(IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsx(Typography, { weight: 'medium', variant: 'title', className: classNames('social-wrong-account-view__title'), children: "Whoops. Wrong Account" }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), children: "You must connect with the same account you originally signed in with." }), jsxs(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), children: ["Please connect with: ", jsx("b", { children: socialAccount.oauthUsername })] }), jsx(Button, { buttonClassName: 'social-wrong-account-view__button', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
|
|
68
68
|
variant: 'button_primary',
|
|
69
69
|
weight: 'medium',
|
|
70
70
|
}, disabled: tryAgainClicked, onClick: () => {
|
|
@@ -38,6 +38,7 @@ require('../../context/FooterAnimationContext/index.cjs');
|
|
|
38
38
|
require('../../context/MockContext/MockContext.cjs');
|
|
39
39
|
require('../../context/QrCodeContext/QrCodeContext.cjs');
|
|
40
40
|
require('react-i18next');
|
|
41
|
+
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
41
42
|
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
42
43
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
43
44
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -53,7 +54,6 @@ require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
|
53
54
|
var UserProfileForm = require('../../components/UserProfileForm/UserProfileForm.cjs');
|
|
54
55
|
var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
|
|
55
56
|
var IconButton = require('../../components/IconButton/IconButton.cjs');
|
|
56
|
-
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
57
57
|
require('../../components/Alert/Alert.cjs');
|
|
58
58
|
var useAssignDefaultValues = require('./useAssignDefaultValues/useAssignDefaultValues.cjs');
|
|
59
59
|
var UserFieldsToIcon = require('./UserFieldsToIcon/UserFieldsToIcon.cjs');
|
|
@@ -34,6 +34,7 @@ import '../../context/FooterAnimationContext/index.js';
|
|
|
34
34
|
import '../../context/MockContext/MockContext.js';
|
|
35
35
|
import '../../context/QrCodeContext/QrCodeContext.js';
|
|
36
36
|
import 'react-i18next';
|
|
37
|
+
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
37
38
|
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
38
39
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
39
40
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -49,7 +50,6 @@ import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
|
49
50
|
import { UserProfileForm } from '../../components/UserProfileForm/UserProfileForm.js';
|
|
50
51
|
import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
|
|
51
52
|
import { IconButton } from '../../components/IconButton/IconButton.js';
|
|
52
|
-
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
53
53
|
import '../../components/Alert/Alert.js';
|
|
54
54
|
import { useAssignDefaultValues } from './useAssignDefaultValues/useAssignDefaultValues.js';
|
|
55
55
|
import { UserFieldsToIcon } from './UserFieldsToIcon/UserFieldsToIcon.js';
|
|
@@ -73,7 +73,7 @@ const WalletCannotBeTransferredView = () => {
|
|
|
73
73
|
_fetchPublicAddress();
|
|
74
74
|
}, [walletConnector]);
|
|
75
75
|
const _shortenWalletAddress = shortenWalletAddress.shortenWalletAddress(walletAddress);
|
|
76
|
-
return (jsxRuntime.jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', children: t('dyn_wallet_link.cannot_link.title') }), jsxRuntime.jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: _shortenWalletAddress }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: t('dyn_wallet_link.cannot_link.description') }), jsxRuntime.jsx(Button.Button, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary',
|
|
76
|
+
return (jsxRuntime.jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', children: t('dyn_wallet_link.cannot_link.title') }), jsxRuntime.jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: _shortenWalletAddress }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: t('dyn_wallet_link.cannot_link.description') }), jsxRuntime.jsx(Button.Button, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: goToInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsxRuntime.jsx(Button.Button, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: goToInitialView, children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
exports.WalletCannotBeTransferredView = WalletCannotBeTransferredView;
|
|
@@ -69,7 +69,7 @@ const WalletCannotBeTransferredView = () => {
|
|
|
69
69
|
_fetchPublicAddress();
|
|
70
70
|
}, [walletConnector]);
|
|
71
71
|
const _shortenWalletAddress = shortenWalletAddress(walletAddress);
|
|
72
|
-
return (jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsx(Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', children: t('dyn_wallet_link.cannot_link.title') }), jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: _shortenWalletAddress }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: t('dyn_wallet_link.cannot_link.description') }), jsx(Button, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary',
|
|
72
|
+
return (jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsx(Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', children: t('dyn_wallet_link.cannot_link.title') }), jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: _shortenWalletAddress }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: t('dyn_wallet_link.cannot_link.description') }), jsx(Button, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: goToInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsx(Button, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: goToInitialView, children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
export { WalletCannotBeTransferredView };
|
|
@@ -78,9 +78,13 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
78
78
|
localStorage.LocalStorage.setToLS(localStorage$1.WALLET_PICKER_SEARCH_KEY, value);
|
|
79
79
|
setFilterValue(value);
|
|
80
80
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
const searchContainer = !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'wallet-list__search-skeleton' })) : (isSearchEnabled && (jsxRuntime.jsx("div", { className: classNames.classNames('wallet-list__search-container', {
|
|
82
|
+
'wallet-list__search-container--scroll': !error,
|
|
83
|
+
}), children: jsxRuntime.jsx(Search.Search, { label: `Search through ${numberOfWallets} wallets...`, value: filterValue, onChange: ({ target: { value } }) => handleFilterValueChange(value), onClickClear: () => handleFilterValueChange('') }) })));
|
|
84
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [searchContainer, Boolean(error) && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { className: 'wallet-list__error-container', withIcon: false, children: error })), jsxRuntime.jsx("div", { className: 'wallet-list__container', children: jsxRuntime.jsxs("div", { className: classNames.classNames('wallet-list__scroll-container', {
|
|
85
|
+
'wallet-list__scroll-container--error': Boolean(error),
|
|
86
|
+
'wallet-list__scroll-container--full-height': isSearchEnabled,
|
|
87
|
+
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [wallets.length === 0 && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: "Oops, no login methods have been configured." })), wallets.length && walletsList.length === 0 ? (jsxRuntime.jsx(SearchNotFoundMessage.SearchNotFoundMessage, { title: 'No wallet found.', subtitle: 'Try searching for a different wallet', image: jsxRuntime.jsx(noWalletFound.ReactComponent, {}) })) : (walletsList.map((wallet, index) => (jsxRuntime.jsx(WalletListItem.WalletListItem, { wallet: wallet, usingMultiWallet: multiWallet, onResetSearchValue: () => handleFilterValueChange('') }, `${wallet.key}_${index}`))))] })), isSearchEnabled && !filterValue && projectSettings && (jsxRuntime.jsx(SearchNotFoundMessage.SearchNotFoundMessage, {}))] }) }), noDefaultFooter && (jsxRuntime.jsx("div", { className: classNames.classNames('wallet-list__tiny-footer', {
|
|
84
88
|
'wallet-list__tiny-footer--hidden': footerIsVisible,
|
|
85
89
|
}), "data-testid": 'wallet-list-tiny-footer' }))] }));
|
|
86
90
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, Fragment
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useRef } from 'react';
|
|
3
3
|
import { useWalletBookContext } from '@dynamic-labs/wallet-book';
|
|
4
4
|
import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
|
|
@@ -74,9 +74,13 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
74
74
|
LocalStorage.setToLS(WALLET_PICKER_SEARCH_KEY, value);
|
|
75
75
|
setFilterValue(value);
|
|
76
76
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
const searchContainer = !projectSettings ? (jsx(Skeleton, { className: 'wallet-list__search-skeleton' })) : (isSearchEnabled && (jsx("div", { className: classNames('wallet-list__search-container', {
|
|
78
|
+
'wallet-list__search-container--scroll': !error,
|
|
79
|
+
}), children: jsx(Search, { label: `Search through ${numberOfWallets} wallets...`, value: filterValue, onChange: ({ target: { value } }) => handleFilterValueChange(value), onClickClear: () => handleFilterValueChange('') }) })));
|
|
80
|
+
return (jsxs(Fragment, { children: [searchContainer, Boolean(error) && (jsx(ErrorContainer, { className: 'wallet-list__error-container', withIcon: false, children: error })), jsx("div", { className: 'wallet-list__container', children: jsxs("div", { className: classNames('wallet-list__scroll-container', {
|
|
81
|
+
'wallet-list__scroll-container--error': Boolean(error),
|
|
82
|
+
'wallet-list__scroll-container--full-height': isSearchEnabled,
|
|
83
|
+
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsx(Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxs(Fragment, { children: [wallets.length === 0 && (jsx(ErrorContainer, { children: "Oops, no login methods have been configured." })), wallets.length && walletsList.length === 0 ? (jsx(SearchNotFoundMessage, { title: 'No wallet found.', subtitle: 'Try searching for a different wallet', image: jsx(SvgNoWalletFound, {}) })) : (walletsList.map((wallet, index) => (jsx(WalletListItem, { wallet: wallet, usingMultiWallet: multiWallet, onResetSearchValue: () => handleFilterValueChange('') }, `${wallet.key}_${index}`))))] })), isSearchEnabled && !filterValue && projectSettings && (jsx(SearchNotFoundMessage, {}))] }) }), noDefaultFooter && (jsx("div", { className: classNames('wallet-list__tiny-footer', {
|
|
80
84
|
'wallet-list__tiny-footer--hidden': footerIsVisible,
|
|
81
85
|
}), "data-testid": 'wallet-list-tiny-footer' }))] }));
|
|
82
86
|
};
|
|
@@ -89,7 +89,7 @@ const WalletLockedView = () => {
|
|
|
89
89
|
height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
90
90
|
width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
91
91
|
} }));
|
|
92
|
-
return (jsxRuntime.jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', children: "Connect your wallet to continue" }), jsxRuntime.jsxs("div", { className: 'wallet-locked-view__content', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', children: "Welcome back." }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', children: ["We couldn't connect to your wallet. Click connect to retry the connection ", appName, "."] }), jsxRuntime.jsx(Button.Button, {
|
|
92
|
+
return (jsxRuntime.jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', children: "Connect your wallet to continue" }), jsxRuntime.jsxs("div", { className: 'wallet-locked-view__content', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', children: "Welcome back." }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', children: ["We couldn't connect to your wallet. Click connect to retry the connection ", appName, "."] }), jsxRuntime.jsx(Button.Button, { onClick: () => handleConnectWallet(), buttonClassName: 'wallet-locked-view__button', children: "Connect wallet" }), jsxRuntime.jsx(Divider.Divider, { text: 'Or' }), jsxRuntime.jsx(TextButton.TextButton, { className: 'wallet-locked-view__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
exports.WalletLockedView = WalletLockedView;
|
|
@@ -85,7 +85,7 @@ const WalletLockedView = () => {
|
|
|
85
85
|
height: pixelToRem(iconSize * iconRatio),
|
|
86
86
|
width: pixelToRem(iconSize * iconRatio),
|
|
87
87
|
} }));
|
|
88
|
-
return (jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsx(ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', children: "Connect your wallet to continue" }), jsxs("div", { className: 'wallet-locked-view__content', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsx(Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', children: "Welcome back." }), jsxs(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', children: ["We couldn't connect to your wallet. Click connect to retry the connection ", appName, "."] }), jsx(Button, {
|
|
88
|
+
return (jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsx(ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', children: "Connect your wallet to continue" }), jsxs("div", { className: 'wallet-locked-view__content', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsx(Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', children: "Welcome back." }), jsxs(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', children: ["We couldn't connect to your wallet. Click connect to retry the connection ", appName, "."] }), jsx(Button, { onClick: () => handleConnectWallet(), buttonClassName: 'wallet-locked-view__button', children: "Connect wallet" }), jsx(Divider, { text: 'Or' }), jsx(TextButton, { className: 'wallet-locked-view__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
export { WalletLockedView };
|
|
@@ -69,7 +69,7 @@ const WalletSignSpinnerView = () => {
|
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
71
|
const { key } = walletConnector;
|
|
72
|
-
const iconSize =
|
|
72
|
+
const iconSize = 96;
|
|
73
73
|
const handleClose = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
74
74
|
goToInitialView();
|
|
75
75
|
setMultiWalletWidgetState('idle');
|
|
@@ -80,7 +80,7 @@ const WalletSignSpinnerView = () => {
|
|
|
80
80
|
height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
81
81
|
width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
82
82
|
} }));
|
|
83
|
-
return (jsxRuntime.jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', className: classNames.classNames('wallet-sign-spinner__copy'), children: "Sign the message to confirm transferring this wallet to this account." }), jsxRuntime.jsx(Button.Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary',
|
|
83
|
+
return (jsxRuntime.jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('wallet-sign-spinner__copy'), children: "Sign the message to confirm transferring this wallet to this account." }), jsxRuntime.jsx(Button.Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary', buttonClassName: 'wallet-sign-spinner__button', onClick: () => handleClose(), typographyProps: {
|
|
84
84
|
variant: 'button_primary',
|
|
85
85
|
weight: 'medium',
|
|
86
86
|
}, children: "Cancel" })] }));
|
|
@@ -65,7 +65,7 @@ const WalletSignSpinnerView = () => {
|
|
|
65
65
|
return null;
|
|
66
66
|
}
|
|
67
67
|
const { key } = walletConnector;
|
|
68
|
-
const iconSize =
|
|
68
|
+
const iconSize = 96;
|
|
69
69
|
const handleClose = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
70
|
goToInitialView();
|
|
71
71
|
setMultiWalletWidgetState('idle');
|
|
@@ -76,7 +76,7 @@ const WalletSignSpinnerView = () => {
|
|
|
76
76
|
height: pixelToRem(iconSize * iconRatio),
|
|
77
77
|
width: pixelToRem(iconSize * iconRatio),
|
|
78
78
|
} }));
|
|
79
|
-
return (jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsx(Typography, { variant: 'body_normal', className: classNames('wallet-sign-spinner__copy'), children: "Sign the message to confirm transferring this wallet to this account." }), jsx(Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary',
|
|
79
|
+
return (jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('wallet-sign-spinner__copy'), children: "Sign the message to confirm transferring this wallet to this account." }), jsx(Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary', buttonClassName: 'wallet-sign-spinner__button', onClick: () => handleClose(), typographyProps: {
|
|
80
80
|
variant: 'button_primary',
|
|
81
81
|
weight: 'medium',
|
|
82
82
|
}, children: "Cancel" })] }));
|
|
@@ -153,7 +153,7 @@ const WalletUsedView = () => {
|
|
|
153
153
|
setMultiWalletWidgetState('idle');
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
|
-
return (jsxRuntime.jsxs("div", { className: 'wallet-used-view__container', children: [jsxRuntime.jsx("div", { className: 'wallet-used-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-used-view__shorten-wallet-address', variant: 'body_normal', weight: '
|
|
156
|
+
return (jsxRuntime.jsxs("div", { className: 'wallet-used-view__container', children: [jsxRuntime.jsx("div", { className: 'wallet-used-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-used-view__shorten-wallet-address', variant: 'body_normal', weight: 'medium', color: 'primary', children: _shortenWalletAddress }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-used-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: "Linking your wallet to this account will unlink it from its previously associated account" }), isSingleWalletAccount && (jsxRuntime.jsxs("label", { htmlFor: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-label', children: [jsxRuntime.jsx(Checkbox.Checkbox, { id: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-container', defaultChecked: isChecked, onChange: () => setIsChecked(!isChecked), ariaLabel: 'skip empty account check' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: "I understand that linking this wallet means that I will lose access to the other account." })] })), jsxRuntime.jsx(Button.Button, { buttonClassName: 'wallet-used-view__accept-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: () => handleWalletTransfer(), disabled: (!isChecked && isSingleWalletAccount) || loading, dataTestId: 'wallet-used-view-transfer-wallet', children: "Link wallet to current account" }), jsxRuntime.jsx(Button.Button, { dataTestId: 'wallet-used-view-log-out', buttonPadding: 'small', buttonClassName: 'wallet-used-view__logout', onClick: handleLogOut, children: "Log out" })] }));
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
exports.WalletUsedView = WalletUsedView;
|
|
@@ -149,7 +149,7 @@ const WalletUsedView = () => {
|
|
|
149
149
|
setMultiWalletWidgetState('idle');
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
|
-
return (jsxs("div", { className: 'wallet-used-view__container', children: [jsx("div", { className: 'wallet-used-view__icon', children: jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-used-view__shorten-wallet-address', variant: 'body_normal', weight: '
|
|
152
|
+
return (jsxs("div", { className: 'wallet-used-view__container', children: [jsx("div", { className: 'wallet-used-view__icon', children: jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-used-view__shorten-wallet-address', variant: 'body_normal', weight: 'medium', color: 'primary', children: _shortenWalletAddress }), jsx(Typography, { className: 'wallet-used-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: "Linking your wallet to this account will unlink it from its previously associated account" }), isSingleWalletAccount && (jsxs("label", { htmlFor: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-label', children: [jsx(Checkbox, { id: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-container', defaultChecked: isChecked, onChange: () => setIsChecked(!isChecked), ariaLabel: 'skip empty account check' }), jsx(Typography, { variant: 'body_small', color: 'secondary', children: "I understand that linking this wallet means that I will lose access to the other account." })] })), jsx(Button, { buttonClassName: 'wallet-used-view__accept-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: () => handleWalletTransfer(), disabled: (!isChecked && isSingleWalletAccount) || loading, dataTestId: 'wallet-used-view-transfer-wallet', children: "Link wallet to current account" }), jsx(Button, { dataTestId: 'wallet-used-view-log-out', buttonPadding: 'small', buttonClassName: 'wallet-used-view__logout', onClick: handleLogOut, children: "Log out" })] }));
|
|
153
153
|
};
|
|
154
154
|
|
|
155
155
|
export { WalletUsedView };
|
|
@@ -36,6 +36,7 @@ require('../../../../context/FooterAnimationContext/index.cjs');
|
|
|
36
36
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
37
37
|
require('../../../../context/QrCodeContext/QrCodeContext.cjs');
|
|
38
38
|
require('react-i18next');
|
|
39
|
+
var DynamicWidgetFooter = require('../../../DynamicWidget/components/DynamicWidgetFooter/DynamicWidgetFooter.cjs');
|
|
39
40
|
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
40
41
|
require('../../../DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
41
42
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -43,7 +44,6 @@ require('../../../../context/EmailVerificationContext/EmailVerificationContext.c
|
|
|
43
44
|
require('qrcode');
|
|
44
45
|
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
45
46
|
require('../../../DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
46
|
-
var DynamicWidgetFooter = require('../../../DynamicWidget/components/DynamicWidgetFooter/DynamicWidgetFooter.cjs');
|
|
47
47
|
require('../../../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
48
48
|
require('../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
49
49
|
require('@dynamic-labs/types');
|
|
@@ -32,6 +32,7 @@ import '../../../../context/FooterAnimationContext/index.js';
|
|
|
32
32
|
import '../../../../context/MockContext/MockContext.js';
|
|
33
33
|
import '../../../../context/QrCodeContext/QrCodeContext.js';
|
|
34
34
|
import 'react-i18next';
|
|
35
|
+
import { DynamicWidgetFooter } from '../../../DynamicWidget/components/DynamicWidgetFooter/DynamicWidgetFooter.js';
|
|
35
36
|
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
36
37
|
import '../../../DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
37
38
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -39,7 +40,6 @@ import '../../../../context/EmailVerificationContext/EmailVerificationContext.js
|
|
|
39
40
|
import 'qrcode';
|
|
40
41
|
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
41
42
|
import '../../../DynamicWidget/context/DynamicWidgetContext.js';
|
|
42
|
-
import { DynamicWidgetFooter } from '../../../DynamicWidget/components/DynamicWidgetFooter/DynamicWidgetFooter.js';
|
|
43
43
|
import '../../../../views/CollectUserDataView/fieldsConfig.js';
|
|
44
44
|
import '../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
45
45
|
import '@dynamic-labs/types';
|
package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs
CHANGED
|
@@ -50,13 +50,13 @@ require('yup');
|
|
|
50
50
|
require('../../../context/MockContext/MockContext.cjs');
|
|
51
51
|
require('../../../components/IconButton/IconButton.cjs');
|
|
52
52
|
require('../../../components/Alert/Alert.cjs');
|
|
53
|
+
var index = require('../../../context/FooterAnimationContext/index.cjs');
|
|
53
54
|
var useIsLoggedIn = require('../../../utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs');
|
|
54
55
|
require('../../../components/Popper/Popper/Popper.cjs');
|
|
55
56
|
var PopperContext = require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
56
57
|
var ModalCard = require('../../../components/ModalCard/ModalCard.cjs');
|
|
57
58
|
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
58
59
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
59
|
-
var index = require('../../../context/FooterAnimationContext/index.cjs');
|
|
60
60
|
var SocialRedirectContext = require('../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
61
61
|
require('../../../views/WalletList/WalletList.cjs');
|
|
62
62
|
var viewToComponentMap = require('../../../views/viewToComponentMap.cjs');
|
package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js
CHANGED
|
@@ -46,13 +46,13 @@ import 'yup';
|
|
|
46
46
|
import '../../../context/MockContext/MockContext.js';
|
|
47
47
|
import '../../../components/IconButton/IconButton.js';
|
|
48
48
|
import '../../../components/Alert/Alert.js';
|
|
49
|
+
import { FooterAnimationContextProvider } from '../../../context/FooterAnimationContext/index.js';
|
|
49
50
|
import { useIsLoggedIn } from '../../../utils/hooks/useIsLoggedIn/useIsLoggedIn.js';
|
|
50
51
|
import '../../../components/Popper/Popper/Popper.js';
|
|
51
52
|
import { PopperProvider } from '../../../components/Popper/PopperContext/PopperContext.js';
|
|
52
53
|
import { ModalCard } from '../../../components/ModalCard/ModalCard.js';
|
|
53
54
|
import '../../../components/InlineWidget/InlineWidget.js';
|
|
54
55
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
55
|
-
import { FooterAnimationContextProvider } from '../../../context/FooterAnimationContext/index.js';
|
|
56
56
|
import { SocialRedirectContextProvider } from '../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
57
57
|
import '../../../views/WalletList/WalletList.js';
|
|
58
58
|
import { viewToComponentMap } from '../../../views/viewToComponentMap.js';
|
|
@@ -99,9 +99,9 @@ const DynamicWidgetWalletHeader = ({ variant, }) => {
|
|
|
99
99
|
return shortenEmail.shortenEmail(user === null || user === void 0 ? void 0 : user.email);
|
|
100
100
|
};
|
|
101
101
|
const isActionsVisible = isSendBalanceEnabled || fundingEnabled;
|
|
102
|
-
return (jsxRuntime.jsxs("div", { className: 'dynamic-widget-wallet-header', "data-testid": 'dynamic-widget-wallet-header', children: [primaryWallet ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title', children: "Active wallet" }), jsxRuntime.jsx(ActiveWalletInformation.ActiveWalletInformation, {})] })) : (jsxRuntime.jsx("div", { className: 'dynamic-widget-wallet-header__icon-container', children: jsxRuntime.jsx(UserAvatar.UserAvatar, { user: user }) })), primaryWallet ? (jsxRuntime.jsx("div", { "data-testid": 'primaryWalletStatus', className: 'dynamic-widget-wallet-header__wallet-info', children: isActionsVisible && (jsxRuntime.jsxs("div", { className: 'dynamic-widget-wallet-header__wallet-actions', children: [fundingEnabled && (jsxRuntime.jsx(Button.Button, { expanded: true, dataTestId: 'buy-crypto-button', buttonPadding: 'small', buttonVariant: 'primary',
|
|
102
|
+
return (jsxRuntime.jsxs("div", { className: 'dynamic-widget-wallet-header', "data-testid": 'dynamic-widget-wallet-header', children: [primaryWallet ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title', children: "Active wallet" }), jsxRuntime.jsx(ActiveWalletInformation.ActiveWalletInformation, {})] })) : (jsxRuntime.jsx("div", { className: 'dynamic-widget-wallet-header__icon-container', children: jsxRuntime.jsx(UserAvatar.UserAvatar, { user: user }) })), primaryWallet ? (jsxRuntime.jsx("div", { "data-testid": 'primaryWalletStatus', className: 'dynamic-widget-wallet-header__wallet-info', children: isActionsVisible && (jsxRuntime.jsxs("div", { className: 'dynamic-widget-wallet-header__wallet-actions', children: [fundingEnabled && (jsxRuntime.jsx(Button.Button, { expanded: true, dataTestId: 'buy-crypto-button', buttonPadding: 'small', buttonVariant: 'primary', onClick: () => setShowFunding(true), disabled: !supportsFunding, startSlot:
|
|
103
103
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
104
|
-
jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-secondary', children: jsxRuntime.jsx(add.ReactComponent, {}) }), children: "Buy" })), isSendBalanceEnabled && (jsxRuntime.jsx(Button.Button, { expanded: true, dataTestId: 'send-balance-button', buttonPadding: 'small', buttonVariant: 'primary',
|
|
104
|
+
jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-secondary', children: jsxRuntime.jsx(add.ReactComponent, {}) }), children: "Buy" })), isSendBalanceEnabled && (jsxRuntime.jsx(Button.Button, { expanded: true, dataTestId: 'send-balance-button', buttonPadding: 'small', buttonVariant: 'primary', onClick: handleOnClickSend, startSlot:
|
|
105
105
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
106
106
|
jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-secondary', children: jsxRuntime.jsx(send.ReactComponent, {}) }), children: "Send" }))] })) })) : (jsxRuntime.jsx(Typography.Typography, { className: 'dynamic-widget-wallet-header__email', variant: 'body_normal', weight: 'regular', children: renderEmailOrSocialHeader() }))] }));
|
|
107
107
|
};
|